Generate a PDF document using .NET Standard 2.0 - c#

I am trying to find a way how to generate a custom PDF document from .NET Standard 2.0. Free or Open-Source library would be of the preference in this case.
I Have already tried PDFSharp, but it does not support .NET Standard 2.0 (or am I wrong here?) and several ports of this library, which all claim to be .NET Standard, do not have the System.Drawing.Common which is necessary to actually write anything to the document.
Does anyone have any suggestion on how could I generate a PDF with my above-mentioned criteria? It does not really matter if I would have to first write HTML and then convert it to PDF or per se convert excel type to PDF. Anything that could give me a PDF would be great.

Related

Create PDF/A with WKHTMLTOPDF w/o using Ghostscript?

We use WKHTMLTOPDF to create PDF documents out of HTML in our C# Project.
But we have to be PDF/A compliant with our PDF-Files.
At the moment we use another external component to convert from PDF to PDF/A
Is there no direct way to generate PDF/A compliant documents with WKHTMLTOPDF?
Maybe a WKHTMLTOPDF "Fork" or something?
Not currently (has been an open issue since 2014)
PDF/* are SUPERsets (designed by committee) of good old functional PDF 1.0 ideals.
That is certain things MUST and must NOT be included.
WKHTMLTOPDF is built on QT WEBKIT viewer where those requirements are not needed in order to display PDF i.e. it can display some but not all conforming and non conforming PDFs, its a PDF viewer not creator.
You can as you know use GS to adjust and create the parts needed for some PDF conformances
Your best viable alternative is to use open source iText 7 specifically:-
https://github.com/itext/i7n-pdfhtml
an iText 7 add-on for C# (.NET) that allows you to easily convert HTML and CSS into standards compliant PDFs

.NET Core PDF and RTF document generation

Looking for suggestions for libraries that can generate PDF and RTF documents from stored data (not "HTML to PDF" or "URL to PDF"). With all functionality for adding images, encryption etc. We are currently looking for an alternative to PDFSharp-MigraDoc-GDI, which, although works with .NET Core, does not fully support it and we see compiler warnings - "This package may not be compatible with your project". We have also been getting issues on the IIS tier regarding GDI+. We've decided to play it safe and find an alternative. Does anyone have a solution that they would recommend? Thanks
As far as I know, you can write whole new documents using the Microsoft.Office.Interop library, here is this post that's talk about it (be careful about deploying things like these, you might need an office instalation running on the server):
https://www.c-sharpcorner.com/UploadFile/muralidharan.d/how-to-create-word-document-using-C-Sharp/
And I've found this post about using the library to print PDFs:
How do I convert Word files to PDF programmatically?
It's not much but hope that it helps, regards!

Best .Net pdf library to generate data tables

I am looking around for a good free .Net pdf library, in particular to generate data in tables easily and flexibly. I have seen iTextSharp but this requires a license from what I've read. There is also PDFSharp which looks promising using MigraDoc for table generation. Is there anything else anyone recommends?
Thanks in advance.
ItextSharp 4 released under the GNU Lesser General Public License (LGPL)
by using version 4 or earlier you can use without having to buy a license.
For version 4 heres the link, download the code and in bin folder you will get ITextsharp old version dll
itextsharp 4
Here the updated Itextsharp dll
Or you can also use client side PDF generation using Jspdf

Parsing Windows Journal (JNT) files

According to .NET docs here, it should be possible to convert JNT files into XML using the Microsoft.Ink.JournalReader.ReadFromStream component. However, all the code samples on MSDN are old and don't work with Windows 7 x64 and the current version of Windows Journal. In particular, JournalReader.ReadFromStream throws a runtime type mismatch error when reading a JNT file stream.
The most recent code sample I could find targets .NET 3.0; the API docs for .NET 4.0
describe the JournalReader.ReadFromStream component, but the code samples are blank. Is there any up-to-date information on converting JNT format to XML?
Please work on this. You could extract the text and merge it in an invisible layer with pdfs created from the JNTs. Then they would also be searchable.
One possibility is to batch print them to PDF. Then parse the PDF. You can find scripts for batch printing to PDF in the Journal Note to PDF repo.

Highlighting PDFs programatically in .net - are there any APIs or Libraries to generate offset file or is there a better method?

I need to programatically highlight PDFs on the fly, preferrably using the highlight file method.
Are there any .net programming libraries to generate a xml highlight offsets file for a pdf? Doesnt have to be open source or free.
I tried converting PDFBox to a .net DLL using IKVM and it did not work correctly. Im not terribly excited about the memory footprint of the entire java class library in the DLL anyway.
a second option would be to regenerate and highlight the source PDF, if there are any libraries / APIs that will do this to a PDF relatively easily that would work too, but I have not found any in my searches.
thanks in advance.
I dont know if this has solution for your requirement, but this is a good opensource api to work with PDF. I will be so happy if it could help your needs.
http://itextsharp.sourceforge.net/tutorial/index.html

Categories

Resources