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

Generating custom pdf on a UWP desktop app.

Thread ID:

Created:

Updated:

Platform:

Replies:

129725 Mar 30,2017 01:10 PM UTC Apr 26,2017 07:49 PM UTC UWP 7
loading
Tags: Pdf
Dachi Gogotchuri
Asked On March 30, 2017 01:20 PM UTC

Hi!We are researching to start using the Syncfusion.Data.UWP.dll on our project. But first we have some question of the limitations of this library.Our need is to emulate like an ReportPlatform and create some pdf locally without internet connection. This pdf, need some dynamic charts and fill pdf forms.Is it possible to create dynamic charts with some json data to illustrate in the pdf while? Or it's only available as an image.If we create a new pdf from c#, can we use custom fonts and styles?If creating custom fonts and styles from c# is not available, can we load an pdf form and add some images/paragraph between the existen paragraphs or images?If I edit an pdf form document with custom fonts and styles. Adding some images and save it. Will this library maintain the original fonts and styles?Any recommendations that we should have in mind to create this feature?Thank you very much and have a nice day!

Prakash Viswanathan [Syncfusion]
Replied On March 31, 2017 12:16 PM UTC

Hi Dachi, 
 
Thanks for contacting Syncfusion support. 
 
This pdf, need some dynamic charts and fill pdf forms 
We can fill PDF forms using Essential PDF library, please refer below link, 
 
Is it possible to create dynamic charts with some json data to illustrate in the pdf while? 
Kindly find the sample for exporting chart as PDF.  
Sample: ExportToPDFUWP_png  
can we use custom fonts and styles? 
Yes, we can use custom fonts in PDF by providing the custom font as stream in PdfTrueTypeFont. We can set custom styles for text while drawing text.  Please refer below link for drawing text using different fonts., 
 
 
Essential PDF provides various inbuild styles for tables. We can use inbuild styles, also we can set custom styles to the tables. Please refer below links, 
 
 
 can we load an pdf form and add some images/paragraph between the existen paragraphs or images?If I edit an pdf form document with custom fonts and styles. Adding some images and save it. Will this library maintain the original fonts and styles? 
We could not add text/images in between the existing paragraphs/images.  
 
As PDF is a position based document, we could add text and images but we could not move the text/image in the PDF document.  
 
Yes, Essential PDF will maintain the custom fonts and style as it is in the PDF document. 
 
Please refer below link to add images in existing PDF document, 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V 


Dachi Gogotchuri
Replied On April 3, 2017 08:29 AM UTC

Prakash V,

Thank's for responding. I had an another question.

Can Syncfusion.DataUWP.dll read an encrypted or security applied document? I see that we have an option for encrypt data but not for desencrypt it.

Regards,
Dachi Gogotchuri

Balamurugan Rajaraman [Syncfusion]
Replied On April 5, 2017 09:08 AM UTC

Hi Dachi 
We have analyzed your query and “Syncfusion.Data.UWP.dll” process the files and not the documents. Please let us know your requirement clearly. If you are looking to process documents, then you can use one of the XlsIO, PDF and DocIO libraries based on the file you are processing. Please refer the below documentation links. 
In PDF you can able to load encrypted or security applied PDF document in UWP application. you can change or remove the security of PDF document using Syncfusion.Pdf.UWP.dll. We have created the sample as per the requirement and attached the sample for your reference .you can get it from the below location. 
  
 
 
Regards, 
Balamurugan R. 


Dachi Gogotchuri
Replied On April 25, 2017 09:13 AM UTC

Thank's Syncfusion.

There is a way to show up this Pdf's as a Collection of BitmapImages in a Universal Windows Platform App? Without saving it and reading it as a Windows.Data.Pdf.PdfDocument?

May we will have the same problems on Web and Xamarin.

Thank you!

Dachi Gogotchuri
Replied On April 25, 2017 10:22 AM UTC

Trying to show up with an SfPdfViewerControl in a UWP App throws this error:

   at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
   at Syncfusion.Windows.PdfViewer.PdfFlipView.InitializeComponent()
   at Syncfusion.Windows.PdfViewer.PdfFlipView..ctor()
   at Syncfusion.Windows.PdfViewer.SfPdfViewerControl..ctor()

Dachi Gogotchuri
Replied On April 25, 2017 04:04 PM UTC

Is there a easy way to get PdfDocument form an PdfLoadedDocument? All Syncfusion types. I'm trying to insert a image in a PdfLoadedDocument who previously is filled as an PdfLoadedForm.

Thank's and greetings!

Navaneetha Kannan Sudalai Muthu [Syncfusion]
Replied On April 26, 2017 07:49 PM UTC

Hi Dachi,  

Thank you for using Syncfusion product. 

Query 
Details 
 
Is there a easy way to get PdfDocument form an PdfLoadedDocument? All Syncfusion types. I'm trying to insert a image in a PdfLoadedDocument who previously is filled as an PdfLoadedForm. 
 
The images can be added into an existing PDF document using the below code snippet, 
 
StorageFile SF_In = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Sample.pdf")); 
 
//Load the PDF document. 
PdfLoadedDocument document = PdfLoadedDocument(await SF_In.OpenStreamForReadAsync()); 
 
StorageFile SF_In1 = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///syncfusion_logo.jpg")); 
 
//Load the image from the disk 
PdfBitmap bmp = new PdfBitmap(await SF_In1.OpenStreamForReadAsync()); 
 
//Draw the image 
document.Pages[0].Graphics.DrawImage(bmp, new RectangleF(420, 25, 150, 40)); 
 
//Create the memory stream. 
MemoryStream SourceStream = new MemoryStream(); 
await document.SaveAsync(SourceStream); 
document.Close(true); 
Save(SourceStream, "Sample.pdf"); 
 
Please find the sample from the following link, 
 
 
Trying to show up with an SfPdfViewerControl in a UWP App throws this error: 
 
   at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation) 
   at Syncfusion.Windows.PdfViewer.PdfFlipView.InitializeComponent() 
   at Syncfusion.Windows.PdfViewer.PdfFlipView..ctor() 
   at Syncfusion.Windows.PdfViewer.SfPdfViewerControl..ctor() 
 
 
This issue may occurred due to referred assemblies were not available with proper folder structure. The assemblies and payload files should be placed as in the same folder structure in the below screenshot:  
  
  
Folder structure inside Syncfusion.Pdf.UWP:  
 
   
 
Folder structure inside Syncfusion.SfPdfViewer.UWP:  
 
   
 
You can also use our Syncfusion UWP NuGet for properly referring the PDF viewer UWP assemblies which is available in the following link:  
  
 
 
 
There is a way to show up this Pdf's as a Collection of BitmapImages in a Universal Windows Platform App? Without saving it and reading it as a Windows.Data.Pdf.PdfDocument? 
 
May we will have the same problems on Web and Xamarin. 
 
 
 
UWP: 
 
It is not possible to get the pages of a PDF as BitmapImages. But it is possible to get the pages as Images (Winows.UI.Xaml.Controls.Image) using the method SfPdfViewerControl.GetPage() 
 
Please find more details about this method from the following link.  
 
 
 
Web platforms: 
 
In web platforms also, we cannot get PDF pages as BitmapImages. But the pages can be exported as Bitmap using the method PdfLoadedDocument.ExportAsImage(). We have attached a simple sample for your reference at the following link.  
 
 
 
Xamarin: 
 
At present, there is no support for exporting PDF pages as images in PdfViewer in Xamarin platforms.  
 
 
 

Please let us know if you need any further assistance.  
Best, 
Navaneetha Kannan  


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

;