Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5    Statistic    FMM    Blog  

DynaPDF.SetGStateFlags

Sets optional flags affecting the graphics state, coordinate handling, as well as color and image conversion rules.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetGStateFlags"; PDF; Value { ; Reset } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Value The new value. Can be a number or a list including one or more of the following words: Compatible, RestorePageCoords, RealTopDownCoords, NativeBlackWhite, UseImageColorSpace, IgnoreICCProfiles, AnsiStringIsUTF8, RealPassThrough, NoBitmapAlpha or NoImageDuplCheck. 3
Reset If the parameter Reset is true, the new flags replace current flags. If set to false, the flags are combined with the current flags. 0 Optional

Result

Returns OK or error.

Description

Sets optional flags affecting the graphics state, coordinate handling, as well as color and image conversion rules.
If the parameter Reset is true, the new flags replace current flags. If set to false, the flags are combined with the current flags.
FlagDescription
RestorePageCoordsIf set, the current base coordinate system like bottom or top down is saved and restored with the graphics state.
RealTopDownCoordsThis flag is reserved for future extensions. It is not implemented yet.
NativeBlackWhiteIf set, RGB black or white is not converted to DeviceGray. This flag affects text and vector graphics but no images.
UseImageColorSpaceIf set, the active color space is ignored when inserting an image. The color space is taken from the image file instead. See also "Color spaces and Images“ in DynaPDF help file.
IgnoreICCProfilesIf set, embedded ICC profiles in image files are ignored when inserting an image. The image is inserted in the base color space instead. This flag is not meaningful if the flag gfUseImageColorSpace is absent. See also "Color spaces and Images“ in DynaPDF help file.
AnsiStringIsUTF8If set, all Ansi functions interpret string parameters as UTF-8 encoded Unicode strings. Should not be used with MBS Plugin.
RealPassThroughIf set, JPEG images are inserted as is. JPEG images are normally rebuild, also in pass-through mode, to avoid issues with certain malformed JPEG images which cannot be displayed in Adobes Acrobat or Reader. If you know that your JPEG images work then set this flag to avoid unnecessary processing time.
NoBitmapAlphaIf set, the alpha channel in bitmaps files will be ignored. This is sometimes useful since many 32 bit bitmaps contain an invalid alpha channel that makes the image fully transparent.
NoImageDuplCheckIf set, no duplicate check for images will be performed. This can significantly improve processing speeed especially for memory based images.
NoObjCompressionIf set, object compression will be disabled.
ComplexTextIf set, text is processed with Uniscribe on Windows.
DisableJavascriptIf set, the raw field value of text fields is used to create the apprearance stream.
DisableBidiCtrlsMeaningful only if gfComplexText is set too. If set, bidi control characters are ignored. This flag can be useful if the result of web browsers should be emulated since web browsers do not support bidi control characters. This flag is also used internally to create the appearance stream of form fields since form fields do not support bidi control characters.
DoNotComprMetadataIf set, arbitrary metadata stream associated with PDF objects other that the global metadata stream will not be compressed. This can be useful since certain standards prohibit compression of metadata streams. The flag is automatically for PDF/X files.

See also SetGStateFlags function in DynaPDF manual.

Examples

Set two options:

MBS( "DynaPDF.SetGStateFlags"; $pdf; "RealPassThrough, UseImageColorSpace" )

Disable object compression:

MBS( "DynaPDF.SetGStateFlags"; $pdf; "NoObjCompression" )

See also

Release notes

Example Databases

Blog Entries

Created 21st August 2015, last changed 2nd September 2022


DynaPDF.SetFontWeight - DynaPDF.SetImportFlags

Feedback: Report problem or ask question.


Start Chat