Name
pdf.OpenDocument -- open PDF document
Synopsis
[id] = pdf.OpenDocument(id, file$[, t])
Function
This function opens an existing PDF document which is specified by file$ and assigns the identifier id to it. If you pass Nil in id, pdf.OpenDocument() will automatically choose a vacant identifier and return it.

The optional table argument allows you to configure further options:

Password:
If the document is password-protected, you can specify the password needed to open this document here.

Adapter:
This tag allows you to specify one or more file adapters that should be asked to open the specified file. This must be set to a string containing the name(s) of one or more adapter(s). Defaults to default. See your Hollywood manual for more information on file adapters.

If pdf.OpenDocument() fails, pdf.GetLastError() can be used to get additional information why the document couldn't be opened. This is especially useful to find out if the document couldn't be opened because it is password-protected. See pdf.GetLastError for details.

Inputs
id
identifier for the PDF document or Nil for auto id selection
file$
file to load
table
optional: table specifying further options (see above)
Results
id
optional: identifier of the document; will only be returned when you pass Nil as argument 1 (see above)

Show TOC