We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I view included pdf in the project?

Thread ID:

Created:

Updated:

Platform:

Replies:

115216 Jan 5,2014 09:02 PM UTC Jan 6,2014 05:20 AM UTC WinRT 1
loading
Tags: General
Nate Snowball
Asked On January 5, 2014 09:02 PM UTC

I'm sorry for wasting your time.  This seems simple, but all the examples only show showing pdf files from picker.  I can't seem to find any example for showing a pdf file that is included in the project.  What is the code for this?  Thank you for being patient with me.


Suresh M [Syncfusion]
Replied On January 6, 2014 05:20 AM UTC

Hi Nate,

 

Thank you for using Syncfusion products.

 

Please find the sample available in the link below which demonstrates loading PDF document (Barcode.pdf) which is included in the project with the build action set to Embedded Resource. Also find the code snippet to do the same below.

 

Code snippet:

Assembly assembly = typeof(MainPage).GetTypeInfo().Assembly;

Stream fileStream = assembly.GetManifestResourceStream("PDFViewerWintRT.Assets.Pdf.Barcode.pdf");

byte[] buffer = new byte[fileStream.Length];

fileStream.Read(buffer, 0, buffer.Length);

PdfLoadedDocument ldoc = new PdfLoadedDocument(buffer, "syncfusion");

           

pdfViewer.LoadDocument(ldoc);

 

Sample Link: PDFViewerWintRT_2013.zip

 

Please let us know if you need any further assistance.

 

Thanks,

Suresh


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;