Business

LiveCode PDF Viewer

The PDF viewer external is a LiveCode Business feature allowing a PDF view to be loaded within your application. Get access to commonly used PDF functions as well as the ability to extract and manipulate data selection from the PDF document.

Load a PDF, navigate between pages, zoom in and out, switch between browse and select modes, and display your selection as an image or text. The new LiveCode PDF viewer external gives you access to the features commonly associated with displaying a PDF document. While it has long been possible in LiveCode to embed a web view to show PDF’s in your app, this can be quite restrictive in some situations.

The LiveCode PDF Viewer external allows you to extract the selected data in either text or image form making this data available for manipulation. For example you can put your extracted text into a field, display it in a datagrid or use it in any way you need to in LiveCode.

on mouseUp
XPDFViewer_Open "PdfViewer",the windowid of this stack
XPDFViewer_Set "PdfViewer","filename", "path to PDF file here"
end mouseUp

Load PDF documents inside your application

Navigate to a given page within a loaded PDF document

Set the users access to select, browse or image mode

Zoom in and out

Identify a selected area within the PDF

Identify a text selection within the PDF

Grab a chunk of text from the PDF being viewed and use it elsewhere in your app

Pick up UTF16 characters (unicode) within the PDF

Count the characters within the PDF

Take an image of all or part of the PDF which can be manipulated or used elsewhere

Supported on Desktop Windows and Mac

The full API can be seen under the heading “XPDF” in the built in LiveCode dictionary, in versions 8.0.1 and later.

 
Steven CrightonLiveCode PDF Viewer