Basic Actions List
The
Basic Actions offers PDFix’s core automated functionality.
PDFix Batch Actions
Custom PDF actions automate the editing of PDFs and resolve various accessibility issues, streamlining document editing and remediation. This approach enhances efficiency and simplifies tasks by eliminating the need for programming skills. By utilizing a bespoke sequence of actions, you can process PDF documents tailored to your specific requirements
{
"title": "PDFix Batch Action Example",
"desc": "Custom action sequence to re-tag the PDF document and set the PDF/UA-1 identifier",
"actions": [
{
"name": "clear_structure",
"params": [
{
"name": "clear_tags",
"value": true
},
{
"name": "clear_struct_tree",
"value": true
},
{
"name": "clear_bookmarks",
"value": false
}
]
},
{
"name": "add_tags",
"params": [
{
"name": "standard_attrs",
"value": false
},
{
"name": "sequential_headings",
"value": true
}
]
},
{
"name": "set_pdf_ua_standard",
"params": [
{
"name": "part_number",
"value": 1
}
]
}
]
}
Index
Accessibility: Fix Role Mapping, AutoTag, Clear Document Structure, Fix ID Tree, Fix Parent Tree, Fix Spaces, Fix Headings
Annotations: Fix Media Clip, Set Tab Order, Tag Annotations, Set Annotation Contents, Remove Annotation Properties, Flatten Annotations, Create Web Links, Delete Annotations
Bookmarks: Create Bookmarks
Content: Set Content Language, Delete Content, Artifact Content, Flatten Form XObjects, Clone Form XObjects, Remove Content Marks, Set Content Color, Split Content
Conversion: PDF to HTML, PDF to JSON
Fonts: Fix Fonts
Accessibility
Fix Role Mapping
remove_standard_tags_mapping
Resolve issues in the document’s Role Map to ensure correct structure type mappings
params:
-
standard_role_mapping(bool) Remove standard tags mapping – Remove role mapping of standard structure types -
circular_role_mapping(bool) Remove circular role mapping – Detect and remove circular role mappings that is explicitly permitted -
clear_rolemap(bool) Clear Role Map – Clear the role map specified in the structure tree root
example:
{
"name": "remove_standard_tags_mapping",
"params": [
{
"name": "standard_role_mapping",
"value": true
},
{
"name": "circular_role_mapping",
"value": true
},
{
"name": "clear_rolemap",
"value": true
}
]
}
AutoTag
add_tags
Automatically add accessibility tags to an untagged document
params:
-
template(template) Template – Load the layout template from the file as the current template. If the file is empty, the default template will be applied -
preflight(bool) Preflight – Preflight the document and combine the preflight values with the current template -
standard_attrs(bool) Add Layout Attributes – Add all detected layout attributes -
sequential_headings(bool) Sequential Heading Levels – Keep headings in sequentially descending order -
overwrite(bool) Overwrite – Replace existing tag structure if it already exist
example:
{
"name": "add_tags",
"params": [
{
"name": "template",
"value": ""
},
{
"name": "preflight",
"value": false
},
{
"name": "standard_attrs",
"value": false
},
{
"name": "sequential_headings",
"value": false
},
{
"name": "overwrite",
"value": true
}
]
}
Clear Document Structure
clear_structure
Clear the document structure
params:
-
clear_tags(bool) Clear Content Marks – Clear content marks -
clear_struct_tree(bool) Clear Structure Tree – Clear the structure tree -
clear_bookmarks(bool) Clear Bookmarks – Clear bookmarks
example:
{
"name": "clear_structure",
"params": [
{
"name": "clear_tags",
"value": true
},
{
"name": "clear_struct_tree",
"value": true
},
{
"name": "clear_bookmarks",
"value": true
}
]
}
Fix ID Tree
fix_id_tree
Repair the document ID tree to restore valid references for structure elements and tagged content
example:
{
"name": "fix_id_tree"
}
Fix Parent Tree
fix_parent_tree
Fix the parent tree
example:
{
"name": "fix_parent_tree"
}
Fix Spaces
fix_structure_spaces
Add missing or resolve duplicate white spaces within a structure element
params:
-
add_missing_spaces(bool) Add Missing Spaces – Identify words in the structure and add missing spaces -
remove_unnecessary_spaces(bool) Remove Unnecessary Spaces – Remove duplicate spaces after each word -
artifact_unnecessary_spaces(bool) Artifact Unnecessary Spaces – Mark duplicate spaces as artifacts
example:
{
"name": "fix_structure_spaces",
"params": [
{
"name": "add_missing_spaces",
"value": true
},
{
"name": "remove_unnecessary_spaces",
"value": false
},
{
"name": "artifact_unnecessary_spaces",
"value": true
}
]
}
Fix Headings
fix_headings
Repair logical heading structure for accessibility (PDF/UA): optional H1–H6 from style, then fix invalid level sequence (no skipped levels).
params:
-
fix_heading_levels(bool) Assign heading levels (H1–H6) – Infer H1–H6 from font style and leading numbering for generic H tags before sequence repair. -
renumber_headings(int) Fix heading structure – How to correct invalid heading levels after assignment (PDF/UA: headings follow a logical sequence; levels must not skip).- 0 – Paragraph (P) for invalid heading structure
- 1 – Align to next sequential heading level
- 2 – Insert empty headings for skipped levels
example:
{
"name": "fix_headings",
"params": [
{
"name": "fix_heading_levels",
"value": true
},
{
"name": "renumber_headings",
"value": 2
}
]
}
Annotations
Fix Media Clip
fix_media_clip_keys
Define a MIME type for the media clip annotation file
params:
-
ct_key(string) Media Clip – CT key- text/plain – text/plain
- text/html – text/html
- image/jpeg – image/jpeg
- audio/mp3 – audio/mp3
- video/mp4 – video/mp4
example:
{
"name": "fix_media_clip_keys",
"params": [
{
"name": "ct_key",
"value": "text/plain"
}
]
}
Set Tab Order
set_tabs_key
Set the tab order key for every page. Every page containing an annotation must have the Tabs key set to S
params:
-
tabs_key(string) Tabs Key – Specify the tab order key -
overwrite(bool) Overwrite – Replace the current tab order key if it already exists
example:
{
"name": "set_tabs_key",
"params": [
{
"name": "tabs_key",
"value": "S"
},
{
"name": "overwrite",
"value": true
}
]
}
Tag Annotations
tag_annot
Tag untagged annotations by placing them in the closest matching tag
params:
annot_types(annot) Annotations – Specify annotation types using a ECMAScript regular expression or define them by template annot_update
example:
{
"name": "tag_annot",
"params": [
{
"name": "annot_types",
"value": "^(?!.*Popup).*$"
}
]
}
Set Annotation Contents
set_annot_contents
Set an alternative description for an annotation using the Contents key or TU key for widget annotations
params:
-
annot_types(annot) Select Annotations – Specify annotation types using a ECMAScript regular expression or define them by template annot_update -
alt_type(int) Contents – Define the source for detecting alternative text- 0 – Custom text
- 1 – Text from annotation bounding box
- 2 – Action destination
- 3 – Auto generated text
- 4 – Use text from the first matching tag above
- 5 – Use text from the first matching tag below
- 6 – Use the text parent tag content
-
custom_text(string) Custom Text – Enter custom text for the Contents key -
description_tag(string) Use Text from Tag – Tag types, pipe-separated (e.g. P|H1|Lbl). Leave empty to use the first tag with text regardless of type. Otherwise use text from the first matching tag for the annotation contents. -
bbox_padding_x(float) Left BBox Padding – Adjust horizontal padding (X axis) for the left edge of the BBox -
bbox_padding_x_right(float) Right BBox Padding – Adjust horizontal padding (X axis) for the right edge of the BBox -
bbox_padding_y_top(float) Top BBox Padding – Adjust vertical padding (Y axis) for the top edge of the BBox -
bbox_padding_y(float) Bottom BBox Padding – Adjust vertical padding (Y axis) for the bottom edge of the BBox -
overwrite(bool) Overwrite – Replace the current alternative description if it already exists
example:
{
"name": "set_annot_contents",
"params": [
{
"name": "annot_types",
"value": ".*"
},
{
"name": "alt_type",
"value": 1
},
{
"name": "custom_text",
"value": "Decorative"
},
{
"name": "description_tag",
"value": ""
},
{
"name": "bbox_padding_x",
"value": 4
},
{
"name": "bbox_padding_x_right",
"value": 4
},
{
"name": "bbox_padding_y_top",
"value": 4
},
{
"name": "bbox_padding_y",
"value": 4
},
{
"name": "overwrite",
"value": false
}
]
}
Remove Annotation Properties
remove_annot_data
Remove properties from the annotations
params:
-
annot_types(annot) Annotations – Specify annotation types using a ECMAScript regular expression or define them by template annot_update -
remove_contents(bool) Remove Contents – Remove the Contents key
example:
{
"name": "remove_annot_data",
"params": [
{
"name": "annot_types",
"value": ".*"
},
{
"name": "remove_contents",
"value": true
}
]
}
Flatten Annotations
flatten_annot
Flatten the visual representation of annotations into the content layer. This prevents issues with annotation tagging when interactivity is not needed in a PDF/UA-compliant document
params:
annot_types(annot) Annotations – Specify annotation types using a ECMAScript regular expression or define them by template annot_update
example:
{
"name": "flatten_annot",
"params": [
{
"name": "annot_types",
"value": "^(?!.*Link|.*Widget|.*Popup).*$"
}
]
}
Create Web Links
create_web_links
Create link annotations from web addresses and email patterns found in the page content
params:
-
url_regex(string) URL Pattern – Specify a ECMAScript regular expression to identify web or email links in the content. The matched text will be used as the link target unless overridden by the URL Address or modified by adding the URL Prefix- ^(((http(s)?|ftp):\/\/)|(mailto:)|www.)[^\s\/$.?#].[^\s]*
- _^[a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}__
-
url_prefix(string) URL Prefix – Prepend this prefix to the detected URL or email if it does not already begin with a known scheme (e.g., http, mailto). This is useful for ensuring that URLs are correctly formatted-
- http://
- https://
- ftp://
- file://
- mailto:
- tel:
- data:
- ws://
- wss://
-
-
url(string) URL Address – Set the destination URL. If this is set, it overrides the matched text and any prefix added by the URL Prefix
example:
{
"name": "create_web_links",
"params": [
{
"name": "url_regex",
"value": "^(((http(s)?|ftp):\\/\\/)|(mailto:)|www.)[^\\s\\/$.?#].[^\\s]*"
},
{
"name": "url_prefix",
"value": "data:"
},
{
"name": "url",
"value": ""
}
]
}
Delete Annotations
delete_annot
Completely remove an annotation from the PDF. Use this action when certain annotation types (e.g., TrapNet) are not permitted in a PDF/UA-compliant document
params:
annot_types(annot) Annotations – Specify annotation types using a ECMAScript regular expression or define them by template annot_update
example:
{
"name": "delete_annot",
"params": [
{
"name": "annot_types",
"value": "^TrapNet$"
}
]
}
Bookmarks
Create Bookmarks
create_bookmarks
Create bookmarks from the tag tree hierarchy
params:
-
tag_1(tag) Level 1 – Define tag types using a ECMAScript regular expression or specify them by template -
tag_2(tag) Level 2 – Define the tag that represents second level -
tag_3(tag) Level 3 – Define the tag that represents third level -
tag_4(tag) Level 4 – Define the tag that represents fourth level -
tag_5(tag) Level 5 – Define the tag that represents fifth level -
tag_6(tag) Level 6 – Define the tag that represents sixth level -
overwrite(bool) Overwrite – Replace existing bookmarks if they already exist
example:
{
"name": "create_bookmarks",
"params": [
{
"name": "tag_1",
"value": "^H1$"
},
{
"name": "tag_2",
"value": "^H2$"
},
{
"name": "tag_3",
"value": "^H3$"
},
{
"name": "tag_4",
"value": "^H4$"
},
{
"name": "tag_5",
"value": "^H5$"
},
{
"name": "tag_6",
"value": "^H6$"
},
{
"name": "overwrite",
"value": false
}
]
}
Content
Set Content Language
set_content_language
Set the content language
params:
-
object_types(object) Objects – Define the objects by the template object_update -
lang(lang) Language – Content language -
overwrite(bool) Overwrite – Replace the current language if it already exists
example:
{
"name": "set_content_language",
"params": [
{
"name": "object_types",
"value": ".*"
},
{
"name": "lang",
"value": "en-US"
},
{
"name": "overwrite",
"value": false
}
]
}
Delete Content
delete_content
Completely remove a content from the PDF
params:
object_types(object) Objects – Define the page content objects to be deleted
example:
{
"name": "delete_content",
"params": [
{
"name": "object_types",
"value": ""
}
]
}
Artifact Content
artifact_content
Mark defined content as an artifact
params:
-
object_types(object) Objects – Specify the objects using the object_update template -
artifact_type(int) Mark as – Mark the content as an artifact, header, or footer- 0 – Artifact
- 1 – Header
- 2 – Footer
example:
{
"name": "artifact_content",
"params": [
{
"name": "object_types",
"value": {
"template": {
"object_update": [
{
"query": {
"$and": [
{
"$0_artifact": "false"
},
{
"$0_mcid": "-1"
}
],
"param": [
"pds_object"
]
},
"statement": "$if"
}
]
}
}
},
{
"name": "artifact_type",
"value": 0
}
]
}
Flatten Form XObjects
flatten_xobject
Flatten Form XObjects
params:
object_types(object) Objects – Define the objects by the template object_update
example:
{
"name": "flatten_xobject",
"params": [
{
"name": "object_types",
"value": "^pds_form$"
}
]
}
Clone Form XObjects
clone_xobject
Clone Form XObjects
params:
object_types(object) Objects – Define the objects by the template object_update
example:
{
"name": "clone_xobject",
"params": [
{
"name": "object_types",
"value": "^pds_form$"
}
]
}
Remove Content Marks
remove_content_marks
Remove artifacts, MCIDs, or any custom tags from page content objects. Remove All Containers by checking all flags.
params:
-
object_types(object) Objects – Define the objects by the template object_update -
flags(flag) Remove – Specify types of marked content to be removed- 8 – Remove Invalid MCID
- 4 – Remove Custom Content Mark
- 1 – Remove MCID
- 2 – Remove Artifact
example:
{
"name": "remove_content_marks",
"params": [
{
"name": "object_types",
"value": ".*"
},
{
"name": "flags",
"value": 8
}
]
}
Set Content Color
set_content_color
Change the fill and/or stroke color of specified content objects
params:
-
object_types(object) Objects – Define the page objects using the object_update template -
fill_color(string) Fill Color – Specify a new fill color using the format RGB(127,255,0) or CMYK(25,84,50,100). Leave empty to keep the current color unchanged -
stroke_color(string) Stroke Color – Specify a new stroke color using the format RGB(127,255,0) or CMYK(25,84,50,100). Leave empty to keep the current color unchanged
example:
{
"name": "set_content_color",
"params": [
{
"name": "object_types",
"value": ".*"
},
{
"name": "fill_color",
"value": "RGB(0,0,0)"
},
{
"name": "stroke_color",
"value": "RGB(0,0,0)"
}
]
}
Split Content
split_content
Split specified content objects
params:
-
object_types(object) Objects – Define the page objects using the object_update template -
index(int) Index – Specify an index of the substing. Negative value indicates the last character and oposite direction (-1 is the last character, -2 is the second last, etc.) -
length(int) Length – Specify the number of character to be included in the substring. 0 indicates all characters from the index to the end/start. It’s ignored if text is specified -
text(string) Text – Specify the substring of characters (regex) to be included in the substring. Leave empty to ignore
example:
{
"name": "split_content",
"params": [
{
"name": "object_types",
"value": ".*"
},
{
"name": "index",
"value": "0"
},
{
"name": "length",
"value": "0"
},
{
"name": "text",
"value": ""
}
]
}
Conversion
PDF to HTML
pdf_to_html
Convert a PDF to HTML
params:
-
input_pdf(file_path) Input PDF – Specify the input PDF file path -
output_html(file_path) Ouput HTML – Specify the output HTML file -
html_type(int) HTML Layout – Choose the HTML layout type- 0 – Original layout
- 1 – Responsive layout
- 2 – Layout defined by PDF Tags
-
template(template) Template – Load the template from a file as the current template. If the file is empty, the default template will be applied -
preflight(bool) Preflight – Preflight the document and merge its preflight values with the current template -
flags(flag) Conversion Flags – Define conversion flags- 1 – Export JavaScript
- 2 – Export fonts
- 4 – Use default font sizes
- 8 – Retain text color
- 32 – Inline CSS styles
- 64 – Inline JavaScript code
- 128 – Embed images within the document
- 256 – Embed fonts within the document
- 512 – Apply gray padding
example:
{
"name": "pdf_to_html"
}
PDF to JSON
pdf_to_json
Convert a PDF to JSON
params:
-
input_pdf(file_path) Input PDF – Specify the input PDF file path -
output_json(file_path) Output JSON – Specify the output JSON file path -
flags(flag) Conversion Flags – Specify flags for the extracted content- 1 – Include document metadata
- 2 – Include page information
- 16 – Extract page content
- 32 – Extract document structure tree
- 64 – Extract layout recognition
- 256 – Include bounding box data
- 512 – Include content marks
- 4096 – Include text content
- 8192 – Include text style
- 16384 – Include text state
- 65536 – Extract images as base64
- 131072 – Extract annotations
- 262144 – Extract bookmarks
example:
{
"name": "pdf_to_json"
}
Fonts
Fix Fonts
embed_font
Embed and fix all fonts used in the document to ensure consistent rendering and reliable text extraction across platforms and assistive technologies.
params:
-
embed_font(bool) Embed Font – Embed fonts if not already embedded -
add_missing_unicode(bool) Add Missing Unicodes – Add missing unicode mappings -
type0_cid_system_info(bool) Type 0 CIDSystemInfo – UA1:7.21.3.1: A Type 0 font dictionary with encoding other than Identity-H and Identity-V failure condition. -
type2_cid_to_gid_map(bool) Type 2 CIDToGIDMap – UA1:7.21.3.2: A Type 2 CID font CIDToGIDMap failure condition -
glyph_widths(bool) Glyph Widths – UA1:7.21.5: For one or more glyphs, the glyph width information in the font dictionary and in the embedded font program differ by more than 1/1000 unit -
notdef_glyph(bool) Reference the .notdef glyph – UA1:7.21.8: One or more characters used in text showing operators reference the .notdef glyph
example:
{
"name": "embed_font",
"params": [
{
"name": "embed_font",
"value": false
},
{
"name": "add_missing_unicode",
"value": true
},
{
"name": "type0_cid_system_info",
"value": true
},
{
"name": "type2_cid_to_gid_map",
"value": true
},
{
"name": "glyph_widths",
"value": true
},
{
"name": "notdef_glyph",
"value": true
}
]
}
Metadata
Set Document Properties
set_doc_info
Set document metadata and properties
params:
-
set_author(bool) Set Author – Set the document author -
author(string) Author – Specify the author -
set_title(bool) Set Title – Set the document title -
title(string) Title – Specify the title -
set_subject(bool) Set Subject – Set the document subject -
subject(string) Subject – Specify the subject -
set_keywords(bool) Set Keywords – Set the document keywords -
keywords(string) Keywords – Specify the keywords -
set_producer(bool) Set Producer – Set the document producer -
producer(string) Producer – Specify the producer name -
set_creator(bool) Set Creator – Set the document creator -
creator(string) Creator – Specify the creator
example:
{
"name": "set_doc_info",
"params": [
{
"name": "set_author",
"value": true
},
{
"name": "author",
"value": ""
},
{
"name": "set_title",
"value": true
},
{
"name": "title",
"value": ""
},
{
"name": "set_subject",
"value": true
},
{
"name": "subject",
"value": ""
},
{
"name": "set_keywords",
"value": true
},
{
"name": "keywords",
"value": ""
},
{
"name": "set_producer",
"value": true
},
{
"name": "producer",
"value": ""
},
{
"name": "set_creator",
"value": true
},
{
"name": "creator",
"value": ""
}
]
}
Set PDF Version
set_pdf_version
Set the PDF version
params:
-
version_number(int) PDF Version – Choose the PDF version designation- 14 – PDF 1.4
- 15 – PDF 1.5
- 16 – PDF 1.6
- 17 – PDF 1.7
- 20 – PDF 2.0
example:
{
"name": "set_pdf_version",
"params": [
{
"name": "version_number",
"value": 17
}
]
}
Set PDF/UA Standard
set_pdf_ua_standard
Set the PDF/UA identifier
params:
-
part_number(string) Part Identifier – Specify the part number of the International Standard to which the file conforms- ____ – Remove PDF/UA Part Number
- 1 – Set PDF/UA-1
- 2 – Set PDF/UA-2
-
rev_number(string) Rev Number – Specify the four-digit year of publication or revision (ignored for part 1)
example:
{
"name": "set_pdf_ua_standard",
"params": [
{
"name": "part_number",
"value": "1"
},
{
"name": "rev_number",
"value": "2023"
}
]
}
Set Suspect Value
set_suspect_value
Fix the document MarkInfo dictionary and Suspects entry
example:
{
"name": "set_suspect_value"
}
Fix Optional Content
fix_oc_name
Fix the optional content configuration dictionary
example:
{
"name": "fix_oc_name"
}
Fix XMP Metadata
fix_metadata
Repair, normalize, and optionally reset document XMP metadata for improved compliance and consistency
params:
reset_metadata(bool) Reset Metadata – Recreate XMP metadata from scratch by removing all non-essential and custom entries, keeping only the minimal set required for standards compliance
example:
{
"name": "fix_metadata",
"params": [
{
"name": "reset_metadata",
"value": false
}
]
}
Fix Display Document Title
set_display_doc_title
Fix the ViewerPreferences dictionary
example:
{
"name": "set_display_doc_title"
}
Set Document Language
set_language
Set the document language
params:
-
lang(lang) Language – Document language -
overwrite(bool) Overwrite – Replace the current language if it already exists
example:
{
"name": "set_language",
"params": [
{
"name": "lang",
"value": "en-US"
},
{
"name": "overwrite",
"value": false
}
]
}
Set Title
set_title
Set the document title
params:
-
title_type(int) Title – Define a source for detecting the document title- 0 – Define a custom title
- 1 – Use text from the first matching tag
- 2 – Get title from the file name
-
custom_text(string) Custom Title – Custom title -
description_tag(string) Use Text from Tag – Define the tag type whose content is used for the title text -
overwrite(bool) Overwrite – Replace the current title if it already exists
example:
{
"name": "set_title",
"params": [
{
"name": "title_type",
"value": 2
},
{
"name": "custom_text",
"value": ""
},
{
"name": "description_tag",
"value": "Caption"
},
{
"name": "overwrite",
"value": false
}
]
}
Pages
Rotate Page
rotate_pages
Rotate pages
params:
-
object_types(object) Pages – Select pages using ECMAScript regular expression or by defining anchors in a template -
rotation_type(int) Rotation Type – Specify the type of rotation- 0 – Set rotation angle
- 1 – Rotate by angle
-
rotation_angle(int) Rotation Angle – Specify the rotation angle- 0 – 0 degrees
- 90 – 90 degrees
- 180 – 180 degrees
- 270 – 270 degrees
example:
{
"name": "rotate_pages",
"params": [
{
"name": "object_types",
"value": ".*"
},
{
"name": "rotation_type",
"value": 1
},
{
"name": "rotation_angle",
"value": 0
}
]
}
Normalize Page Orientation
fix_page_orientation
Correct the orientation of selected pages and normalize their transformation matrix and bounding box
params:
object_types(object) Pages – Select pages using ECMAScript regular expression or by defining anchors in a template
example:
{
"name": "fix_page_orientation",
"params": [
{
"name": "object_types",
"value": ".*"
}
]
}
Split Pages
split_pages
Split a PDF into multiple documents based on defined page rules or template anchors
params:
-
base_pdf(file_path) Output Path – Specify the output folder based on the input file pathh -
object_types(object) Splitters – Specify split rules using ECMAScript regular expression for page numbers or template-defined anchors
example:
{
"name": "split_pages",
"params": [
{
"name": "base_pdf",
"value": ""
},
{
"name": "object_types",
"value": ".*"
}
]
}
Table
Fix Table Tag
fix_table_tag
Resolve structural errors in tables to ensure PDF/UA compliance, including span consistency and invalid nesting
params:
-
tag_names(tag) Tags – Specify the table tags using a ECMAScript regular expression or define them by template -
flatten_table(bool) Flatten Table Structure – Convert the table hierarchy (Table->Div, TR->Div) to flatten incorrectly formatted tables -
fix_table_spans(bool) Fix Cell Spans – Normalize RowSpan and ColSpan attributes to ensure that all rows contain the same number of columns -
fix_table_headers(bool) Add Missing Headers – Generate missing header cells to ensure proper table structure -
fix_nested(string) Fix Invalid Nesting – Resolve issues with disallowed tags nested within table- none – Do not fix
- move – Move invalid nested tags outside the Table element
- artifact – Convert invalid nested tags to artifacts
example:
{
"name": "fix_table_tag",
"params": [
{
"name": "tag_names",
"value": "^Table$"
},
{
"name": "flatten_table",
"value": false
},
{
"name": "fix_table_spans",
"value": false
},
{
"name": "fix_table_headers",
"value": true
},
{
"name": "fix_nested",
"value": "artifact"
}
]
}
Set Table Cells Attributes
set_table_header
Fix table header and data cells
params:
-
tag_names(tag) Tags – Specify the table cell tags using a ECMAScript regular expression or define them by template tag_update -
scope(string) Scope – Specify whether the header cell applies to a row, column, or both- None – None
- Row – Row
- Column – Column
- Both – Both
-
row_span(int) RowSpan – Set the row span for the cell. Use -1 to keep the existing RowSpan -
col_span(int) ColSpan – Set the column span for the cell. Use -1 to keep the existing ColSpan -
tag_name(string) Change to – Specify a new tag type (TD or TH) for the cell. Leave empty to retain the existing type -
overwrite(bool) Overwrite – Replace current properties if they already exist
example:
{
"name": "set_table_header",
"params": [
{
"name": "tag_names",
"value": "^TD$"
},
{
"name": "scope",
"value": "None"
},
{
"name": "row_span",
"value": -1
},
{
"name": "col_span",
"value": -1
},
{
"name": "tag_name",
"value": "TH"
},
{
"name": "overwrite",
"value": false
}
]
}
Set Table Summary
set_table_summary
Provide a summary of the table. Only applicable to Table tags
params:
-
tag_names(tag) Tags – Specify the table tags using a ECMAScript regular expression or define them by template -
summary_type(int) Summary – Define a source for detecting the summary- 0 – Define the Custom Summary
- 1 – Use the associated TH content
- 2 – Use the associated tag content
-
custom_text(string) Custom Summary – Enter custom text as the table summary -
overwrite(bool) Overwrite – Replace the table summary if it already exists
example:
{
"name": "set_table_summary",
"params": [
{
"name": "tag_names",
"value": "^Table$"
},
{
"name": "summary_type",
"value": 2
},
{
"name": "custom_text",
"value": "Summary"
},
{
"name": "overwrite",
"value": false
}
]
}


