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!
![]() |
get images and all sizes? |
Post Reply ![]() |
Author | |
johnny ![]() Beginner ![]() ![]() Joined: 08 May 19 Location: Earth Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() Posted: 18 Jun 19 at 5:31PM |
hi all
i want to determin if a pdf uses images as background or in general take all images and check their sizes. with the FindImages i get the count, after that what function exist to loop into the found images and check their sizes? C# thank you |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Johnny.
this sample could be a kickstart for your first codes... https://www.debenu.com/kb/extract-images-from-pdf-files-as-the-appropriate-image-type/ ...and GetImageListItemIntProperty is the most important function for this: https://www.debenu.com/docs/pdf_library_reference/GetImageListItemIntProperty.php Good luck and much success :) |
|
Cheers,
Ingo |
|
![]() |
|
johnny ![]() Beginner ![]() ![]() Joined: 08 May 19 Location: Earth Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
thanks so much Ingo ![]() the tricky part was to find this 401 = Width in pixels 402 = Height in pixels there is no properly named properties you need to pass "int code numbers" and that makes is hard during search.... ![]() |
|
![]() |
|
johnny ![]() Beginner ![]() ![]() Joined: 08 May 19 Location: Earth Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
btw why the GetPageImageList() usually start with 0 and not 1?
i mean in other functions the page of your pdf document starts from 1 not index 0, but in this function seems to start from 0.
|
|
![]() |
|
johnny ![]() Beginner ![]() ![]() Joined: 08 May 19 Location: Earth Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
since sharing is caring here is my function in case it will help someone else with similar question in the future.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
a small hint:
I've test-pdfs from architects with a lot of text and numbers on the pages and embedded cad images with extreme dimensions. You can have a text-pdf with standard pdf dimensions with a small image inside which has huge dimensions after extraction. |
|
Cheers,
Ingo |
|
![]() |
|
johnny ![]() Beginner ![]() ![]() Joined: 08 May 19 Location: Earth Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
is ok...cause i am only interested in pdf that are A4 or similar size invoices for my app. no chance a CAD will be used for this. just invoices that are scanned and imported automatically to many popular Account Application :)
|
|
![]() |
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