I’m using the Vision -> Reporting -> PDF Viewer to display PDF’s loaded from a SQL Database as bytes.
I can load a PDF without issue, but I’m trying to figure out how to actually then clear out the loaded PDF at runtime.
I’ve tried this:
emptyPDF = system.file.getTempFile('pdf') pdfByes = system.file.readFileAsBytes(emptyPDF) try: event.source.parent.getComponent('pdfViewer').loadPDFBytes(pdfByes,'') except: #This will create an error. That's ok. pass
However I get an ICEpdf error popup that I can’t seem to avoid. I’m fine with it throwing an error, I just don’t want to see it in this instance.
Is there any good way to do clear out the loaded PDF?