post_script_group property

FieldPrint.post_script_group property

Gets or sets the drawing rectangle that the PostScript instructions operate on.

@property
def post_script_group(self) -> str:
    ...

@post_script_group.setter
def post_script_group(self, value: str):
    ...

Examples

Shows to insert a PRINT field.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
builder.write('My paragraph')
# The PRINT field can send instructions to the printer.
field = builder.insert_field(field_type=aw.fields.FieldType.FIELD_PRINT, update_field=True).as_field_print()
# Set the area for the printer to perform instructions over.
# In this case, it will be the paragraph that contains our PRINT field.
field.post_script_group = 'para'
# When we use a printer that supports PostScript to print our document,
# this command will turn the entire area that we specified in "field.PostScriptGroup" white.
field.printer_instructions = 'erasepage'
self.assertEqual(' PRINT  erasepage \\p para', field.get_field_code())
doc.update_fields()
doc.save(file_name=ARTIFACTS_DIR + 'Field.PRINT.docx')

See Also