Printing saved report from button

Hello! I am trying to get a button to print out a saved report. Unfortunately, what this prints out is a bunch of blank boxes.

path = system.file.openFile('pdf', "C:\Users\chunter\Desktop\Ignition Reports")
if path != None:
	bytes = system.file.readFileAsBytes(path)
	event.source.parent.getComponent('PDF Viewer').loadPDFBytes(bytes, "Name")
	job = event.source.parent.getComponent('PDF Viewer')
	job.print()

I am very new to Ignition so any and all advice would be much appreciated!

1 Like

Hi @Carson_Hunter,

I was able to see the same behavior when using the same script. In this case, I believe it would be best to submit a ticket with us for a more thorough investigation.

https://support.inductiveautomation.com/hc/en-us

1 Like

Will do!

1 Like

Unfortunately this is a know issue and the solution was to not use this method :slight_smile: no shortcuts this time!