Just want to print out the whole page into a PDF.
With iPAD, request print doesn't work, since there is no printer connected. However, system.perspective.print(page) doesn't work. Can someone help me with this?
You must go through a locally installed printer.
If you must be able to generate PDFs without a locally-installed printer, use the reporting module, which runs in the gateway.
Thanks, I think I will go with print into a report. However, can I use system.perspective.print to print out the page into a report?
No, you'll have to design a report. (Report design in Ignition is not a web technology.)
what's the data source for the report?
Whatever you set up in the report design. Completely independent of Perspective. (Or Vision, for what its worth.)
Typically, you would pass parameters from your user interface into the report generation to drive the report's assembly of the data to include.
{ Just to be clear to future/other readers: There's no "magic" way to take the effort one puts into designing a Perspective page and short-circuiting the effort required to make a matching report. One learns that if formal printed results are ever expected, put the effort into a report first, then drop a report viewer into your UI. }
The key question is can I use system.perspective.print to print out a page? Can you help me with that?
Already answered...
system.perspective.print
is for printing to the console (specifically the output console in the designer). It's like using the print
funciton in Vision. (Note, it's more nuanced than that, but no need to get into the weeds).
It does not send items to a printer, which is decidedly more difficult, particularly in perspective.
In 8.1.28 and above there is a Request Print action
I'm not sure how that fits in with the reporting tools.
The OP already tried that--no local printer.