我正在使用itextsharp
来压缩PDF文件,但是当我尝试压缩时,它没有像我预期的那样压缩(从4.5 mb到4.4 mb)。有关如何改进压缩的任何建议吗?
这是我的代码:
string pdfFile = @"c:\Img_Comp\Bigfile.pdf";
PdfReader reader = new PdfReader(pdfFile);
PdfStamper stamper = new PdfStamper(reader, new FileStream(@"c:\Img_Comp\Small.pdf", FileMode.CreateNew), PdfWriter.VERSION_1_5);
stamper.FormFlattening = true;
stamper.Writer.CompressionLevel = PdfStream.BEST_COMPRESSION;
stamper.SetFullCompression();
stamper.Close();