Reduce filesize of pdf
Asked Answered
J

2

6

I have a pdf that is around 4MB in size. When I open it in Adobe Acrobat (version 8) and go to File -> Save as the resulting pdf is only 137KB.

This pdf is 67 pages big, each page looking very similar to the other, with only some numbers changed: same background, same fonts, almost same text, ... It has been created using Cete DynamicPDF Merger from individual pdf files.

What I think could be a possible cause are the fonts: when I check file->properties and look at the Fonts tab I see that the same font has been included multiple times in it. The new pdf that Acrobat saves only has that font once.

Is there a tool (preferably a .NET library) that would allow me to compress pdf's files like that one similar like Acrobat does?

Jade answered 29/1, 2010 at 12:37 Comment(2)
Why don't you just use Acrobat? It has an automation interface that you can use from a .NET program.Pga
Note: The Adobe SDK can't be installed with Express version of VB. A good reason to try something else if you don't have the budget.Egor
D
1

You may try with iTextSharp. I've been using it for a long time and I'm satisfied with the resulting PDF size:

Document.Compress = true;
var reader = new PdfReader("input.pdf");
using (var output = File.OpenWrite("output.pdf"))
{
    new PdfStamper(reader, output).Close();
}
Duncandunce answered 29/1, 2010 at 12:53 Comment(1)
I've just tried out iTextSharp, but without much luck: 1) I tried that code sample but the resulting pdf isn't really much smaller 2) I've tried to use iTextSharp to merge the pdf files together instead of using the merger from CeTe software, but I don't notice any decrease either.Jade
D
0

To reduce file size in Adobe acrobat itself please follow below steps:

Open the file in adobe acrobat Select File -> Save as and then save the file with different name. This worked for me. or you can try print options and save it.

If you have adobe sign in credentials then go to File -> Compress file option, once after login you can achieve it.

Dire answered 29/1, 2021 at 6:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.