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.
Unfortunately, activation email could not send to your email. Please try again.

convert xaml to pdf?

Thread ID:

Created:

Updated:

Platform:

Replies:

114548 Nov 23,2013 09:47 PM Jun 4,2018 05:56 AM WinRT 7
loading
Tags: PDF
Nate Snowball
Asked On November 23, 2013 09:47 PM

I'm developing a LOB app for my company.  The app has forms and auto-complete textboxes for people to fill out.  Can syncfusion convert an xaml grid to pdf similar to the new api in windows 8.1 where you can render an xaml to bitmap?


If not, how would I go about using syncfusion to convert the generated bitmap into pdf? 


George Livingston [Syncfusion]
Replied On November 26, 2013 03:55 AM

Hi Nate,

Thank you for using Syncfusion product.

Yes it is possible to insert the images into the PDF document. At present, we do support JPEG encoded images.  Please find the sample available in the link below,

DrawImageSample.zip

Please let us know if you need any further assistance.

Regards,

George


Nate Snowball
Replied On November 26, 2013 08:17 PM

Can you please give me an example where the image is already generated in the app and not from a file?  Remember that my app takes a snapshot of the xaml grid and creates a bitmap out of it.  What I'm trying to do now is create a pdf file out of this image.


George Livingston [Syncfusion]
Replied On November 27, 2013 05:56 AM

Hi Nate,

Thank you for your update.

We have created the sample to convert XAML to bitmap and then to PDF, Please find the sample available in the link below,

http://www.syncfusion.com/downloads/support/directtrac/116000/XamlToPdfWinRT-1905009446.zip

Please let us know if the solution helps.

Regards,

George


Nate Snowball
Replied On November 27, 2013 12:10 PM

One last question.  How do I set the page orientation?  I know it should be something obvious, but I can't seem to get it.  Many thanks.


George Livingston [Syncfusion]
Replied On November 28, 2013 07:54 AM

Hi Nate,

Thank you for your update.

Please use the below code snippet to set the page orientation, herewith we have attached the sample for your reference.

PdfDocument document = new PdfDocument();

document.PageSettings.Orientation = PdfPageOrientation.Landscape;

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/115661/XamlToPdfWinRT1456811131.zip

Please let us know if you need any further assistance.

Regards,

George


Syed Faisal Shah
Replied On June 1, 2018 01:48 AM

H,

When I try to download the sample it says access denied.

Sowmiya Loganathan [Syncfusion]
Replied On June 4, 2018 05:56 AM

Hi Nate, 

Please find the below KB link to convert XAML to PDF in UWP platform, since we have marked WinRT as classic platform. 


Please let us know if you have any concerns. 

Regards, 
Sowmiya L 


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.

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.

;