pxoPageList - how to use
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 27
- Joined: Tue Feb 22, 2011 10:25 pm
pxoPageList - how to use
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?
-
- User
- Posts: 27
- Joined: Tue Feb 22, 2011 10:25 pm
Re: pxoPageList - how to use
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.
<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.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: pxoPageList - how to use
Hello pmazurk,
Glad to hear you found the solution!
Regards,
Stefan
Glad to hear you found the solution!
Regards,
Stefan