Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Change ImageResolution |
Post Reply |
Author | |
Karsten
Beginner Joined: 27 Apr 09 Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 08 Apr 13 at 8:36AM |
Hi,
I must reduce the filesize of my PDFs and save as new one. How can I change the imageresolution of alle images to 72 dpi wit QuickPDFLibrary? This code don't do this private static void resizePDF(string source, string target) { PDFLibrary QP = new PDFLibrary(@"QuickPDFDLL0816.dll"); string licenseKey = "...licensekey..."; QP.UnlockKey(licenseKey); int FileHandle = QP.LoadFromFile(source, ""); int numPages = QP.PageCount(); int numImages = QP.FindImages(); for (int i = 1; i <= numPages; i++) { for (int j = 1; j <= numImages; j++) { int idxImage = QP.GetImageID(i); QP.SelectImage(idxImage); QP.SetImageResolution(72,72,2); } } QP.SaveToFile(target); } Regards Karsten Edited by Karsten - 08 Apr 13 at 8:37AM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Karsten!
Changing directly inside a created pdf won't succeed with QP. For my opinion you have to extract all content... then resize the images and then reassamble the pages. If you have luck the new result looks similar to the old one ;-) Sorry. Cheers, Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store