-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nil pointer when convert docx to pdf #488
Comments
Hi @knight-ni, Could you share the runnable code snippet and the DOCX file that generated by UniOffice? Best regards, |
#my code seems like this
|
Thank you for sharing the code snippet and file, we will check this issue. |
Hi @knight-ni, We released new UniOffice version https://github.com/unidoc/unioffice/releases/tag/v1.26.0 to solve the nil pointer issue. |
Hi @sampila , after upgrade to v1.26.0, i got another error as followed, anything should i do to fix this ? panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: Process finished with the exit code 2 |
Hi @knight-ni, Is it same docx file or different one? |
i tried the file last time sended,but seems words missing and misplacement occured |
Currently we are working to get the results close to what MS Word to PDF conversion. Do you still having issue with the nil pointer issue? it would be great if you could share the docx file that having the nil pointer issue. |
nil pointer issue no longer occured now, will be close this issue ,thx |
Description
after generate docx by unioffice, i tried convert to pdf, but got errror followed, anyone could help?
Actual Behavior
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x10a6f74]
goroutine 1 [running]:
github.com/unidoc/unioffice/document/convert.(*convertContext).addAbsoluteTable(0xc000bdaf00, 0xc000107d80)
E:/testddir/gopath/pkg/mod/github.com/unidoc/unioffice@v1.24.0/document/convert/convert.go:15 +0x1974
github.com/unidoc/unioffice/document/convert.(*convertContext).addAbsoluteCBCs(0xc000bdaf00, {0xc0000ec6a8, 0x1, 0xc0004a5958?}, {0xc0000ec6d0?, 0x1, 0xc0004a5958?})
E:/testddir/gopath/pkg/mod/github.com/unidoc/unioffice@v1.24.0/document/convert/convert.go:15 +0x7ed
github.com/unidoc/unioffice/document/convert.ConvertToPdfWithOptions(0xc000002300, 0x0)
E:/testddir/gopath/pkg/mod/github.com/unidoc/unioffice@v1.24.0/document/convert/convert.go:18 +0xae6
github.com/unidoc/unioffice/document/convert.ConvertToPdf(...)
E:/testddir/gopath/pkg/mod/github.com/unidoc/unioffice@v1.24.0/document/convert/convert.go:15
dmHC_Runner/pkg/docx2pdf.WordToPDF({{0xc0000201ab, 0xd}, {0xc0000202aa, 0xd}, {0xc0001983c0, 0x47}, {0xc0000202ca, 0xe}, 0x16, 0x1474, ...}, ...)
E:/BaiduNetdiskWorkspace/work/DM/property/mytools/dmHC_Runner/pkg/docx2pdf/docx2pdf.go:42 +0x205
main.main()
E:/BaiduNetdiskWorkspace/work/DM/property/mytools/dmHC_Runner/main.go:91 +0xa10
Process finished with the exit code 2
Please include a reproducible code snippet or document attachment that
demonstrates the issue.
The text was updated successfully, but these errors were encountered: