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!
![]() |
Problems in extracting Images from PDF |
Post Reply
|
| Author | |
Ruturaaj
Team Player
Joined: 12 Aug 09 Status: Offline Points: 29 |
Post Options
Thanks(0)
Quote Reply
Topic: Problems in extracting Images from PDFPosted: 14 Aug 09 at 5:59AM |
|
Hi All!!
How are you all doing?! I need your help regarding one highlighted feature of QuickPDF library ... "Extracting Images from PDF". I attempted to extract images from PDF file using QuickPDF, but I noticed that it slices some of the images into parts while extracting. I don't know why it happens so. For your testing purpose, I've created a small project; please download it from following URL: http://www.mediafire.com/file/tjyi3owmnzn/Ruturaaj_ExtractImages.zip Here is the function that I've written for extracting images: Private Function ExtractImagesFromPDF(ByVal sPDFFile As String, ByVal sFolderToSave As String) As Long Dim iCnt As Integer, lTotal As Long Dim lRet As Long Dim lImgID As Long, sImgExt As String Set oPDF = New PDFLibrary With oPDF lRet = .LoadFromFile(sPDFFile) If lRet = 0 Then ExtractImagesFromPDF = -1 Exit Function End If If lRet = 0 Then ExtractImagesFromPDF = 0 Exit Function End If lTotal = 0 lRet = .FindImages For iCnt = 1 To lRet lImgID = .GetImageID(iCnt) If .SelectImage(lImgID) = 1 Then Select Case .ImageType Case 1: sImgExt = ".jpg" Case 2: sImgExt = ".bmp" Case 3: sImgExt = ".tiff" Case Else: sImgExt = ".unknown" End Select .SaveImageToFile AddBackSlash(sFolderToSave) & FileNameFromPath(sPDFFile, False) & "_img_" & iCnt & sImgExt DoEvents lTotal = lTotal + 1 End If DoEvents Next iCnt ExtractImagesFromPDF = lTotal End With End Function Can you please tell me what additional stuff is needed to add to this function in order to make it to extract images correctly? Eagerly waiting for your reply ... Best Regards, Ruturaaj. |
|
![]() |
|
Ruturaaj
Team Player
Joined: 12 Aug 09 Status: Offline Points: 29 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Aug 09 at 8:36PM |
|
I'm really surprised to see no response to this thread! :(
Guys, I need your help to make this thing to work. Please come forward and share your thoughts on this issue. Waiting ... |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Aug 09 at 9:31PM |
|
Hi!
I think you don't get an answer 'cause there are probs starting your exe (probs with activex-creation...). But anyway...
Where are these sliced images on the pages?
More at the bottom and at the top of the pages... and not in the middle of the pages?
How are they implemented?
I've loaded your test.pdf with adobe reader and clicked on the small image in the middle to select it -> I see ONE frame.
When i click on the bigger iimage at the top of the page it depends on where i'm clicking... i see THREE frames.
So i assume that the big image will be extracted as three parts?
So i assume the creation/insertion of the big image is the problem?
Am i
Cheers, Ingo
(Edit from Michel: corrected small typo for legibility reasons) Edited by Michel_K17 - 18 Aug 09 at 12:47AM |
|
|
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