Hi,
Thank you for the reply. I used the Web API to generate the PDF. It was successful. But it is having something (Created by Syncfusion) on its header.
How to remove that? I have attached the image.
Thanks,
Nirushini
Is DocToPdfConverter for .net core available now?
Vijay,
thank you for this answer, I subscribed to this post, and hope to get a solution soon.
System.Drawing is not thread safe, so I hope your engineers will use a more modern library in the conversion to avoid any issues on ASP.NET Core.
Pieter
Vijay,
looking to the sample, the Web Api is not really converting the document from Asp.net core, but it is recreating a new document and returning that after conversion. I only have experience with asp.net Core api, not with the web api. Do you think it is possible to have a sample web api that receives the word document and returns that as PDF?
That would really help me, thanks
Pieter
Query |
Details |
Is DocToPdfConverter for .net core available now? |
No. As mentioned in our earlier update, Essential DocIO uses the System.Drawing and GDI functionality for Word to PDF conversion. Since the unavailability of this functionality in ASP.NET Core, direct Word to PDF conversion in ASP.NET Core using Essential DocIO is not yet implemented. |
System.Drawing is not thread safe, so I hope your engineers will use a more modern library in the conversion to avoid any issues on ASP.NET Core. |
Currently Essential DocIO uses the System.Drawing functionality in Word to PDF conversion alone. We do have a plan to analyze and do implementation on this feature based on the availability of above mentioned functionality in ASP.NET Core. At this moment, we cannot provide any concrete timeline for this feature. We will let you know once this feature has been implemented. |
Do you think it is possible to have a sample web api that receives the word document and returns that as PDF? |
We have prepared a sample to meet your requirement and in this sample, we have done the following things. 1. Browsed the Word document using file type in form. 2. Performed Mail merge in the input Word document. 3. Sent input Word document as stream to Web API (service) application. 4. In service side, gets stream (input document), converted it into PDF, and return the response with resultant PDF. 5. In core side, received the PDF stream and return as PDF file. Please find the samples which illustrates the same from below link, and let us know if this helps you. ASP.NET Core sample application: http://www.syncfusion.com/downloads/support/forum/131672/ze/Sample-AspNetCore-F131672-250843909.zip ASP.NET Web API (service) application: http://www.syncfusion.com/downloads/support/forum/131672/ze/Sample-ServiceWebAPI-F131672118373474.zip |
SThank you so much, this is really helpful. I suggest to remove the template.doc from the service, just for clarity. I tried this and it works great.
System.Drawing is planned for Core 2.1 (Q4), and looks like it will be made available on top of 2.0 as well.
May I suggest to consider using ImageSharp or SkiaSharp in stead of System.Drawing, as it would make your PDF conversion immediately available on all supported platforms, including Xamarin.
See https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-image-processing/
Hi, I have started to use the converter api from the sample, but I have an issue I hope you can help with.
Most converts well, but one of the charts only converts partially. I have attached the original, and the pdf converted doc. The original document was created with DocIo chart. I removed part of the document in Word.
Can you please have a look?
Yes! ImageSharp is very powerful graphics library in .Net Core. I use it almost 1 year and very happy. It is better than old System.Drawing.