Not sure if you want to class this as a bug or not but think it’s an important point for others who might try it so changed the thread back to public in case it helps others. This works, running the OptimizeResources() on the PDF before it was first saved didn’t work but optimizing the PDF once you open it fresh does work. Var optimizedPdfTempFile = Path.GetTempFileName() FEATURES Unlimited This PDF and PNG Merger is free and provides you to use it unlimited times and merge PDF and PNG. Secure Backup: keep a safe copy of your files on the cloud or locally. Image Manager: single and batch image processing. Way beyond zipping with the NEW WinZip Pro Apps: PDF Express: much more than a PDF reader. On a hunch I tried saving the PDF to disk then re-opening it and trying the optimize again thinking there might be a bug in Aspose that meant it didn’t handle compression of the image streams properly so did this: pdf.Save(pdfTempfile, ) WinZip for Windows 7 and 8 The worlds leading Zip utility: unzip 17+ major compression formats. PS: For info the PNG images used to generate the PDF have a total size of about 240MB, with Generator code the PDF was about 300MB using CompressionLevel 9 Page.CropBox = new (0, 0, b.Width, b.Height) Ī image1 = new () īit confused as the Image quality setting seems to be having no effect. MemoryStream mystream = new MemoryStream(tmpBytes) Using (FileStream fs = new FileStream(tempfile, FileMode.Open, FileAccess.Read))įs.Read(tmpBytes, 0, 32(fs.Length)) Download the merged files instantly or send a download link to email. This includes Adobe Reader, Foxit Reader, and Firefox.I also tried dropping the ImageQuality to 10 and that had 0 impact, PDF was still 600+MB, am I maybe adding the files in a way that is stopping the image compression working, I have a loop over the images doing the following: var page = () Note that only some PDF readers can view attachments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |