[HtmlConvertToPdf_for_Outsystems10] Can't use wkhtmltopdf parameters properly

[HtmlConvertToPdf_for_Outsystems10] Can't use wkhtmltopdf parameters properly

  
Forge Component
(0)
Published on 8 Oct by chandra vikas sharma
0 votes
Published on 8 Oct by chandra vikas sharma

Hey!

Thank you for this extension! The first I used that the wkhtmltopdf parameters really works, like headers and footers.


But...


I'am having troubles on using pagination on my PDFs.

The Error occurs when I try to use any "post processing" feature, like executing JS or using tags like [page], [topage], etc...


I just attached a png with the error message.

Hi Rodrigo,

I'm not familiar with this component, nor does it have any details or documentation.

Why not use the HtmlToPdfConverter component that does have an active developer and several support cases that might shed some light on your issues?

If you are working with OutSystems 10, just download the version for 10 (from the Forge website), and make sure you have the FileSystem component also installed (again, version for 10 (from the Forge website as well).

Finally, and this is likely true for both components, you may want to check the wkhtmltopdf website for more info on Javascript issues... from the manual, two options drew my attention as potentially being helpful here:

  • --javascript-delay <msec>       Wait some milliseconds for javascript
                                          finish (default 200)
    and
  • --debug-javascript              Show javascript debugging output

I was using HtmlToPDFConverter but when I neeeded to use (for example) --footer-center [page]/[topage] I got the following response error on GeneratePDF action:

'The switch --footer-html, is not support using unpatched qt, and will be ignored.SetProcessDpiAwareness failed: "COM error 0x80070005  (Unknown error 0x0ffffffff80070005)"'

That component seems to be based on a non release (bleeding edge) version of wkhtmltopdf, which doesn't have all the features of the executable.

Btw... I will open a discussing on that component too...

Thanks!

Hi Rodrigo,

Unlike this component, from what I can see without opening and using it, the Html2PdfConverter will allow you to upload the version of wkhtmltopdf that you want to use, just go to the admin screen of the component.

But did you try those two switches I suggested? Given you are post-processing the screen with Javascript, it's likely they can help you, and they should work on both components (provided they are using a version of wkhtmltopdf that supports them of course)


Jorge Martins wrote:

Hi Rodrigo,

Unlike this component, from what I can see without opening and using it, the Html2PdfConverter will allow you to upload the version of wkhtmltopdf that you want to use, just go to the admin screen of the component.

But did you try those two switches I suggested? Given you are post-processing the screen with Javascript, it's likely they can help you, and they should work on both components (provided they are using a version of wkhtmltopdf that supports them of course)


Yes, I tried.

I'm abandoning these 2 components cause of the lack of support and all.

I'm currently trying the Html2PDF one, which has a way better support and is up to date.


Rodrigo Leonardo Corrêa de Paula wrote:

Jorge Martins wrote:

Hi Rodrigo,

Unlike this component, from what I can see without opening and using it, the Html2PdfConverter will allow you to upload the version of wkhtmltopdf that you want to use, just go to the admin screen of the component.

But did you try those two switches I suggested? Given you are post-processing the screen with Javascript, it's likely they can help you, and they should work on both components (provided they are using a version of wkhtmltopdf that supports them of course)


Yes, I tried.

I'm abandoning these 2 components cause of the lack of support and all.

I'm currently trying the Html2PDF one, which has a way better support and is up to date.


 Hi jorge Martin,

   

    Is this  Htmlconverttopdf_for_outsystems 10, is working good for u?