pxoPageList - how to use

PDF-X OCR SDK is a New product from us and intended to compliment our existing PDF and Imaging Tools to provide the Developer with an expanding set of professional tools for Optical Character Recognition tasks

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
pmazurk
User
Posts: 27
Joined: Tue Feb 22, 2011 10:25 pm

pxoPageList - how to use

Post by pmazurk »

All the examples I've seen set pxoPageList to IntPtr.Zero which processes all pages. I need to examine the OCR results of a PDF one page at a time. I've tried a few ways of setting pxoPageList (such as pxoPagelist = Marshal.AllocHGlobal(Len(intPageNumber.ToString)) and pxoPagelist = Marshal.StringToHGlobalAnsi(intPageNumber.ToString) ) but I can't get any to work. When I use IntPtr.Zero, the OCR_GetText function works great. Any other setting causes an Access Violation. Would you be kind enough to share some sample VB.Net code that shows how pxoPageList should be set to process a particular page of a PDF?
pmazurk
User
Posts: 27
Joined: Tue Feb 22, 2011 10:25 pm

Re: pxoPageList - how to use

Post by pmazurk »

Never mind. I figured out that I needed to add

<DllImport(DLLName)>
Public Shared Function OCR_NewPagelist(ByRef pagelist As IntPtr) As Integer
End Function

<DllImport(DLLName)>
Public Shared Function OCR_AddPage(ByVal pagelist As IntPtr, ByVal PageNumber As Integer) As Integer
End Function

to PDFXOCR_Funcs. Took some effort to figure that out from the C-oriented help files, but I finally got there.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17818
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: pxoPageList - how to use

Post by Tracker Supp-Stefan »

Hello pmazurk,

Glad to hear you found the solution!

Regards,
Stefan
Post Reply