Question about printing from Vision

I am currenlty using creatprintJOb method in vision and able to print first or current page of print viewer to a printer, is there a way to print all pages ?Tried PrintAllPages(), i suppose ignition doesnt support print all page script

Do you mean the PDF viewer, the Report Viewer, or some other component?

Also, don't @ tag people explicitly, especially folks who aren't IA employees. Just post, and see if anyone helps you.

2 Likes

This is my script :
job = system.print.createPrintJob(event.source.parent.getComponent("P2L"))
job.setShowPrintDialog(0)
job.setPageHeight(15)
job.setPageWidth(10)
job.setMargins(.0)
job.setOrientation(1)
job.print()

#Its a report viewer component "P2L"
#When i run this script, i get only the first page of report viewer printed i do have 7 pages and want to print all pages.

system.print.createPrintJob() makes a print job of the Report Viewer component, not the report itself.

The Report Viewer has a built-in print method.

Example: assuming you're printing to the default printer, and no dialog:

job = event.source.parent.getComponent("P2L")
job.print(None, False)
3 Likes

event this scrpt pasted in report viewer scripting gives only first page print out.
I have added this script on mouse click on report viewer and also in reportGenerated extension method

Does right-clicking on the report viewer and selecting 'Print' give the desired output?

1 Like

I added a for loop and changing the current page( from 1 to 8) everyloop and i am able to print all pages.