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 > I need help - I can help
  New Posts New Posts RSS Feed - image extraction
  FAQ FAQ  Forum Search   Register Register  Login Login

image extraction

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


Joined: 29 Mar 10
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote snelldl Quote  Post ReplyReply Direct Link To This Post Topic: image extraction
    Posted: 23 Dec 10 at 8:03PM
I am trying to pull images from this pdf: http://www.4dwebdesign.com/uploads/5238.pdf
As you can see, there is at least one image on the first page. However, the following code says there are no images on the first page:
 
int[] intImageTypes = new int[4];
                                                int intFileHandle = qp.DAOpenFile(strTempTargetPath + "/" + e.FileName, "");
                                                int intTotalPages = qp.DAGetPageCount(intFileHandle);
                                                for (int k = 0; k <= intTotalPages; k++)
                                                {
                                                    int intPageHandle = qp.DAFindPage(intFileHandle, k);
                                                    int intImageList = qp.DAGetPageImageList(intFileHandle, intPageHandle);
                                                    int intImageCount = qp.DAGetImageListCount(intFileHandle, intImageList);
                                                    for (int i = 0; i < intImageCount; i++)
                                                    {
                                                        int intImageType = qp.DAGetImageIntProperty(intFileHandle, intImageList, i, 400);
                                                        int intImageWidth = qp.DAGetImageIntProperty(intFileHandle, intImageList, i, 401);

                                                        int intImageHeight = qp.DAGetImageIntProperty(intFileHandle, intImageList, i, 402);
                                                        double intImageLeft = qp.DAGetImageDblProperty(intFileHandle, intImageList, i, 501);
                                                        double intImageRight = qp.DAGetImageDblProperty(intFileHandle, intImageList, i, 503);
                                                        double intImageTop = qp.DAGetImageDblProperty(intFileHandle, intImageList, i, 502);
                                                        double intImageBottom = qp.DAGetImageDblProperty(intFileHandle, intImageList, i, 508);
                                                        intImageTypes[intImageType] += 1;
                                                    }
                                                }
Back to Top
snelldl View Drop Down
Beginner
Beginner


Joined: 29 Mar 10
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote snelldl Quote  Post ReplyReply Direct Link To This Post Posted: 23 Dec 10 at 8:22PM
Never mind - read the documentation on DAFindPage and saw that they are one based, not zero based.
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