according to your feedback of the abnormal information, we believe that it may be caused by the lack of graphical interface support. Converting html to pdf using the qt plugin requires graphical interface support, which is lacking in your environment.
To do this, we recommend that you install Xvfb (X Virtual Framebuffer), which is a virtual X server that can provide an X environment without a physical display. With it, you can run GUI applications in the background and draw graphics to the virtual display device it provides, without the need for a real physical display.
After installing Xvfb, you can run again the command echo "<p>test text</p>" | ./Html2Pdf "placeholder" "output.pdf" 800 600 0 0 0 0 1
The install command for Xvfb:
- Code: Select all
yum updata
yum install Xvfb