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:
Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
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
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more