Quick Fix features

This article gives an overview of all Quick Fixes included in pdfToolbox.

Since a Quick Fix can also be executed on the command line, by using a JSON file based Quick Fix configuration, this article also includes JSON serializations for each Quick Fix. Detailed information about using Quick Fix on the command line can be found here.

In addition the JSON serialisations can also be used in the "JavaScript based configuration" Quick Fix. How to do is documented here.

Spot color Quick Fixes

Rename spot color

This Quick Fix feature simply renames spot colors. Using the operator in conjunction with the "Current spot color name" allows for flexible renaming – whether for just one specific spot color name or a list of names or mappings that could be expressed using RegEx. The table below illustrates this with a couple of examples.

Operator Current spot color name
New spot color name Effect
equal to red Logo Red If there is a spot color whose name is exactly "red" it will be renamed to "Logo Red"
contains red Logo Red All spot color names that contain "red" ("Deep red", "Fred", "ingredient", ... ) will get renamed to "Logo Red". By implication all these spot colors containing "red" in their name will be merged into a single new spot color "Logo Red"
regex .* Logo $0 All spot colors will be renamed by prefixing their current name with "Logo ".
 {
   
	"quickfixes" : [
		{
				"quickfix" : "rename_spot",
				"version" : "1.0"				
				"instructions" : [
				{
					"new_spot" : "Logo Red",
					"old_spot" : "red",
					"operator" : "contains"
				}
			]
			
		}
	]
}

// "operator" : "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"

If there are several instructions in a Quick Fix step, each spot color will only be "touched" once (if at all). If repeated modifications are desired (change a spot color name, then change that already modified spot color name again), the respective instruction have to be put inside separate Quick Fix steps.

Adjust spot colors

This Quick Fix is an extended version of the "Rename spot color" Quick Fix. In addition to the new spot color name it is also possible to specify the appearance of that new spot color, using DevciceCMYK, DeviceRGB, sRGB, Lab D50, Lab D65, sRGB, DeviceGray (or an ICC profile by means of an <icc-profil-file-path>) with the appropriate number of color values.

If the new spot color name is left empty, only the appearance will be changed. If the alternate color space and color values are left empty, only renaming will be applied (same effect as with the "Rename spot color" Quick Fix).

{
    "quickfixes": [
        {
            "quickfix": "adjust_spot",
            "version": "1.0",
            "instructions": [
                {
                    "operator": "contains",
                    "old_spot": "red",
                    "new_spot": "Company Red",
                    "alt" : "sRGB",
                    "c0" : 1.0,
                    "c1" : 0.0,
                    "c2" : 0.0,
                    "c3" : 0.0
                }
            ]
        }
    ]
}

//		"operator": "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"
//		"alt": "DeviceGray|DeviceRGB|DeviceCMYK|Lab_D50|Lab_D65|sRGB|<icc-profil-file-path>"

Merge spot colors

The "Merge Spot color" Quick Fix  differs from the "Rename spot color" Quick Fix insofar, as on both sides – "Spot colors to be merged" and spot color to be merged into ("Merge into this spot color") – an operator can be used. 

In general, it is recommended to make the combination of operator and "Merge into this spot color" specific enough to identify that one spot color in the PDF into which the other spot colors are to be merged. The reason for this is that if more than one spot color matches the "Merge into this spot color" condition, the Quick Fix analysis will select the spot color that is identifies first. Therefore, there is a risk that a wrong spot color is selected by pdfToolbox, into which the other spot colors are then merged.

{
	"quickfixes" : 
	[
		{
			"instructions" : 
			[
				{
					"master_spot" : "Company red",
					"operator1" : "equal_to",
					"operator2" : "contains",
					"slave_spot" : "red"
				}
			],
			"quickfix" : "merge_spot",
			"version" : "1.0"
		}
	]
}

//		"operator1": "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"
//		"operator2": "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"

Page geometry (and Pages tree) Quick Fixes

Adjust pages tree

This Quick Fixes will hardly ever be of relevant use of its own. It is always executed implicitly if any of the QuickFixes dealing with page geometry are executed.

Due to the flexibility of the PDF syntax, there are numerous ways to put pages and  their accompanying page geometry boxes (at least a MediaBox must always be specified) inside a PDF. The "Adjust document Pages Tree" Quick Fix "normalizes" page organisation in PDFs. For multi-page PDFs it makes sure, no more than the number of pages specified in "Page tree node size" are present in a page tree node (this only has practical implications for retrieving pages in PDFs with a large number of pages). In addition, and entries for page geometry boxes – which could be present in intermediate page tree nodes and would then apply to all pages under that node – are moved to the page to which they apply, such that each page stands on its own feet regarding page geometry boxes (and makes them independent of all other pages). Again, this is relevant for fast processing of page related information.

{
    "quickfixes": [
        {
            "quickfix": "adjust_pages_tree",
            "version": "1.0",
            "instructions": [
                {
                    "pages_size": 100
                }
             ]
        }
    ]
}

Set MediaBox to origin

This Quick Fix does a very specific thing: it makes sure, that the lower left of the MediaBox sits at 0:0. Page geometry manipulations can easily lead to situations where this is not the case. Strictly speaking this does not matter anyway – as long as width and height of page geometry boxes – and their relative position towards each other – are correct, everything else is irrelevant. The lower left of the MediaBox could be at 2000:-900 and there would not be a problem. Except with some output or other PDF processing systems that got used to the fact that especially in the earlier days of PDF all MediaBoxes would sit at 0:0. These systems struggle with PDFs whose MediaBox does not sit at 0:0 and might create 'unexpected' output.

{
    "quickfixes": [
        {
            "quickfix": "set_mediabox_to_origin",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Apply Rotate key

This will have an effect only if a given page has a Rotate entry, and if that Rotate entry is not equal zero. The fact of the Rotate key is then incorporated into the page description, and the Rotate key is removed. In addition, the page geometry boxes and the positions of annotations and form fields are adjusted accordingly.

{
    "quickfixes": [
        {
            "quickfix": "apply_rotate_key",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Auto-correct page geometry boxes

Works in the same way as the respective fixup, except that in the Quick Fix it is possible to define the pages whose page geometry boxes are to be auto-corrected:

Automatically corrects nesting of page geometry boxes (TrimBox or ArtBox, BleedBox, CropBox, MediaBox – in that order), if necessary, on all pages defined by the Page selector.

In addition, for these  pages the lower left of the MediaBox is set to the origin.

{
    "quickfixes": [
        {
            "quickfix": "auto_correct_page_boxes",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Remove page geometry boxes

Removes the selected page geometry box(es) from the pages defined by the Page selector.

{
    "quickfixes": [
        {
            "quickfix": "remove_page_box",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "which_box": "ArtBox"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"which_box": "CropBox|BleedBox|TrimBox|ArtBox"

Set page geometry box

Sets page geometry boxes either relative to an existing page geometry box or to absolute coordinates.

{
    "quickfixes": [
        {
            "quickfix": "set_page_box",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "which_box": "CropBox",
                    "from_box_or_absolute":  "BleedBox",
                    "left": 5.0,
                    "bottom": 5.0,
                    "right": 5.0,
                    "top": 5.0,
                    "unit": "mm",
                    "when": "always"
                }
             ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"which_box": "CropBox|BleedBox|TrimBox|ArtBox"
//		"from_box_or_absolute": "CropBox|BleedBox|TrimBox|ArtBox|absolute"

Set page geometry box (by dimensions)

Sets page geometry boxes by specifying page box dimensions.

{
    "quickfixes": [
        {
            "quickfix": "set_page_box_by_dimensions",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "which_box": "CropBox",
                    "relative_to": "center",
                    "from_box_or_origin":  "TrimBox",
                    "hor_offset": 0.0,
                    "vert_offset": 0.0,
                    "width": 210.0,
                    "width_is_relative": false,
                    "height": 297.0,
                    "height_is_relative": false,
                    "unit": "mm",
                    "when": "always"
                }
             ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"which_box": "CropBox|BleedBox|TrimBox|ArtBox"
//		"relative_to": "lower_left_corner|left_center|upper_left_corner|top_center|lower_right_corner|right_center|upper_right_corner|upper_right_corner|bottom_center|center"
//		"from_box_or_origin": "CropBox|BleedBox|TrimBox|ArtBox|origin"

Scale/rotate/flip pages Quick Fixes

Scale pages

Scales all pages in the PDF defined by the Page selector. In addition, for these  pages the lower left of the MediaBox is set to the origin (0:0).

{
    "quickfixes": [
        {
            "quickfix": "scale_pages",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "short_edge": 210,
                    "long_edge": 297,
                    "unit": "mm",
                    "page_scale_mode": "fit_from_inside_add_white_space"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"page_scale_mode": "fit_from_inside_add_white_space|fit_from_inside_scale_page_edge_proportionally|fit_from_outside_cut_page|fit_from_outside_scale_page_edge_proportionally|stretch_to_fill"

Scale page content only

Scales the page content  to a given percentage without changing page dimensions for all pages defined by th Page selector.  In addition, for these  pages the lower left of the MediaBox is set to the origin.

{
    "quickfixes": [
        {
            "quickfix": "scale_page_content_only",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "relative_to": "center",
                    "scale_to_percent": 110
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"relative_to": "lower_left_corner|left_center|upper_left_corner|top_center|lower_right_corner|right_center|upper_right_corner|upper_right_corner|bottom_center|center"

Enlarge page

Enlarges the page area without modifying the page content for all pages defined by the Page selector.  In addition, for these  pages the lower left of the MediaBox is set to the origin.

{
    "quickfixes": [
        {
            "quickfix": "enlarge_pages",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "which_edges": "top_and_bottom",
                    "enlarge_by": 10,
                    "unit": "mm"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"
//		"which_edges": "left|bottom|right|top|left_and_right|top_and_bottom|all"

Rotate pages

Rotates pages defined by the Page selector by the defined angle. If there is a page rotation parameter it is applied.  In addition, for these  pages the lower left of the MediaBox is set to the origin.

{
    "quickfixes": [
        {
            "quickfix": "rotate_pages",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "rotate_by": -90
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Flip pages

Flips the pages horizontally or vertically for all pages defined by the Page selector.  In addition, for these  pages the lower left of the MediaBox is set to the origin.

let cfg = 
{
    "quickfixes": [
        {
            "quickfix": "flip_pages",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "even",
                    "flip_direction": "horizontally"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>",
//		"flip_direction": "horizontally|vertically"

Insert/Duplicate/Remove/Invert/Reorder pages Quick Fixes

Insert empty page

Works in the same way as the Fixup "Insert page":

Inserts an empty page before or after the pages defined by the Page selector. The page geometry boxes will be a copy of the page before or after where the empty page is inserted.

{
    "quickfixes": [
        {
            "quickfix": "insert_empty_page",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "all",
                    "where": "after"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>",
//		"where": "before|after"

Duplicate pages

Duplicates the page(s) defined by the Page selector.

{
    "quickfixes": [
        {
            "quickfix": "duplicate_page",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "1,-1"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Remove pages

Removes the page(s) defined by the Page selector.

{
    "quickfixes": [
        {
            "quickfix": "remove_page",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "2--1"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Invert page order

This Quick Fix inverts the page order in accordance with the defined 'page selector', like all pages or only even pages etc.

Example: A simple 10 page PDF with a page selector “1-5” will thereafter have:5,4,3,2,1,6,7,8,9,10.

More infos here.

{
    "quickfixes": [
        {
            "quickfix": "invert_pages",
            "version": "1.0",
            "instructions": [
                {
                    "page_selector": "1-5"
                }
            ]
        }
    ]
}

//		"page_selector": "all|even|odd|<splitscheme_expression>"

Reorder pages

This Quick Fix lets you reorder pages in a document based on the given attributes:

  • Page selector, which can be a list eg, 1,2,3 or a simple expression  etc
  • Relative to (first/last page in PDF/selection)
  • Page offset, which is the anchor point by which the selected pages are to be reordered
  • Insert (before or after)
  • Non consecutive selections, either 
    • Insert as consecutive pages or
    • Shift page structure

More info here.

{
  	"quickfixes" : 
  	[
  		{
  			"instructions" : 
  			[
  				{
  					"insert_mode" : "shift_pages",
  					"insert_pages" : "insert_before",
  					"page_offset" : -1,
  					"page_selector" : "*3(3)",
  					"relative_to_page" : "first_page"
  				}
  			],
  			"quickfix" : "reorder_pages",
  			"version" : "1.0"
  		}
  	]
}

//		"insert_mode": "insert_consecutive|shift_pages"
//		"insert_pages": "insert_before|insert_after"
//		"page_selector": "all|even|odd|<splitscheme_expression>",
//		"relative_to_page": "first_page|first_sel_page|last_sel_page|last_page"

Layers (including Processing Steps metadata) Quick Fixes

Set layer visibility

This Quick Fix is similar to the "Set layer default to ON/OFF" Fixup.

It sets the default visibility of a layer to either visible or not visible.

If "Interpret layer name as Processing Steps name" is checked, the names of layers are ignored, and instead their Processing Steps metadata is used to determine whether to turn their visibility on or off. Processing Steps metadata are to be written by combining group and type:

  • the syntax for writing the Processing Steps metadata value in the Quick Fix step configuration is "<Processing Steps Group>:<Processing Steps Type>"
  • for example: "Structural:Bleed"
{
    "quickfixes": [
        {
            "quickfix": "set_ocg_visibility",
            "version": "1.0",
            "instructions": [
                {
                    "operator": "contains",
                    "ocg_name": "Die",
                    "interpret_ocg_name_as_processsing_steps_name: false,
                    "visibility" : "on"
                },
                {
                    "operator": "contains",
                    "ocg_name": "Cut",
                    "interpret_ocg_name_as_processsing_steps_name: false,
                    "visibility" : "on"
                }
            ]
        }
    ]
}

//		"operator": "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"
//		"interpret_ocg_name_as_processsing_steps_name": true|false <optional: default false>
//		"visibility": "on|off"

Set Processing Steps metadata for layer

This Quick Fix adds Processing Steps metadata to a layer / to layers. Already existing Processing Steps metadata entries will be overwritten.

{
	"quickfixes" : 
	[
		{
			"instructions" : 
			[
				{
					"ocg_name" : "Die",
					"operator" : "contains",
					"processing_steps_group" : "Structural",
					"processing_steps_type" : "Cutting"
				},
				{
					"ocg_name" : "Cut",
					"operator" : "contains",
					"processing_steps_group" : "Structural",
					"processing_steps_type" : "Cutting"
				},
				{
					"ocg_name" : "Stanz",
					"operator" : "contains",
					"processing_steps_group" : "Structural",
					"processing_steps_type" : "Cutting"
				},
				{
					"ocg_name" : "poinc",
					"operator" : "contains",
					"processing_steps_group" : "Structural",
					"processing_steps_type" : "Cutting"
				}
			],
			"quickfix" : "set_processing_steps_metadata_for_ocg",
			"version" : "1.0"
		}
	]
}

//		"operator": "regex|begins_with|contains|does_not_begin_with|does_not_contain|does_not_end_with|ends_with|equal_to|is_contained_in|is_not_contained_in|unequal_to"
//		"processing_steps_group": "<custom>|Structural|Dimensions|Braille|Legend|Positions|White|Varnish"
//		"processing_steps_type": "<custom>|Cutting|PartialCutting|ReversePartialCutting|Creasing|ReverseCreasing|CuttingCreasing|ReverseCuttingCreasing|PartialCuttingCreasing|ReversePartialCuttingCreasing|Drilling|Gluing|FoilStamping|ColdFoilStamping|Embossing|Debossing|Perforating|Bleed|VarnishFree|InkFree|InkVarnishFree|Folding|Punching|Stapling|Hologram|Barcode|ContentArea|CodingMarking|Imprinting

Output Intents Quick Fixes

Embed Output Intent

This Quick Fix embeds the specified Output Intent. It is possible to choose between different PDF standards – such as PDF/X, PDF/A etc. – for the output intent to be embedded (these standards mandate that the output intent be the same for all such standards to which a PDF claims conformance, so a single embedded output intent can serve more than one PDF standard in the same PDF file).

{
    "quickfixes": [
        {
            "quickfix": "embed_outputintent",
            "version": "1.0",
            "instructions": [
                {
                    "outputintent_name": "PSO Coated v3 (ECI)",
                    "outputintent_type" : "AX",
                    "retain_existing_outputintent" : false
                }
            ]
        }
    ]
}

//		"outputintent_type": "A|E|X|AE|AX|EX|AEX|X5n"
//		"retain_existing_outputintent": true|false

Embed Output Intent with specified parameters

This Quick Fix embeds a PDF/X, PDF/A and/or PDF/E Output Intent with all the parameters like the ICC color Profile (e.g. CoatedFOGRA27.icc) or an output condition identifier, which is simply a text description of the intended print specifications (e.g. FOGRA27).

{
	"quickfixes" : 
	[
		{
			"instructions" : 
			[
				{
					"outputintent_condition" : "",
					"outputintent_condition_identifier" : "sRGB",
					"outputintent_filepath_icc" : "/var/folders/lr/0vnqj68514j5w4t1pbd9jz840000gn/T/com.callassoftware.pdfToolboxDT/10490/QuickFix-E0mtUs/Adobe RGB (1998).icc",
					"outputintent_info" : "Creator: HP",
					"outputintent_name_icc" : "Adobe RGB (1998)",
					"outputintent_registry" : "http://www.color.org",
					"outputintent_type" : "A",
					"outputintent_url_referenced_icc" : "",
					"retain_existing_outputintent" : false
				}
			],
			"quickfix" : "embed_outputintent_with_params",
			"version" : "1.0"
		}
	]
}


//		"outputintent_type": "A|E|X|AE|AX|EX|AEX|X5n"
//		"retain_existing_outputintent": true|false

Embed Output Intent on page level

This Quick Fix embeds the specified Output Intent on a page level (using page selector). It is possible to choose between different PDF standards – such as PDF/X, PDF/A etc. – for the Output Intent to be embedded.

{
    "quickfixes": [
        {
            "quickfix": "embed_page_outputintent",
            "version": "1.0",
            "instructions": [
                {
                    "outputintent_name": "PSO Coated v3 (ECI)",
                    "outputintent_type" : "AX",
                    "retain_existing_outputintent" : false,
                    "page_selector": "odd"
                }
            ]
		 	}
    ]
}

//		"outputintent_type": "A|E|X|AE|AX|EX|AEX|X5n"
//		"retain_existing_outputintent": true|false
//		"page_selector": "all|even|odd|<splitscheme_expression>"

Embed Output Intent with specified parameters on page level

This Quick Fix embeds a PDF/X, PDF/A and/or PDF/E Output Intent with all the parameters like the ICC color Profile (e.g. CoatedFOGRA27.icc) and an output condition identifier, which is simply a text description of the intended print specifications (e.g. FOGRA27) on a page level (using page selector).

{
	"quickfixes" : 
	[
		{
			"instructions" : 
			[
				{
					"outputintent_condition" : "",
					"outputintent_condition_identifier" : "sRGB",
					"outputintent_filepath_icc" : "/var/folders/lr/0vnqj68514j5w4t1pbd9jz840000gn/T/com.callassoftware.pdfToolboxDT/10490/QuickFix-gTXfRn/Adobe RGB (1998).icc",
					"outputintent_info" : "Creator: HP",
					"outputintent_name_icc" : "Adobe RGB (1998)",
					"outputintent_registry" : "http://www.color.org",
					"outputintent_type" : "A",
					"outputintent_url_referenced_icc" : "",
					"page_selector" : "odd",
					"retain_existing_outputintent" : false
				}
			],
			"quickfix" : "embed_page_outputintent_with_params",
			"version" : "1.0"
		}
	]
}


//		"outputintent_type": "A|E|X|AE|AX|EX|AEX|X5n"
//		"retain_existing_outputintent": true|false
//		"page_selector": "all|even|odd|<splitscheme_expression>"

Remove all Output Intents

This QuickFix removes all output intents in a PDF file.

{
	"quickfixes" : 
	[
		{
			"instructions" : [ {} ],
			"quickfix" : "remove_outputintents",
			"version" : "1.0"
		}
	]
}

Remove page level Output Intents

This Quick Fix removes Output Intents on a page level in a PDF file.

{
	"quickfixes" : 
	[
		{
        "quickfix": "remove_page_outputintents",
        "version": "1.0",
        "instructions": 
        [
            {
                "page_selector": "odd"
            }
        ]
		}
  ]
}


//		"page_selector": "all|even|odd|<splitscheme_expression>"

Resave PDF Quick Fix

Resaves the PDF document by keeping the current version of the PDF document or saving up to another version.

{
	"quickfixes" : 
	[
		{
        "quickfix": "fullsave",
        "version": "1.0",
        "instructions": 
        [
            {
                "pdf_version": "retain"
            }
        ]
		}
  ]
}

//		"pdf_version": "retain|1.4|1.5|1.6|1.7|2.0"

PDF/VT DPart Quick Fix

Inject DPart

This Quick Fix injects very simple DPart data into a PDF file. In essence, it creates logical groups in the form of page ranges. Using the Page selector syntax, a number of approaches exist to define such page ranges:

  • explicitly, e.g. 1-4, 5-8, 9-12 – creates three ranges accordingly, only works in a predictable fashion for PDFs that contain exactly 12 pages; any exceeding pages will be put into their own page range; for PDFs with less than 12 pages, one or several page ranges will be 'incomplete' or missing altogether.
  • rule based, e.g. 4* – creates a page range for each block of four pages
  • all kinds of more complex expressions...

For details see the article Page selection.

The entry for Node name expressed the meaning of the grouped page ranges. This could be arbitrary parts of a book, account statements for a bank's customers, photo books, ...

Where DPPart injection is to be dynamically based upon a PDF's characteristics or content, execution of a Quick Check or a regular check , in combination with some JavaScript, inside a Process Plan, and before execution of a QuickFix with DPart injection, makes it possible to address more advanced scenarios in a very powerful manner. An example is provided in the form of the Process Plan "Create DPart record information from headings" which ships with pdfToolbox 12.

{
	"quickfixes" : [
		{
			"quickfix" : "inject_dpart",
			"version" : "1.0",
			"instructions" : [
				{
					"grouping_expression" : "1-2,3--3,-2--1",
					"node_name" : "Book_parts"
				}
			]
		
		}
	]
}

JavaScript based configuration

This configuration must return a JavaScript object that has a JSON serialisation according to the specification for the Quick Fix features in the form as documented above. Read more about it here.