Hello Hello,
i’d like to know if it would be possible to grab into the generation process of the reports and under- or overlay another set of pdfs to it? Overlaying two pdfs above each other is not the hard part i’d say but is there a way we can do this while the report preview generates? We would like to use this method to include high-res background images to the reports (watermarks or whatever - svgs basically), since the report designer does not support svg files and pngs are pixelated at printing or at zooming in.
Merge two PDFs before the report is generated?
Best answer by Yuriy Zaletskyy
In Acumatica, it is possible to modify the generation process of reports to include additional PDFs as a background or overlay on top of the main report. This can be done by creating a custom report implementation that inherits from the existing report implementation and modifies the generation process to include the additional PDFs.
One way to accomplish this is to use the Acumatica report designer to create the main report, then use a third-party library, such as iTextSharp, to programmatically merge the main report with the additional PDFs before it is displayed to the user.
You can do this by creating a new custom report implementation, which will inherit from the existing report implementation. In this custom implementation, you can override the methods that generate the report and add logic to merge the main report with the additional PDFs before it is displayed to the user.
You can also use the PdfPageEventHelper class of iTextSharp, to add the background image in the OnEndPage event.
Another way is to use the Acumatica's PrintJobEventArgs, that can be used to modify the rendered pdf report, before it is sent to the printer or to the user.
Keep in mind that the implementation of this customization may vary depending on the specific requirements and the version of Acumatica you are using.
In summary, it is possible to modify the generation process of reports in Acumatica to include additional PDFs as a background or overlay on top of the main report by creating a custom report implementation, that inherits from the existing report implementation and programmatically merge the main report with the additional PDFs before it is displayed to the user, or by using the PdfPageEventHelper class of iTextSharp or PrintJobEventArgs event of Acumatica to add the background image.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.