PDF is graphics language, not reporting language. maybe you want a reports toolkit that supports pdf output.
to your question. you would write code to handle the indenting and numbering, similar to the logic you would use with Console.Write()
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I am new to C#, I am creating a small application, and I need to generate some PDF reports from C# application programmatically. Most of the reports will be Word-like multilevel lists with hierarchical numbering (these numbers have to be calculated automatically). And I want that the levels have indent from the left. I tried several PDF libraries, but none of them can calculate hierarchical numbering. Maybe someone could tell me some library, or how to do it without a library?
I mean something like this:
PDF is graphics language, not reporting language. maybe you want a reports toolkit that supports pdf output.
to your question. you would write code to handle the indenting and numbering, similar to the logic you would use with Console.Write()
or how to do it without a library?
Just use :
PrintDocument.PrinterSettings.PrinterName = "Microsoft Print to PDF";
PrintDocument.PrinterSettings.PrintToFile = true;
PrintDocument.PrinterSettings.PrintFileName = "your_pdf_filename"";
and you can draw/write anything in PrintPageEventHandler which will be saved into the .pdf file