[Reactive Html2Pdf Js] Possibility to store the generated PDF
Reactive icon
Forge component by Ryan Surjadi
Application Type

For my company, I needed to be able to a) save a PDF on disk and b) save a PDF in the database. This is based on the same container on the same page. To do this, I needed to change the module ReactiveHtml2Pdf_Converter_CW a bit. 

1. Added an additional optional input parameter 'SaveFile'. The default value is true and will result in the current functionality. If set to false, the PDF won't be saved to disk, but the binary file shall be returned.

2. Added an optional event which pushes the binary file which is generated when 'SaveFile' is false.

This way existing implementations won't break.

I've attached the modified OML.

Is this something that can be implemented in a future version?





Hi @Ryan Surjadi,

Thanks for the update! I'll close the thread.

Thank you Sven, I have used your Application and it worked great.

One small improvemnt can be to change the structure html2canvas.scale from Integer to Decimal.

the JS accept decimal values and I have used it to reduce pictures quality in order to have a smaller output mine was 17 Mb, reduced to 10Mb setting the scale to 0.8

Thanks for the addition! I'll try it myself, since my PDF's are 5MB and take forever to download. Hopefully, both changes can be included in the next release of this component.

Hi @Sven Persijn , I have already updated this component to add this feature. Thanks


Hi @Ryan Surjadi,

Thanks for the update! I'll close the thread.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.