I am trying to use PdfSmartCopy from ItextSharp but I cannot find any relevant examples in c#.
The ideea is that I have a pdf containing form fields and the fields add 700kb to the size of the pdf document. The original document without form fields was 100kb. Any other sugestions are welcome, especially o reduce the pdf size consistently.
(I optimised the generated PDF with adobe acrobat, and it reduced it to 44kb. So there must be a glitch somewhere.) Is there any way to reduce the PDF size?
Edit: FormFlatenning doesn't help. The pdf template file contains only text, lines and tables, no images.
here's my code snippet
PdfReader reader = new PdfReader(GetTemplateBytes());
pst = new PdfStamper(reader, Response.OutputStream);
var acroFields = pst.AcroFields;
pst.FormFlattening = true;
pst.FreeTextFlattening = true;
SetFieldsInternal(acroFields);
pst.Close();