1 / 21

Rendering PDF content in Windows Store apps

Rendering PDF content in Windows Store apps. Chetan Parulekar Principal Development Manager 3-175. Agenda. Introduction to the PDF APIs Rendering PDF as images Customizing your PDF rendering Best practices Rendering PDF to a DirectX surface. Introduction to the PDF APIs. Demo.

ayame
Télécharger la présentation

Rendering PDF content in Windows Store apps

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rendering PDF content in Windows Store apps Chetan Parulekar Principal Development Manager 3-175

  2. Agenda • Introduction to the PDF APIs • Rendering PDF as images • Customizing your PDF rendering • Best practices • Rendering PDF to a DirectX surface

  3. Introduction to the PDF APIs

  4. Demo • Introduction to the PDF APIs – a magazine app

  5. Overview • Implementation derives from the ISO 32000-1 standards • Abstracts away all the format complexity from the developer • Focus is on rendering of PDF content as an image • APIs enable reading scenarios such as magazines • PDF APIs in Windows 8.1 Preview

  6. Rendering PDF as images in your app

  7. Demo • Rendering a PDF page in a Windows Store app

  8. In summary • The PDF APIs allow you to render individual pages of a PDF document into streams as images • The default rendering occurs with: • 100% page size • White as the page background color • PNG as the image encoding format • Rendering PDF as images in your app

  9. Working with password-protected PDF files • Use the LoadFromFileAsync(file, password) or LoadFromStreamAsync(stream, password) APIs with the password string parameter • Rest of your code remains the same • Rendering PDF as images in your app

  10. Customizing PDF rendering

  11. Demo • Rendering PDF content at various zoom levels

  12. In summary • Use PDFPageRenderingOptions along with the RenderToStreamAsync API • Customization options include: • Output resolution • High contrast • Page region to be rendered • Image encoding format • Background color • Customizing the rendering

  13. Best practices when using PDF APIs

  14. Demo • A sample app that demonstrates some best practices when using the PDF APIs

  15. Best practices • Use techniques such as UI virtualization to render only pages in and around the view • Hold on to rendered pages if one needs to re-render them • Release pages that are no longer needed • Cancel page renderings that are superseded • Render only required portions of the page • Best practices when using PDF APIs

  16. Rendering PDF to a DirectX surface

  17. Demo • Rendering PDF content to a DirectX surface using SurfaceImageSource

  18. Resources • Windows 8.1 Preview Samples • Windows 8.1 Preview: New APIs and features for developers

  19. Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session • Scan this QR codeto evaluate this session and be automatically entered in a drawing to win a prize!

More Related