Hello,
at first I want to thank you for the great library you provide.
Now I'm a bit in a tricky situation and I hope you can help.
I'm creating a PDF containing three tables. One in the header, one in the body and one in the footer.
This PDF can be rather long (70 DIN-A4 pages each page has about 40 rows in their table). Each page as a bookmark, so the user can jump to them easily. The fonts are not embedded in the pdf, I use the fonts coming from windows. The size of the file is about 10MB. Which is way to big.
I guess the cause of this is that each line of the main body table contains two pictures which I create in runtime. These are only Icons (36*36px) and pictures which have a maximum size of 200x50px. Resolution is 72 in horizontal and vertical.
I put the images in the chart by converting them into binary and add them to to cell.
Code:
string strRedRectangle = "base64:" + Convert.ToBase64String(byRedRectangle);
cell.AddImage(strRedRectangle).Width = "5pt";
Each picture is about 2kb.
How can optimize the size of the pdf file? Because I've read that the 'released' dll creates much smaller files than the 'debug' version of pdfsharp, I'm using the release version of pdfsharp.
I cannot make the icons smaller
Has someone a suggestion?
A third party console application which can be called after creating the pdf to make it smaller is also welcome.
Thank you!