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 - Extracting text from PDF in Access 2007
  FAQ FAQ  Forum Search   Register Register  Login Login

Extracting text from PDF in Access 2007

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


Joined: 09 Oct 10
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote otterbyte Quote  Post ReplyReply Direct Link To This Post Topic: Extracting text from PDF in Access 2007
    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


Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 20 Oct 10 at 1:33PM
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.
Back to Top
otterbyte View Drop Down
Beginner
Beginner


Joined: 09 Oct 10
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote otterbyte Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 10 at 12:30PM
Hi Rowan,

All the other functions I've tried work; in the test code I created, I used:
  • QuickPDFCreateLibrary
  • QuickPDFUnlockKey
  • QuickPDFLoadFromFile

  • QuickPDFSelectDocument
  • QuickPDFSelectPage
  • QuickPDFGetPageText*

  • QuickPDFExtractFilePageText*

  • QuickPDFDAOpenFileReadOnly
  • QuickPDFDAGetPageCount
  • QuickPDFDAExtractPageText*

  • QuickPDFDACloseFile
  • QuickPDFReleaseLibrary

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
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 10 at 6:37PM
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.
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 25 Oct 10 at 6:38PM
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
Back to Top
otterbyte View Drop Down
Beginner
Beginner


Joined: 09 Oct 10
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote otterbyte Quote  Post ReplyReply Direct Link To This Post Posted: 29 Oct 10 at 1:16PM
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
Back to Top
alebuda View Drop Down
Beginner
Beginner
Avatar

Joined: 10 Jul 14
Location: Roma
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alebuda Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jul 14 at 8:20AM
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jul 14 at 7:10AM
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

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