Xamarin.Forms: cannot print PDF files

0

I have a Xamarin.Forms UWP application that displays PDF files using pdfjs solution provided by @Nico Zhu - MSFT. It was discussed here: Displaying pdf files from internet in Xamarin.Forms UWP.

I can successfully display PDF files, but for some reason printing doesn't work. When I press the Print button, it shows a dialog with a progress bar "Preparing document for printing". When the progress ends, the dialog disappears and nothing happens. I tried to download the file to open and print it in Adobe Acrobat, but download doesn't work either.

ADDED:

I tried to debug the javascript code, and exception is thrown in viewer.js:

Printer.startPrint();

Unhandled exception at line 357, column 1 in res://edgehtml.dll/preview.js 0x8000ffff - JavaScript runtime error: Unexpected call to method or property access. occurred

pdf
xamarin.forms
xamarin.uwp
asked on Stack Overflow Mar 19, 2019 by David Shochet • edited Mar 19, 2019 by David Shochet

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0