Print Page | Close Window

ExtractFilePageText does it work or not ?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3594
Printed Date: 24 Apr 24 at 11:40AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: ExtractFilePageText does it work or not ?
Posted By: masteripper
Subject: ExtractFilePageText does it work or not ?
Date Posted: 07 Aug 18 at 5:11PM
Hello to everybody
I am trying to use this above function but is doesn't work...
This is my code :
Public Function Test()
    Dim pdfLibrary As Object
    Dim pdfPath As String
    Dim PDFDocID As Long
    Dim pagecount As Integer
    Dim pdfText As String
    Set pdfLibrary = CreateObject("DebenuPDFLibraryLite1114.PDFLibrary")
    pdfPath = "C:\Users\masteripper\SomeEbook.pdf"    '
    PDFDocID = pdfLibrary.LoadFromFile(pdfPath, "")
    pagecount = pdfLibrary.pagecount
    For n = 1 To pagecount
        pdfText = pdfText & pdfLibrary.ExtractFilePageText(pdfPath, "", n, 0)
    Next
End Function
This code is from Access using the latest PDFLibrary Lite



Replies:
Posted By: Ingo
Date Posted: 07 Aug 18 at 9:34PM
Hi,

is "...SomeEbook.pdf" a real ebook?
Ebooks are protected in a special way.
Extraction won't work on these type of files.
Before starting the extraction you should check if the file is encrypted and then you should decrypt it first:
   QP := TDebenuPDFLibrary1211.Create;
   try
      QP.LoadFromFile(Edit1.Text, '');

      If ( QP.EncryptionStatus > 0 ) Then
         QP.Decrypt;

//    . . .


BTW: What does it mean if you're writing "it doesn't work"?
Is the extracted content not readable... do you get nothing?

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: masteripper
Date Posted: 07 Aug 18 at 9:37PM
Thanks Ingo for replying...
I mean that i get an error  exactly at this line
pdfText = pdfText & pdfLibrary.ExtractFilePageText(pdfPath, "", n, 0)
Error 438
"Object Doesn't Support This Property or Method"
So i reckon that the function either has an issue or its crippled as this is the Lite Edition...
I also checked the EncryptionStatus function...same error.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk