Apryse SDK

class apryse_sdk.ASCII85Encode(input_filter, line_width=72, buf_sz=256)[source]

Bases: Filter

ASCII85Encode filter can be used to encode any data stream into a stream that does not contain any binary characters.

property thisown

The membership flag

class apryse_sdk.Action(args)[source]

Bases: object

Actions are typically what happens when a user clicks on a link or bookmark.

Instead of simply jumping to a destination in the document, an annotation or outline item can specify an action for the viewer application to perform, such as launching an application, playing a sound, or changing an annotation’s appearance state.

Notes: Although the Action class provides utility functions for most commonly used action types, it is possible to read, write, and edit any action type using SDF API and dictionary entries described in Section 8.5 in the PDF Reference Manual.

static CreateGoto(args)[source]

Overload 1:

Creates a new ‘GoTo’action. GoTo action takes the user to the specified Destination view located in the same document.

Parameters:

dest (Destination) – A Destination for the new Action.

Notes: This method can only be used for destinations in the same document as the source document. For cross-document links use Action::CreateGotoRemote().


Overload 2:

Creates a new ‘GoTo’ action using a ‘Named Destination’. GoTo action takes the user to the specified ‘Named Destination’ view located in the same document.

Parameters:
  • key (UChar) –

    • a string buffer representing the destination name. The named

    destination will be stored in document’s ‘/Dest’ SDF::NameTree.

  • key_sz (int) – The size in bytes of the key buffer.

  • dest (Destination) – The explicit destination used to create the named destination.

static CreateGotoRemote(args)[source]

Overload 1:

Creates a new ‘GoToR’action. A remote go-to action is similar to an ordinary go-to action but jumps to a destination in another PDF file instead of the current file.

Parameters:
  • file (FileSpec) – The file referred to by the action.

  • page_num (int) – A page number within the remote document. The first page is numbered 0. _window A flag specifying whether to open the destination document in a new window. If new_window is false, the destination document replaces the current document in the same window, otherwise the viewer application should behave in accordance with the current user preference.


Overload 2:

Creates a new ‘GoToR’action. See the above method for details.

Parameters:
  • file (FileSpec) – The file referred to by the action.

  • page_num (int) – A page number within the remote document. The first page is numbered 0.

  • new_window (boolean) – A flag specifying whether to open the destination document in a new window. If new_window is false, the destination document replaces the current document in the same window, otherwise the viewer application should behave in accordance with the current user preference.

static CreateHideField(sdfdoc, field)[source]

Creates a new ‘Show/Hide Field’ action. A show/hide field action shows or hide certain fields when it’s invoked.

Parameters:
  • sdfdoc (SDFDoc) – the document in which to create the action

  • list_length – the number of fields to hide

  • field (std::vector< std::string,std::allocator< std::string > >) – the list of fields to hide

static CreateImportData(doc, path)[source]

Creates a new ‘Import Data’ action. An import data action imports form data from a FDF file into a PDF document.

Parameters:
  • doc (SDFDoc) – the document in which to create the action

  • path (string) – the full path of the FDF file

static CreateInternal(impl)[source]
static CreateJavaScript(doc, script)[source]

Creates a new ‘JavaScript’ action. A javascript action executes a JavaScript script when it’s invoked.

Parameters:
  • doc (SDFDoc) – the document in which to create the action

  • script (string) – the JavaScript script to be executed

static CreateLaunch(doc, path)[source]

Creates a new ‘Launch’ action. A launch action opens up a file using the most appropriate program.

Parameters:
  • doc (SDFDoc) – the document in which to create the action

  • path (string) – the full path of the file to be opened

static CreateResetForm(doc)[source]

Creates a new ‘Reset Form’ action. A reset form action reset chosen form fields to their default value.

Parameters:

doc (SDFDoc) – the document in which to create the action

static CreateSubmitForm(url)[source]

Creates a new ‘SubmitForm’action. A submit-form action transmits the names and values of selected interactive form fields to a specified uniform resource locator (URL), presumably the address of a Web server that will process them and send back a response.

Parameters:

url (FileSpec) – A URL file specification giving the uniform resource locator (URL) of the script at the Web server that will process the submission.

static CreateURI(args)[source]

Overload 1:

Create a new URI action. The URI action is typically resolved by opening a URL in the default web browser.

Parameters:
  • doc (SDFDoc) – The document in which to create the action.

  • uri (string) – The uniform resource identifier to resolve, encoded in 7-bit ASCII. A uniform resource identifier (URI) is a string that identifies (resolves to) a resource on the Internet; typically a file that is the destination of a hypertext link, although it can also resolve to a query or other entity. (URIs are described in Internet RFC 2396, Uniform Resource Identifiers (URI).


Overload 2:

Create