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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Change ImageResolution
  FAQ FAQ  Forum Search   Register Register  Login Login

Change ImageResolution

 Post Reply Post Reply
Author
Message
Karsten View Drop Down
Beginner
Beginner


Joined: 27 Apr 09
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karsten Quote  Post ReplyReply Direct Link To This Post Topic: Change ImageResolution
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 08 Apr 13 at 10:05AM
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
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store