ImgDoc_CreateWithBLOB¶
imageDataPtr | Pointer | A pointer to a BLOB containing the image data. |
options | Object | Options. |
imgDocRef | Text | The image document reference. |
Create an image document instance referencing image data provided in a BLOB.
The image document reference is returned in imgDocRef
.
If the method call fails for some reason, an empty string is returned and the Q2Pix error info is set accordingly.
Parameter imageDataPtr
is a pointer to a BLOB containing the image data.
The optional options
object parameter may contain the following key/value pairs:
Key | Description |
---|---|
“Format” | The option’s value is the format identifier (a string) of the specified image data. This option does not restrict the reading of the image data to the specified format, but rather acts as a ‘hint’ to the plug-in and underlying OS imaging libraries. |
“Password” | The option’s value is the password (a string) for a protected PDF document. |
“AllowUserInteraction” | The option’s value is a boolean denoting whether user interaction is allowed.
Default value is True . |
If the specified BLOB contains a locked PDF document and opening
it fails with an authorization error ("Q2Pix"
/kQ2PixErrAuth
), a password entry dialog
is presented to the user. If the user enters the correct password, the PDF document is opened
and the document reference is returned. If the user cancels the dialog, the Q2Pix error info
is set to "Q2Pix"
/kQ2PixErrAuth
and the method returns an empty string. If the user enters
an invalid password, the method keeps running the password request dialog until the user either
enters the correct dialog, or cancels.
The AllowUserInteraction
property defaults to True
, which allows this command to
present the PDF password dialog, if necessary. When calling this
method in a batch or unattended process, you may consider setting this to False
so as the
process is not halted by the dialog waiting for user input.
Note
This method is a wrapper for the ImgDoc_CreateWithBLOB_JSN
plug-in method.
In addition to converting the options
object to JSON for passing to the plug-in,
it offers some extra functionality in the form of the PDF password dialog.