Way to print to PDF using old Reporting component?

I have a old style reporting component com.inductiveautomation.factorypmi.plugins.reporting.components.ReportPanel that has report logic in it. I wanted to know if there was a way to print to a PDF at a predestined file location? I see there’s different print with this component, ideally the user would not see any dialog. All these prints can go to the same location and have the same filename and overwrite each other, as I just want it to that I can grab the PDF and save it to the database.
image

I had tried converting this report to the newer Report style but that had issues that it wasn’t able to be previewed in the new report component. I am being asked to try to make this work with this old component otherwise we would have to remake over 40ish reports, so please no answers saying to convert to the new report module (as much as I may agree with you)

ReportPanel has a getBytesPDF() method you could pair with system.file.writeFile?

1 Like

Thanks, I was able to make it work by using getBytesPDF() and writeFile so this will work.

Strange I did not see getBytesPDF() on ReportBase (ignition 7.8.4-rc1 API)

Edit: Nevermind, I see it now when I go to the appropriate subclass.