How to merge two pdf files into one image?
Hi @Su Bin,
To merge two PDF files into one image, you can follow these steps:
Use PDFMerger to combine the two PDF files into a single PDF.
Once merged, use the Export PDF to Images to convert the combined PDF into an image format (like PNG or JPEG).
This way, both PDFs are first joined and then converted into a single image seamlessly.
This plugin cannot merge all the images into one image
There's a very old Forge Asset called Image Join that you could try, but I'm not sure it still works.
You can first convert the PDF into an image PDF to Image, and once the image is generated, you can combine the images using this component Image Join. If this component doesn't work, you can at least understand the logic behind the merge and implement it as needed.
Hope this helps
Thanks
Using client-side JavaScript at the block or screen level. The JS code merges the PDFs, converts the result to a PNG image, and allows you to either open it in a new tab or trigger a download.
You can add pdf-lib.js and pdf2pic libraries in your OutSystems application (e.g., via CDN or as resources). Then use it in client action JS node which will merge and convert your file.
Hi @Su Bin
You cannot directly merge two PDFs into a single image using built-in features. You need to convert and merge using external libraries or services.
One approach could be using External API like:
You can follow below steps:
The Outsystems implementation for this:
Hi Su Bin,
I totally agree with Bhanu ,Using client-side JavaScript at the block or screen level. This approach helps reduce server load, avoids timeout issues, and provides a smooth user experience
On my side, I already tried to export extra large image that are joined by 4-5 pdf pages.
My approach is to load all pdf pages in 1 container on UI then I used the html2canvas js library to generate the unique image.
Please refer to below code :