-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pdf generation and manipulation library in Net Core 2 with permissive license #888
Comments
We don't have any plans to provide a PDF library. I'm also not aware of one to recommend. Hopefully the community will work more of PDFSharp. |
@guylando though late to the party but here is a good one for pdf generation |
@aqibgatoo, can we convert a .doc file to pdf using Rotativ .NetCore? |
@Phyrom i don't think so . You can generate images and pdf files from it. The pdf generator that i ended using up is a slighlty modifed running version of it with the package reference as. |
@aqibgatoo we are looking to generate a pdf document describing a list of objects (a page for each object) including inserting text, images, styling, bullets. Rotative can be used for that? (basically export objects to pdf) |
@guylando yes, it has different ActionResults available which you can easily use. For the example below you have to just design your view and pass the model accordingly.
link to the one that i am using. |
hey , you can try zetpdf.com.. By using it you can edit , view and manipulate PDF easily. |
I'm just starting to look into this myself, and it looks like the SkiaSharp library can generate PDFs. https://docs.microsoft.com/en-us/dotnet/api/SkiaSharp.SKDocument.CreatePdf |
@jnm2 the pdf abilities of SkiaSharp as far as I understand are more for exporting images into pdf and not for normal pdf textual documents creation. And the documentation and examples online are very poor. It is not made for pdf's and do not provide the desired abilities as good as libraries like pdfsharp which specialize in pdf. |
@guylando I'm getting nice vectors and text out of it with a simple sample. This is what I expected because the drawing commands provide the information to generate the PDF properly. I'm sure Skia does some advanced things that aren't representable in a PDF except as raster graphics. The documentation for the Found https://skia.org/dev/design/pdftheory which might also help. |
@jnm2 It might be possible but I mean we try to avoid using things which we will be of the few who use it for the use-case and will have a lot of overhead over using some popular library for the use-case and I get the feeling that SkiaSharp is not popular for this use case. The basic google search shows that the pdf related code of SkiaSharp is mostly dealing with drawing on canvas. So yes you can draw text on canvas however that is far from the simple methods such as "AddPage" available in pdfsharp if we want to create a multi page pdf export of some data. I can also write pdf generator myself in C if I put enough time into it but that is not the goal :) So we are looking not only at the fact of whether it is possible or not. |
@guylando SkiaSharp has BeginPage/EndPage and lets you set PDF metadata. It's pretty high level, nothing like if you wrote a PDF generator yourself. I do understand that it's not a PDF-centric library; we still need something that can manipulate PDFs. But for folks looking to generate, this may be one of the easiest options depending on your use cas. |
@jnm2 Thanks, I will check this out when I get to the conversion to net core (which will be a must when asp.net 3 is out since it only supports net core from what I understood).
|
@jnm2 Note however that pdfsharp already has some net standard ports (and even a claim that it works as is in net core 2.2) as written in the final comments here empira/PDFsharp#6 but they are not official (unless the claim it works with net core 2.2 is true) and not as well supported as SkiaSharp which turns SkiaSharp into a better option probably |
The ITextSharp library has the AGPL license which is problematic for commercial use.
The pdfsharp library does not have a maintained support for net core yet: empira/PDFsharp#6
Are there any plans to build some pdf handling package by the core team or by the net foundation team?
Anybody is aware of some pdf manipulation library in net core 2 with permissive license for commercial use?
This is currently a major issue for our company which prevents us converting our projects to netcoreapp2.0 and forces us to keep compiling for net461.
The text was updated successfully, but these errors were encountered: