ImgDoc_CreateWithBLOB_JSN

Create an image document instance referencing image data provided in a BLOB.
ImgDoc_CreateWithBLOB_JSN(imageData;optionsJSON) ➔ imgDocRef
imageData BLOB The BLOB containing the image data.
optionsJSON Text Options in JSON format.
↩︎ 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. The caller must release the document reference when no longer needed with a call to ImgObj_Release, otherwise there will be a memory leak.

If the method call fails for some reason, an empty string is returned and the Q2Pix error info is set accordingly.

Parameter imageData is the BLOB containing the image data.

The optional optionsJSON parameter is a 4D object serialized in JSON format and may contain the following properties:

Property name Description
“Format” The option’s value is the format identifier (a string) of the specified image document. This option does not restrict the reading of the image 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.

If the provided BLOB contains is a locked PDF document, Q2Pix will try to open it with the password provided in options. If that fails the error info will be set to "Q2Pix"/kQ2PixErrAuth.

Note

The ImgDoc_CreateWithBLOB method in Q2PixLib is a wrapper to this method that passes the options parameter directly as a 4D object instead of a JSON serialization.