Random errors when running HTML2PDF conversion on Linux

33 views
Skip to first unread message

Ryan

unread,
Apr 20, 2017, 12:28:37 PM4/20/17
to PDFTron PDFNet SDK
Question:

Sometimes we get this error and sometimes we don't.

Exception:
     
Message: Failed to write html string to file.
     
Conditional expression: fout.is_open()
     
Filename   : Html2Pdf.cpp
     
Function   : GetSettings
     
Linenumber : 775
     
Error code : 0

And sometimes we get below error highlighted in red.

html2pdf.so: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory

Answer:

First, if you are running on 64bit Linux, then running the 64bit version of html2pdf might work better.

Either way, use the ldd command to find out the dependencies that are missing. For instance the following probably need to be installed.

libXext.x86_64
fontconfig
.x86_64
libXrender
.x86_64
urw
-fonts.noarch


Reply all
Reply to author
Forward
0 new messages