rendering pdf content in windows store apps
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/1.jpg)
![Page 2: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/2.jpg)
Rendering PDF content in Windows Store apps
Chetan ParulekarPrincipal Development Manager3-175
![Page 3: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/3.jpg)
Introduction to the PDF APIsRendering PDF as imagesCustomizing your PDF renderingBest practicesRendering PDF to a DirectX surface
Agenda
![Page 4: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/4.jpg)
Introduction to the PDF APIs
![Page 5: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/5.jpg)
Introduction to the PDF APIs – a magazine app
Demo
![Page 6: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/6.jpg)
OverviewImplementation 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
![Page 7: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/7.jpg)
Rendering PDF as images in your app
![Page 8: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/8.jpg)
Rendering a PDF page in a Windows Store app
Demo
![Page 9: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/9.jpg)
In summaryThe 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
![Page 10: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/10.jpg)
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
![Page 11: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/11.jpg)
Customizing PDF rendering
![Page 12: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/12.jpg)
Rendering PDF content at various zoom levels
Demo
![Page 13: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/13.jpg)
In summaryUse 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
![Page 14: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/14.jpg)
Best practices when using PDF APIs
![Page 15: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/15.jpg)
A sample app that demonstrates some best practices when using the PDF APIs
Demo
![Page 16: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/16.jpg)
Best practicesUse 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
![Page 17: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/17.jpg)
Rendering PDF to a DirectX surface
![Page 18: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/18.jpg)
Rendering PDF content to a DirectX surface using SurfaceImageSource
Demo
![Page 19: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/19.jpg)
ResourcesWindows 8.1 Preview SamplesWindows 8.1 Preview: New APIs and features for developers
![Page 20: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/20.jpg)
Evaluate this session
Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize!
![Page 21: Rendering PDF content in Windows Store apps](https://reader036.vdocument.in/reader036/viewer/2022062302/56816739550346895ddbed13/html5/thumbnails/21.jpg)
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.