non-user38741
non-user38741

Reputation: 871

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?

Upvotes: 3

Views: 260

Answers (1)

Leander
Leander

Reputation: 859

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.

Upvotes: 3

Related Questions