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!
![]() |
Extracting text from PDF in Access 2007 |
Post Reply ![]() |
Author | |
otterbyte ![]() Beginner ![]() Joined: 09 Oct 10 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 11 Oct 10 at 3:44PM |
Hello,
I have an Access database where I need to convert PDF files to text. I know there are many PDF-to-text converters, but I need to do it from my VBA code, and I need something distributable as this is part of an Access runtime which is used by many different companies. So a freely redistributable dll like this one is ideal. I had purchased Ingo's excellent PDFText dll, but unfortunately when I moved from Access 2000 to Access 2007, the code would crash every time I got to the GetPDFText line. The GetPDFPageCount still worked, though, oddly enough, as did Ingo's test application. I contacted Ingo and he made very helpful suggestions, but nothing seemed to make it work. So, now I'm trying the QuickPDF library to see if I have better results - sadly, I have the same problem. I have tried three different functions: GetPageText, ExtractFilePageText, and DAExtractPageText. I have tried each of these functions with the four different extract options available. I've also created the Access databases in three formats (from within Access 2007): Access 2000 compatible, Access 2002-2003 compatible, and an Access 2007 accdb file. So, a total of 36 different combinations, all with the same result: everything works perfectly up to the line that actually attempts the text extraction...then Access crashes without so much as a sigh. I'm happy to post my code if anyone wants to look at it and tell me where I'm going wrong. I'm running under Windows Vista. Thanks in advance for any assistance...I've run out of ideas! Erika |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi Erika,
My guess is that it is either a permissions issue in Microsoft Access or that the problem is caused by a specific PDF file. * Do most of the other functions in the library work? * Does this issue only occur with a certain set of files or with all files? - Rowan.
|
|
![]() |
|
otterbyte ![]() Beginner ![]() Joined: 09 Oct 10 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Hi Rowan,
All the other functions I've tried work; in the test code I created, I used:
The starred functions are the only ones that don't work. The three center groups of functions represent the three methods I attmepted for the extraction. In each case, only the final function, where the extraction is attempted, fails and crashes Access. This happens no matter what pdf I use, big or small, older or newer format. I haven't tried running this test in a database specifically created IN Access 2000, but I suspect that in that environment it would work fine. As I said, this is the identical issue I had with Ingo's wonderful PDFtext.dll, which works perfectly in Access 2000 on this same computer, as does his test program, H_PDFtext.exe. It just doesn't work in any flavor of database created in Access 2007. So I am just here, scratching my head! :) Thanks for your help, Erika |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi Erika,
Ingo's product uses Quick PDF Library for it's engine, so that's why the results are the same. It is strange that it's crashing during the text extraction phase, no matter what document you use. Does this same issue occur if you use the ActiveX edition of the library? - Rowan.
|
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Also, perhaps if you're able to send me your MS Access 2007 project -- or at least a small replication that demonstrates the problem -- then I can test it on my machine. My email is:
rowan.hanna @ debenu . com
|
|
![]() |
|
otterbyte ![]() Beginner ![]() Joined: 09 Oct 10 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Rowan,
I haven't tried the ActiveX as I normally shy away from having any dependencies other than dll's. Access Runtime is quite the bear to install properly, and I never know what system my databases will be run on. But I'll be more than happy to give it a try! And if it works, it will be worth the extra maintenance. I'll send along a copy of my test database for you to look at. Thanks so much! Erika |
|
![]() |
|
alebuda ![]() Beginner ![]() ![]() Joined: 10 Jul 14 Location: Roma Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() |
Hi Erika, I know this is quite an old post but I'm currently facing exactly the same problem.
Did you ever find a solution? Thank you, best regards
Alessandro |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Alessandro,
this Problem has to do with the handling of the returned values. Getting back strings from the dll into access2007-vba is the Problem. Try to create a process to extract to file or to clipboard and as the returning success message use only an integer value. Then your vba-project will work. Cheers and welcome here, Ingo |
|
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