We are in the process of testing GD Picture for use in a workflow where we need to add, move and delete pages in a PDF file. The plugin works very well in regards with time spend on commands and the quility of the resulting PDF.
However the size of the PDF growns after each command is saved.
I have tried used the code of the post 'Reducing PDF size by altering the embedded images [UPDATED]'
but the resulting size is the same.
The PDF is created in InDesign and consist of shapes with different fill color and text.
Is there anything I need to be doing for the size to be smaller ?
I'm using a month old version of the 9 series.
Thanks in advance
Torben Nielsen
Code: Select all
[code]String const_src = @"C:\Udvikling\high_src.pdf";
String dst = @"C:\Udvikling\high_dst.pdf";
// At this point the files are the same size: 32.888 bytes
GdPicturePDF pdf = new GdPicturePDF();
pdf.LoadFromFile(const_src, true);
GdPicturePDF pdf2 = new GdPicturePDF();
pdf2.LoadFromFile(dst, true);
// CLONE PAGE
pdf.ClonePage(pdf2, 1);
pdf.SaveToFile(dst);
// At this point the destination file is: 153.687 bytes
// MOVE PAGE
pdf.MovePage(pdf.GetPageCount(), 2);
pdf.SaveToFile(dst);
// At this point the destination file is: 258.883 bytes
// DELETE PAGE
pdf.DeletePage(2);
pdf.SaveToFile(dst);
// At this point the destination file is: 348.677 bytes
// CLONE PAGE
pdf.ClonePage(pdf2, 1);
pdf.SaveToFile(dst);
// At this point the destination file is: 459.199 bytes
// MOVE PAGE
pdf.MovePage(pdf.GetPageCount(), 2);
pdf.SaveToFile(dst);
// At this point the destination file is: 564.395 bytes
// DELETE PAGE
pdf.DeletePage(2);
pdf.SaveToFile(dst);[
// At this point I have added, moved and deleted a page 2 times.
// At this point the document only consist of the original pages
// The size of the PDF has grown from 32.888 bytes to 654.192 bytes
pdf.Dispose();
pdf2.Dispose();