Click here to Skip to main content
15,935,248 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
How to generate PDF without using any third party tool (like Syncfusion, Apitron etc.)



What I have tried:

How to generate PDF without using any third party tool (like Syncfusion, Apitron etc.)
Posted
Updated 4-May-16 21:27pm
Comments
Sergey Alexandrovich Kryukov 5-May-16 3:10am    
"What I have tried" filled with something unrelated to showing what you have tried.
—SA
Pete O'Hanlon 5-May-16 3:12am    
As a general rule, just restating your question in the What I have tried section is a bad idea. That doesn't tell us what you've tried, it tells us the opposite - it says you haven't tried anything.
Sergey Alexandrovich Kryukov 5-May-16 3:35am    
Well, "I did not try anything" would still be better than asking a question in this section or repeating something.

It looks like the apparently right idea of adding this section to the question submission form has failed. Amazingly, even the members who actually show some relevant code samples write them elsewhere, not in this section. I would not expect such behavior if someone asked me to predict what could have happened. :-)

—SA
Pete O'Hanlon 5-May-16 3:38am    
I have to admit, I've rarely seen a worthwhile entry in this section.
Sergey Alexandrovich Kryukov 5-May-16 3:41am    
Very rarely. Human psychology is even more of a mystery than I thought before. :-)
—SA

If you want to save the file without using a 3rd party tool, you are going to have to write code that matches the PDF specification[^]. This is not a trivial task - as you can see, the 1.7 spec runs to 756 pages.

If you are just trying to avoid the cost of purchasing a PDF generation tool, there are some open source[^] ones that you could try. While I use the paid Syncfusion version now, I have had a lot of success with PDFSharp[^], iTextSharp[^] (although you have to be careful what you install with this one as Sourceforge does seem to like to add a lot of rubbish) and Sharp PDF[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-May-16 3:37am    
5ed. You managed to answer much faster, even though I started my answer before yours was posted. :-)
—SA
No problem at all. If you really determined to avoid using any 3rd-party tool, you can always develop a 1st-party tool, because full standard is published under ISO 32000-1:2008. Unfortunately, obtaining the copy of the document is not free of charge.

You can also obtain the description of the standard from Adobe site. In particular, please see http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf[^].

For further detail and good collection of references, please see:
Portable Document Format — Wikipedia, the free encyclopedia[^].

Can you do this work? I doubt it. Nevertheless, there is a good bunch of 3rd-party PDF tools, so a number of teams successfully solved such problems (and the usability of good 3rd-party PDF viewers much better then dreaded Adobe). Anyway, be realistic and carefully examine the feasibility of such project. :-)

—SA
 
Share this answer
 
Comments
Pete O'Hanlon 5-May-16 3:43am    
My 5.
Sergey Alexandrovich Kryukov 5-May-16 3:45am    
Than you, Pete.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900