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. Image for the cookie policy date
close icon

How to do a library with PDF functionality

I am creating an application which will run in both WPF and another application, using the same functionality in ASP.net MVC.
the application needs to read/write/edit PDF files.
How can I gain the PDF functionality and have the  code be in just one library API that both the windows WPF app and an MVC app can call on?

Thank you

2 Replies

JA Juan Acosta December 5, 2016 06:27 AM UTC

Hi Daniel,

In my experience, I will recommend to you to make a project called 'pdfFunctionality' that contains all the pdf library functionality and required library dependencies and add that project to the WPF complete solution.
Use itextsharp library.
https://sourceforge.net/projects/itextsharp/
That is a powerful library for pdf manipulation.
When you have the required functionality in WPF solution working perfectly and tested. You can export the pdfFunctionality.dlls and added to the MVC solution as  a reference. Then you can use the objects from the library that you create and import.

There are some important considerations to take into account.
1. Pdfs libraries can have very heavy functions to process in the frontend, so, be very careful in what you want to achieve with that library.
2. MVC can be responsive too and the functionality of those libraries could present issues with mobile. I'm not quite sure about it, you will have to make a POC with a mobile and tested on a real device to be 100% sure works fine. 
3. With calls to MVC to that libraries, probably you will have to use asynchronous code. You need to check the performance when using the functions.
4. There is a better way to do this but implied create an API and manage the library in the backend. It will be more work for sure, nevertheless, the stability of the code will be improved.

I hope this will give you some idea where to start.

Kind regards,

Juan



GR Gayathri Ramalingam Syncfusion Team December 5, 2016 11:31 AM UTC

Hi Daniel, 
Thank you for using Syncfusion products. With the “Syncfusion.Pdf.Base” reference you can able to achieve your requirement in both WPF and ASP.NET MVC application. 
The Essential PDF library has the same API which works in both WPF and ASP.NET MVC. 
 
Please find the UG documentation from the below link to achieve your requirement. 
Please let us know if you need further assistance.  

With Regards, 
Gayathri R 


Loader.
Live Chat Icon For mobile
Up arrow icon