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!
DPLFindImages on Only One page |
Post Reply |
Author | |
pinya
Beginner Joined: 14 Mar 14 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 07 Sep 14 at 12:03PM |
Hello,
I need to enumerate images on only one page. How can I do it? |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
pinya, I have modified the code sample to load only page 1 but the loop is commented out that processes all pages. //for (int p=1;p<=QP.PageCount();p++) // Process all pages. int p = 1; // Process only page 1. { QP.SelectPage(p); int id = QP.GetPageImageList(0); int count = QP.GetImageListCount(id); for (int i = 1; i <= count; i++) { int type = QP.GetImageListItemIntProperty(id, i, 400); int width = QP.GetImageListItemIntProperty(id, i, 401); int height = QP.GetImageListItemIntProperty(id, i, 402); int bpp = QP.GetImageListItemIntProperty(id, i, 403); int cs = QP.GetImageListItemIntProperty(id, i, 404); double x1 = QP.GetImageListItemDblProperty(id, i, 501); double y1 = QP.GetImageListItemDblProperty(id, i, 502); double x2 = QP.GetImageListItemDblProperty(id, i, 505); double y2 = QP.GetImageListItemDblProperty(id, i, 506); double DPIx = width / (x2-x1) * 72.0; switch (type) { case 1: QP.SaveImageListItemDataToFile(id, i, 0, "temp_p" + p.ToString() + "i_" + i.ToString() + ".jpg"); break; case 2: QP.SaveImageListItemDataToFile(id, i, 0, "temp_p" + p.ToString() + "i_" + i.ToString() + ".bmp"); break; case 3: QP.SaveImageListItemDataToFile(id, i, 0, "temp_p" + p.ToString() + "i_" + i.ToString() + ".tif"); break; } //MessageBox.Show(type.ToString()); } } Andrew.
|
|
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