Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering e-books (say .epub and .pdf) in UWP Apps (universal apps)

What's the status here?

Some time ago, PDF rendering worked, but only slow and rudimentary. .epub rendering might have worked, I'm not sure, but since it has been removed from Edge, is there any chance at all?

Any third party solutions?

like image 918
non-user38741 Avatar asked Dec 18 '25 10:12

non-user38741


1 Answers

Did you take a look at the PdfDocument sample from the UWP samples repository? In this sample it is shown how to read a pdf file, convert it to an image, and then show this image in an Image control (in the Scenario1_Render.xaml.cs file to be exact).

Since the whole PDF is loaded once, and only one page is rendered when requested I have found this to be quite fast.

As for the .epub files, I have found ASPOSE that provides API's to convert .epub to either PNG or PDF (for the latter you can then use above mentioned method to render the individual PDF pages). You can also try to find other API's that convert .epub to either PNG or PDF, if you want to render them in a visually attractive manner. Otherwise you could use EpubSharp to convert the .epub to plain text.

like image 65
Leander Avatar answered Dec 21 '25 01:12

Leander



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!