Save as PDF WordPress Plugin Reference

Page Setup

Page Size
Set the output page size.
Allowed values:
  • A0
  • A1
  • A2
  • A3
  • A4
  • A5
  • A6
  • Letter
Default: A4
Examples:
  • Plugin settings: Page Setup tab → Page Size option
    Letter
  • Shortcode: page_size
    [save_as_pdf_pdfcrowd page_size="Letter"]
  • PHP function: page_size
    echo create_save_as_pdf_pdfcrowd_button(array('page_size' => 'Letter'));
Page Width
Set the output page width. The safe maximum is 200in otherwise some PDF viewers may be unable to open the PDF.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 8.27in
Examples:
  • Plugin settings: Page Setup tab → Page Width option
    9.5in
  • Shortcode: page_width
    [save_as_pdf_pdfcrowd page_width="9.5in"]
  • PHP function: page_width
    echo create_save_as_pdf_pdfcrowd_button(array('page_width' => '9.5in'));
Page Height
Set the output page height. Use -1 for a single page PDF. The safe maximum is 200in otherwise some PDF viewers may be unable to open the PDF.
Constraint:
  • The value must be -1 or specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 11.7in
Examples:
  • Plugin settings: Page Setup tab → Page Height option
    350mm
  • Shortcode: page_height
    [save_as_pdf_pdfcrowd page_height="350mm"]
  • PHP function: page_height
    echo create_save_as_pdf_pdfcrowd_button(array('page_height' => '350mm'));
Orientation
Set the output page orientation.
Allowed values:
  • landscape
  • portrait
Default: portrait
Examples:
  • Plugin settings: Page Setup tab → Orientation option
    landscape
  • Shortcode: orientation
    [save_as_pdf_pdfcrowd orientation="landscape"]
  • PHP function: orientation
    echo create_save_as_pdf_pdfcrowd_button(array('orientation' => 'landscape'));
Margin Top
Set the output page top margin.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 0.4in
Examples:
  • Plugin settings: Page Setup tab → Margin Top option
    2.5cm
  • Shortcode: margin_top
    [save_as_pdf_pdfcrowd margin_top="2.5cm"]
  • PHP function: margin_top
    echo create_save_as_pdf_pdfcrowd_button(array('margin_top' => '2.5cm'));
Margin Right
Set the output page right margin.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 0.4in
Examples:
  • Plugin settings: Page Setup tab → Margin Right option
    2.5cm
  • Shortcode: margin_right
    [save_as_pdf_pdfcrowd margin_right="2.5cm"]
  • PHP function: margin_right
    echo create_save_as_pdf_pdfcrowd_button(array('margin_right' => '2.5cm'));
Margin Bottom
Set the output page bottom margin.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 0.4in
Examples:
  • Plugin settings: Page Setup tab → Margin Bottom option
    2.5cm
  • Shortcode: margin_bottom
    [save_as_pdf_pdfcrowd margin_bottom="2.5cm"]
  • PHP function: margin_bottom
    echo create_save_as_pdf_pdfcrowd_button(array('margin_bottom' => '2.5cm'));
Margin Left
Set the output page left margin.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 0.4in
Examples:
  • Plugin settings: Page Setup tab → Margin Left option
    2.5cm
  • Shortcode: margin_left
    [save_as_pdf_pdfcrowd margin_left="2.5cm"]
  • PHP function: margin_left
    echo create_save_as_pdf_pdfcrowd_button(array('margin_left' => '2.5cm'));
No Margins
Disable page margins.
Default: false
Examples:
  • Plugin settings: Page Setup tab → No Margins checkbox
  • Shortcode: no_margins
    [save_as_pdf_pdfcrowd no_margins=true]
  • PHP function: no_margins
    echo create_save_as_pdf_pdfcrowd_button(array('no_margins' => true));
Set the page range to print.
Constraint:
  • A comma separated list of page numbers or ranges.
Examples:
  • Plugin settings: Page Setup tab → Print Page Range option
    3,6-9
  • Shortcode: print_page_range
    [save_as_pdf_pdfcrowd print_page_range="3,6-9"]
  • PHP function: print_page_range
    echo create_save_as_pdf_pdfcrowd_button(array('print_page_range' => '3,6-9'));
Page Numbering Offset
Set an offset between physical and logical page numbers.
Default: 0
Examples:
  • Plugin settings: Page Setup tab → Page Numbering Offset option
    -10
  • Shortcode: page_numbering_offset
    [save_as_pdf_pdfcrowd page_numbering_offset=-10]
  • PHP function: page_numbering_offset
    echo create_save_as_pdf_pdfcrowd_button(array('page_numbering_offset' => -10));
Content Area X
Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt". It may contain a negative value.
Default: 0in
Examples:
  • Plugin settings: Page Setup tab → Content Area X option
    2.5cm
  • Shortcode: content_area_x
    [save_as_pdf_pdfcrowd content_area_x="2.5cm"]
  • PHP function: content_area_x
    echo create_save_as_pdf_pdfcrowd_button(array('content_area_x' => '2.5cm'));
Content Area Y
Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt". It may contain a negative value.
Default: 0in
Examples:
  • Plugin settings: Page Setup tab → Content Area Y option
    2.5cm
  • Shortcode: content_area_y
    [save_as_pdf_pdfcrowd content_area_y="2.5cm"]
  • PHP function: content_area_y
    echo create_save_as_pdf_pdfcrowd_button(array('content_area_y' => '2.5cm'));
Content Area Width
Set the width of the content area. It should be at least 1 inch.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: The width of the print area.
Examples:
  • Plugin settings: Page Setup tab → Content Area Width option
    25cm
  • Shortcode: content_area_width
    [save_as_pdf_pdfcrowd content_area_width="25cm"]
  • PHP function: content_area_width
    echo create_save_as_pdf_pdfcrowd_button(array('content_area_width' => '25cm'));
Content Area Height
Set the height of the content area. It should be at least 1 inch.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: The height of the print area.
Examples:
  • Plugin settings: Page Setup tab → Content Area Height option
    25cm
  • Shortcode: content_area_height
    [save_as_pdf_pdfcrowd content_area_height="25cm"]
  • PHP function: content_area_height
    echo create_save_as_pdf_pdfcrowd_button(array('content_area_height' => '25cm'));
CSS Page Rule Mode
Specifies behavior in presence of CSS @page rules. It may affect the page size, margins and orientation.
Allowed values:
  • default
    The Pdfcrowd API page settings are preferred.
  • mode1
    The converter version 18.10 mode.
  • mode2
    CSS @page rule is preferred.
Default: default
Examples:
  • Plugin settings: Page Setup tab → CSS Page Rule Mode option
    CSS @page rule is preferred.
  • Shortcode: css_page_rule_mode
    [save_as_pdf_pdfcrowd css_page_rule_mode="mode2"]
  • PHP function: css_page_rule_mode
    echo create_save_as_pdf_pdfcrowd_button(array('css_page_rule_mode' => 'mode2'));
Header URL
Load an HTML code from the specified URL and use it as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows:
  • pdfcrowd-page-count - the total page count of printed pages
  • pdfcrowd-page-number - the current page number
  • pdfcrowd-source-url - the source URL of the converted document
  • pdfcrowd-source-title - the title of the converted document
The following attributes can be used:
  • data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values:
    • arabic - Arabic numerals, they are used by default
    • roman - Roman numerals
    • eastern-arabic - Eastern Arabic numerals
    • bengali - Bengali numerals
    • devanagari - Devanagari numerals
    • thai - Thai numerals
    • east-asia - Chinese, Vietnamese, Japanese and Korean numerals
    • chinese-formal - Chinese formal numerals
    Please contact us if you need another type of numerals.
    Example:
    <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span>
  • data-pdfcrowd-placement - specifies where to place the source URL. Allowed values:
    • The URL is inserted to the content
      • Example: <span class='pdfcrowd-source-url'></span>
        will produce <span>http://example.com</span>
    • href - the URL is set to the href attribute
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a>
        will produce <a href='http://example.com'>Link to source</a>
    • href-and-content - the URL is set to the href attribute and to the content
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a>
        will produce <a href='http://example.com'>http://example.com</a>
Constraint:
  • The supported protocols are http:// and https://.
Examples:
  • Plugin settings: Header & Footer tab → Header URL option
    http://myserver.com/header.html
  • Shortcode: header_url
    [save_as_pdf_pdfcrowd header_url="http://myserver.com/header.html"]
  • PHP function: header_url
    echo create_save_as_pdf_pdfcrowd_button(array('header_url' => 'http://myserver.com/header.html'));
Header HTML
Use the specified HTML code as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows:
  • pdfcrowd-page-count - the total page count of printed pages
  • pdfcrowd-page-number - the current page number
  • pdfcrowd-source-url - the source URL of the converted document
  • pdfcrowd-source-title - the title of the converted document
The following attributes can be used:
  • data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values:
    • arabic - Arabic numerals, they are used by default
    • roman - Roman numerals
    • eastern-arabic - Eastern Arabic numerals
    • bengali - Bengali numerals
    • devanagari - Devanagari numerals
    • thai - Thai numerals
    • east-asia - Chinese, Vietnamese, Japanese and Korean numerals
    • chinese-formal - Chinese formal numerals
    Please contact us if you need another type of numerals.
    Example:
    <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span>
  • data-pdfcrowd-placement - specifies where to place the source URL. Allowed values:
    • The URL is inserted to the content
      • Example: <span class='pdfcrowd-source-url'></span>
        will produce <span>http://example.com</span>
    • href - the URL is set to the href attribute
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a>
        will produce <a href='http://example.com'>Link to source</a>
    • href-and-content - the URL is set to the href attribute and to the content
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a>
        will produce <a href='http://example.com'>http://example.com</a>
Examples:
  • Plugin settings: Header & Footer tab → Header HTML option
    Page <span class='pdfcrowd-page-number'></span> of <span class='pdfcrowd-page-count'></span> pages
  • Shortcode: header_html
    [save_as_pdf_pdfcrowd header_html="Page <span class='pdfcrowd-page-number'></span> of <span class='pdfcrowd-page-count'></span> pages"]
  • PHP function: header_html
    echo create_save_as_pdf_pdfcrowd_button(array('header_html' => 'Page <span class="pdfcrowd-page-number"></span> of <span class="pdfcrowd-page-count"></span> pages'));
Header Height
Set the header height.
Constraint:
  • The value must be specified in inches "in", millimeters "mm", centimeters "cm", or points "pt".
Default: 0.5in
Examples:
  • Plugin settings: Header & Footer tab → Header Height option
    1in
  • Shortcode: header_height
    [save_as_pdf_pdfcrowd header_height="1in"]
  • PHP function: header_height
    echo create_save_as_pdf_pdfcrowd_button(array('header_height' => '1in'));
Load an HTML code from the specified URL and use it as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows:
  • pdfcrowd-page-count - the total page count of printed pages
  • pdfcrowd-page-number - the current page number
  • pdfcrowd-source-url - the source URL of the converted document
  • pdfcrowd-source-title - the title of the converted document
The following attributes can be used:
  • data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values:
    • arabic - Arabic numerals, they are used by default
    • roman - Roman numerals
    • eastern-arabic - Eastern Arabic numerals
    • bengali - Bengali numerals
    • devanagari - Devanagari numerals
    • thai - Thai numerals
    • east-asia - Chinese, Vietnamese, Japanese and Korean numerals
    • chinese-formal - Chinese formal numerals
    Please contact us if you need another type of numerals.
    Example:
    <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span>
  • data-pdfcrowd-placement - specifies where to place the source URL. Allowed values:
    • The URL is inserted to the content
      • Example: <span class='pdfcrowd-source-url'></span>
        will produce <span>http://example.com</span>
    • href - the URL is set to the href attribute
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a>
        will produce <a href='http://example.com'>Link to source</a>
    • href-and-content - the URL is set to the href attribute and to the content
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a>
        will produce <a href='http://example.com'>http://example.com</a>
Examples:
  • Plugin settings: Header & Footer tab → Footer URL option
    http://myserver.com/header.html
  • Shortcode: footer_url
    [save_as_pdf_pdfcrowd footer_url="http://myserver.com/header.html"]
  • PHP function: footer_url
    echo create_save_as_pdf_pdfcrowd_button(array('footer_url' => 'http://myserver.com/header.html'));
Use the specified HTML as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows:
  • pdfcrowd-page-count - the total page count of printed pages
  • pdfcrowd-page-number - the current page number
  • pdfcrowd-source-url - the source URL of the converted document
  • pdfcrowd-source-title - the title of the converted document
The following attributes can be used:
  • data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values:
    • arabic - Arabic numerals, they are used by default
    • roman - Roman numerals
    • eastern-arabic - Eastern Arabic numerals
    • bengali - Bengali numerals
    • devanagari - Devanagari numerals
    • thai - Thai numerals
    • east-asia - Chinese, Vietnamese, Japanese and Korean numerals
    • chinese-formal - Chinese formal numerals
    Please contact us if you need another type of numerals.
    Example:
    <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span>
  • data-pdfcrowd-placement - specifies where to place the source URL. Allowed values:
    • The URL is inserted to the content
      • Example: <span class='pdfcrowd-source-url'></span>
        will produce <span>http://example.com</span>
    • href - the URL is set to the href attribute
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a>
        will produce <a href='http://example.com'>Link to source</a>
    • href-and-content - the URL is set to the href attribute and to the content
      • Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a>
        will produce <a href='http://example.com'>http://example.com</a>
Examples:
  • Plugin settings: Header & Footer tab → Footer HTML option
    Page <span class='pdfcrowd-page-number'></span> of <span class='pdfcrowd-page-count'></span> pages
  • Shortcode: footer_html
    [save_as_pdf_pdfcrowd footer_html="Page <span class='pdfcrowd-page-number'></span> of <span class='pdfcrowd-page-count'></span> pages"]
  • PHP function: footer_html
    echo create_save_as_pdf_pdfcrowd_button(array('footer_html' => 'Page <span class="pdfcrowd-page-number"></span> of <span class="pdfcrowd-page-count"></span> pages'));
Set the footer height.
Examples:
  • Plugin settings: Header & Footer tab → Footer Height option
    1in
  • Shortcode: footer_height
    [save_as_pdf_pdfcrowd footer_height="1in"]
  • PHP function: footer_height
    echo create_save_as_pdf_pdfcrowd_button(array('footer_height' => '1in'));
Disable horizontal page margins for header and footer. The header/footer contents width will be equal to the physical page width.
Examples:
  • Plugin settings: Header & Footer tab → No Header Footer Horizontal Margins checkbox
  • Shortcode: no_header_footer_horizontal_margins
    [save_as_pdf_pdfcrowd no_header_footer_horizontal_margins=true]
  • PHP function: no_header_footer_horizontal_margins
    echo create_save_as_pdf_pdfcrowd_button(array('no_header_footer_horizontal_margins' => true));
Exclude Header On Pages
The page header is not printed on the specified pages.
Constraint:
  • A comma separated list of page numbers.
Examples:
  • Plugin settings: Header & Footer tab → Exclude Header On Pages option
    1,-1
  • Shortcode: exclude_header_on_pages
    [save_as_pdf_pdfcrowd exclude_header_on_pages="1,-1"]
  • PHP function: exclude_header_on_pages
    echo create_save_as_pdf_pdfcrowd_button(array('exclude_header_on_pages' => '1,-1'));
The page footer is not printed on the specified pages.
Examples:
  • Plugin settings: Header & Footer tab → Exclude Footer On Pages option
    1,-1
  • Shortcode: exclude_footer_on_pages
    [save_as_pdf_pdfcrowd exclude_footer_on_pages="1,-1"]
  • PHP function: exclude_footer_on_pages
    echo create_save_as_pdf_pdfcrowd_button(array('exclude_footer_on_pages' => '1,-1'));
Set the scaling factor (zoom) for the header and footer.
Examples:
  • Plugin settings: Header & Footer tab → Header Footer Scale Factor option
    50
  • Shortcode: header_footer_scale_factor
    [save_as_pdf_pdfcrowd header_footer_scale_factor=50]
  • PHP function: header_footer_scale_factor
    echo create_save_as_pdf_pdfcrowd_button(array('header_footer_scale_factor' => 50));

Watermark & Background

Page Watermark
Apply the first page of the watermark PDF to every page of the output PDF.
Constraint:
  • The file must exist and not be empty.
Examples:
  • Plugin settings: Watermark & Background tab → Page Watermark option
    /home/user/john/watermark.pdf
  • Shortcode: page_watermark
    [save_as_pdf_pdfcrowd page_watermark="/home/user/john/watermark.pdf"]
  • PHP function: page_watermark
    echo create_save_as_pdf_pdfcrowd_button(array('page_watermark' => '/home/user/john/watermark.pdf'));
Page Watermark URL
Load a watermark PDF from the specified URL and apply the first page of the watermark PDF to every page of the output PDF.
Constraint:
  • The supported protocols are http:// and https://.
Examples:
  • Plugin settings: Watermark & Background tab → Page Watermark URL option
    http://myserver.com/watermark.pdf
  • Shortcode: page_watermark_url
    [save_as_pdf_pdfcrowd page_watermark_url="http://myserver.com/watermark.pdf"]
  • PHP function: page_watermark_url
    echo create_save_as_pdf_pdfcrowd_button(array('page_watermark_url' => 'http://myserver.com/watermark.pdf'));
Multipage Watermark
Apply each page of the specified watermark PDF to the corresponding page of the output PDF.
Constraint:
  • The file must exist and not be empty.
Examples:
  • Plugin settings: Watermark & Background tab → Multipage Watermark option
    /home/user/john/watermark.pdf
  • Shortcode: multipage_watermark
    [save_as_pdf_pdfcrowd multipage_watermark="/home/user/john/watermark.pdf"]
  • PHP function: multipage_watermark
    echo create_save_as_pdf_pdfcrowd_button(array('multipage_watermark' => '/home/user/john/watermark.pdf'));
Multipage Watermark URL
Load a watermark PDF from the specified URL and apply each page of the specified watermark PDF to the corresponding page of the output PDF.
Constraint:
  • The supported protocols are http:// and https://.
Examples:
  • Plugin settings: Watermark & Background tab → Multipage Watermark URL option
    http://myserver.com/watermark.pdf
  • Shortcode: multipage_watermark_url
    [save_as_pdf_pdfcrowd multipage_watermark_url="http://myserver.com/watermark.pdf"]
  • PHP function: multipage_watermark_url
    echo create_save_as_pdf_pdfcrowd_button(array('multipage_watermark_url' => 'http://myserver.com/watermark.pdf'));
Page Background
Apply the first page of the specified PDF to the background of every page of the output PDF.
Constraint:
  • The file must exist and not be empty.
Examples:
  • Plugin settings: Watermark & Background tab → Page Background option
    /home/user/john/background.pdf
  • Shortcode: page_background
    [save_as_pdf_pdfcrowd page_background="/home/user/john/background.pdf"]
  • PHP function: page_background
    echo create_save_as_pdf_pdfcrowd_button(array('page_background' => '/home/user/john/background.pdf'));
Page Background URL
Load a background PDF from the specified URL and apply the first page of the background PDF to every page of the output PDF.
Constraint:
  • The supported protocols are http:// and https://.
Examples:
  • Plugin settings: Watermark & Background tab → Page Background URL option
    http://myserver.com/background.pdf
  • Shortcode: page_background_url
    [save_as_pdf_pdfcrowd page_background_url="http://myserver.com/background.pdf"]
  • PHP function: page_background_url
    echo create_save_as_pdf_pdfcrowd_button(array('page_background_url' => 'http://myserver.com/background.pdf'));
Multipage Background
Apply each page of the specified PDF to the background of the corresponding page of the output PDF.
Constraint:
  • The file must exist and not be empty.
Examples:
  • Plugin settings: Watermark & Background tab → Multipage Background option
    /home/user/john/background.pdf
  • Shortcode: multipage_background
    [save_as_pdf_pdfcrowd multipage_background="/home/user/john/background.pdf"]
  • PHP function: multipage_background
    echo create_save_as_pdf_pdfcrowd_button(array('multipage_background' => '/home/user/john/background.pdf'));
Multipage Background URL
Load a background PDF from the specified URL and apply each page of the specified background PDF to the corresponding page of the output PDF.
Constraint:
  • The supported protocols are http:// and https://.
Examples:
  • Plugin settings: Watermark & Background tab → Multipage Background URL option
    http://myserver.com/background.pdf
  • Shortcode: multipage_background_url
    [save_as_pdf_pdfcrowd multipage_background_url="http://myserver.com/background.pdf"]
  • PHP function: multipage_background_url
    echo create_save_as_pdf_pdfcrowd_button(array('multipage_background_url' => 'http://myserver.com/background.pdf'));
Page Background Color
The page background color in RGB or RGBA hexadecimal format. The color fills the entire page regardless of the margins.
Constraint:
  • The value must be in RRGGBB or RRGGBBAA hexadecimal format.
Examples:
  • Plugin settings: Watermark & Background tab → Page Background Color option
    00ff0080
  • Shortcode: page_background_color
    [save_as_pdf_pdfcrowd page_background_color="00ff0080"]
  • PHP function: page_background_color
    echo create_save_as_pdf_pdfcrowd_button(array('page_background_color' => '00ff0080'));

General Options

Use Print Media
Use the print version of the page if available (@media print).
Default: false
Examples:
  • Plugin settings: General Options tab → Use Print Media checkbox
  • Shortcode: use_print_media
    [save_as_pdf_pdfcrowd use_print_media=true]
  • PHP function: use_print_media
    echo create_save_as_pdf_pdfcrowd_button(array('use_print_media' => true));
No Background
Do not print the background graphics.
Default: false
Examples:
  • Plugin settings: General Options tab → No Background checkbox
  • Shortcode: no_background
    [save_as_pdf_pdfcrowd no_background=true]
  • PHP function: no_background
    echo create_save_as_pdf_pdfcrowd_button(array('no_background' => true));
Disable JavaScript
Do not execute JavaScript.
Default: false
Examples:
  • Plugin settings: General Options tab → Disable JavaScript checkbox
  • Shortcode: disable_javascript
    [save_as_pdf_pdfcrowd disable_javascript=true]
  • PHP function: disable_javascript
    echo create_save_as_pdf_pdfcrowd_button(array('disable_javascript' => true));
Disable Image Loading
Do not load images.
Default: false
Examples:
  • Plugin settings: General Options tab → Disable Image Loading checkbox
  • Shortcode: disable_image_loading
    [save_as_pdf_pdfcrowd disable_image_loading=true]
  • PHP function: disable_image_loading
    echo create_save_as_pdf_pdfcrowd_button(array('disable_image_loading' => true));
Disable Remote Fonts
Disable loading fonts from remote sources.
Default: false
Examples:
  • Plugin settings: General Options tab → Disable Remote Fonts checkbox
  • Shortcode: disable_remote_fonts
    [save_as_pdf_pdfcrowd disable_remote_fonts=true]
  • PHP function: disable_remote_fonts
    echo create_save_as_pdf_pdfcrowd_button(array('disable_remote_fonts' => true));
Use Mobile User Agent
Use a mobile user agent.
Default: false
Examples:
  • Plugin settings: General Options tab → Use Mobile User Agent checkbox
  • Shortcode: use_mobile_user_agent
    [save_as_pdf_pdfcrowd use_mobile_user_agent=true]
  • PHP function: use_mobile_user_agent
    echo create_save_as_pdf_pdfcrowd_button(array('use_mobile_user_agent' => true));
Load Iframes
Specifies how iframes are handled.
Allowed values:
  • all
    All iframes are loaded.
  • same-origin
    Only iframes with the same origin as the main page are loaded.
  • none
    Iframe loading is disabled.
Default: all
Examples:
  • Plugin settings: General Options tab → Load Iframes option
    Iframe loading is disabled.
  • Shortcode: load_iframes
    [save_as_pdf_pdfcrowd load_iframes="none"]
  • PHP function: load_iframes
    echo create_save_as_pdf_pdfcrowd_button(array('load_iframes' => 'none'));
Block Ads
Try to block ads. Enabling this option can produce smaller output and speed up the conversion.
Default: false
Examples:
  • Plugin settings: General Options tab → Block Ads checkbox
  • Shortcode: block_ads
    [save_as_pdf_pdfcrowd block_ads=true]
  • PHP function: block_ads
    echo create_save_as_pdf_pdfcrowd_button(array('block_ads' => true));
Default Encoding
Set the default HTML content text encoding.
Default: auto detect
Examples:
  • Plugin settings: General Options tab → Default Encoding option
    utf-8
  • Shortcode: default_encoding
    [save_as_pdf_pdfcrowd default_encoding="utf-8"]
  • PHP function: default_encoding
    echo create_save_as_pdf_pdfcrowd_button(array('default_encoding' => 'utf-8'));
Locale
Set the locale for the conversion. This may affect the output format of dates, times and numbers.
Default: en-US
Examples:
  • Plugin settings: General Options tab → Locale option
    ja-JP
  • Shortcode: locale
    [save_as_pdf_pdfcrowd locale="ja-JP"]
  • PHP function: locale
    echo create_save_as_pdf_pdfcrowd_button(array('locale' => 'ja-JP'));
HTTP Auth User Name
Set the HTTP authentication user name.
Examples:
  • Plugin settings: General Options tab → HTTP Auth User Name option
    John
  • Shortcode: http_auth_user_name
    [save_as_pdf_pdfcrowd http_auth_user_name="John"]
  • PHP function: http_auth_user_name
    echo create_save_as_pdf_pdfcrowd_button(array('http_auth_user_name' => 'John'));
HTTP Auth Password
Set the HTTP authentication password.
Examples:
  • Plugin settings: General Options tab → HTTP Auth Password option
    123456
  • Shortcode: http_auth_password
    [save_as_pdf_pdfcrowd http_auth_password="123456"]
  • PHP function: http_auth_password
    echo create_save_as_pdf_pdfcrowd_button(array('http_auth_password' => '123456'));
Cookies
Set cookies that are sent in Pdfcrowd HTTP requests.
Examples:
  • Plugin settings: General Options tab → Cookies option
    session=6d7184b3bf35;token=2710
  • Shortcode: cookies
    [save_as_pdf_pdfcrowd cookies="session=6d7184b3bf35;token=2710"]
  • PHP function: cookies
    echo create_save_as_pdf_pdfcrowd_button(array('cookies' => 'session=6d7184b3bf35;token=2710'));
Verify SSL Certificates
Do not allow insecure HTTPS connections.
Default: false
Examples:
  • Plugin settings: General Options tab → Verify SSL Certificates checkbox
  • Shortcode: verify_ssl_certificates
    [save_as_pdf_pdfcrowd verify_ssl_certificates=true]
  • PHP function: verify_ssl_certificates
    echo create_save_as_pdf_pdfcrowd_button(array('verify_ssl_certificates' => true));
Fail On Main URL Error
Abort the conversion if the main URL HTTP status code is greater than or equal to 400.
Default: false
Examples:
  • Plugin settings: General Options tab → Fail On Main URL Error checkbox
  • Shortcode: fail_on_main_url_error
    [save_as_pdf_pdfcrowd fail_on_main_url_error=true]
  • PHP function: fail_on_main_url_error
    echo create_save_as_pdf_pdfcrowd_button(array('fail_on_main_url_error' => true));
Fail On Any URL Error
Abort the conversion if any of the sub-request HTTP status code is greater than or equal to 400 or if some sub-requests are still pending. See details in a debug log.
Default: false
Examples:
  • Plugin settings: General Options tab → Fail On Any URL Error checkbox
  • Shortcode: fail_on_any_url_error
    [save_as_pdf_pdfcrowd fail_on_any_url_error=true]
  • PHP function: fail_on_any_url_error
    echo create_save_as_pdf_pdfcrowd_button(array('fail_on_any_url_error' => true));
No X-Pdfcrowd Header
Do not send the X-Pdfcrowd HTTP header in Pdfcrowd HTTP requests.
Default: false
Examples:
  • Plugin settings: General Options tab → No X-Pdfcrowd Header checkbox
  • Shortcode: no_xpdfcrowd_header
    [save_as_pdf_pdfcrowd no_xpdfcrowd_header=true]
  • PHP function: no_xpdfcrowd_header
    echo create_save_as_pdf_pdfcrowd_button(array('no_xpdfcrowd_header' => true));
Custom JavaScript
Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
Examples:
  • Plugin settings: General Options tab → Custom JavaScript option
    document.body.style.setProperty('background-color', 'gray', 'important')
  • Shortcode: custom_javascript
    [save_as_pdf_pdfcrowd custom_javascript="document.body.style.setProperty('background-color', 'gray', 'important')"]
  • PHP function: custom_javascript
    echo create_save_as_pdf_pdfcrowd_button(array('custom_javascript' => 'document.body.style.setProperty("background-color", "gray", "important")'));
On Load JavaScript
Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
Examples:
  • Plugin settings: General Options tab → On Load JavaScript option
    document.body.style.setProperty('background-color', 'gray', 'important')
  • Shortcode: on_load_javascript
    [save_as_pdf_pdfcrowd on_load_javascript="document.body.style.setProperty('background-color', 'gray', 'important')"]
  • PHP function: on_load_javascript
    echo create_save_as_pdf_pdfcrowd_button(array('on_load_javascript' => 'document.body.style.setProperty("background-color", "gray", "important")'));
Custom HTTP Header
Set a custom HTTP header that is sent in Pdfcrowd HTTP requests.
Constraint:
  • A string containing the header name and value separated by a colon.
Examples:
  • Plugin settings: General Options tab → Custom HTTP Header option
    X-My-Client-ID:k2017-12345
  • Shortcode: custom_http_header
    [save_as_pdf_pdfcrowd custom_http_header="X-My-Client-ID:k2017-12345"]
  • PHP function: custom_http_header
    echo create_save_as_pdf_pdfcrowd_button(array('custom_http_header' => 'X-My-Client-ID:k2017-12345'));
JavaScript Delay
Wait the specified number of milliseconds to finish all JavaScript after the document is loaded. Your API license defines the maximum wait time by "Max Delay" parameter.
Constraint:
  • Must be a positive integer number or 0.
Default: 200
Examples:
  • Plugin settings: General Options tab → JavaScript Delay option
    2000
  • Shortcode: javascript_delay
    [save_as_pdf_pdfcrowd javascript_delay=2000]
  • PHP function: javascript_delay
    echo create_save_as_pdf_pdfcrowd_button(array('javascript_delay' => 2000));
Element To Convert
Convert only the specified element from the main document and its children. The element is specified by one or more CSS selectors. If the element is not found, the conversion fails. If multiple elements are found, the first one is used.
Examples:
  • Plugin settings: General Options tab → Element To Convert option
    div.user-panel.main p.article
  • Shortcode: element_to_convert
    [save_as_pdf_pdfcrowd element_to_convert="div.user-panel.main p.article"]
  • PHP function: element_to_convert
    echo create_save_as_pdf_pdfcrowd_button(array('element_to_convert' => 'div.user-panel.main p.article'));
Element To Convert Mode
Specify the DOM handling when only a part of the document is converted. This can affect the CSS rules used.
Allowed values:
  • cut-out
    The element and its children are cut out of the document.
  • remove-siblings
    All element's siblings are removed.
  • hide-siblings
    All element's siblings are hidden.
Default: cut-out
Examples:
  • Plugin settings: General Options tab → Element To Convert Mode option
    All element's siblings are hidden.
  • Shortcode: element_to_convert_mode
    [save_as_pdf_pdfcrowd element_to_convert_mode="hide-siblings"]
  • PHP function: element_to_convert_mode
    echo create_save_as_pdf_pdfcrowd_button(array('element_to_convert_mode' => 'hide-siblings'));
Wait For Element
Wait for the specified element in a source document. The element is specified by one or more CSS selectors. The element is searched for in the main document and all iframes. If the element is not found, the conversion fails. Your API license defines the maximum wait time by "Max Delay" parameter.
Examples:
  • Plugin settings: General Options tab → Wait For Element option
    div.user-panel.main p.article
  • Shortcode: wait_for_element
    [save_as_pdf_pdfcrowd wait_for_element="div.user-panel.main p.article"]
  • PHP function: wait_for_element
    echo create_save_as_pdf_pdfcrowd_button(array('wait_for_element' => 'div.user-panel.main p.article'));
Auto Detect Element To Convert
The main HTML element for conversion is detected automatically.
Default: false
Examples:
  • Plugin settings: General Options tab → Auto Detect Element To Convert checkbox
  • Shortcode: auto_detect_element_to_convert
    [save_as_pdf_pdfcrowd auto_detect_element_to_convert=true]
  • PHP function: auto_detect_element_to_convert
    echo create_save_as_pdf_pdfcrowd_button(array('auto_detect_element_to_convert' => true));
Readability Enhancements
The input HTML is automatically enhanced to improve the readability.
Allowed values:
  • none
    No enhancements are applied.
  • readability-v1
    Enhancements are applied.
Default: none
Examples:
  • Plugin settings: General Options tab → Readability Enhancements option
    Enhancements are applied.
  • Shortcode: readability_enhancements
    [save_as_pdf_pdfcrowd readability_enhancements="readability-v1"]
  • PHP function: readability_enhancements
    echo create_save_as_pdf_pdfcrowd_button(array('readability_enhancements' => 'readability-v1'));
Viewport Width
Set the viewport width in pixels. The viewport is the user's visible area of the page.
Constraint:
  • The value must be in the range 96-65000.
Default: 1024
Examples:
  • Plugin settings: Print Resolution tab → Viewport Width option
    1920
  • Shortcode: viewport_width
    [save_as_pdf_pdfcrowd viewport_width=1920]
  • PHP function: viewport_width
    echo create_save_as_pdf_pdfcrowd_button(array('viewport_width' => 1920));
Viewport Height
Set the viewport height in pixels. The viewport is the user's visible area of the page. If the input HTML uses lazily loaded images, try using a large value that covers the entire height of the HTML, e.g. 100000.
Constraint:
  • Must be a positive integer number.
Default: 768
Examples:
  • Plugin settings: Print Resolution tab → Viewport Height option
    15000
  • Shortcode: viewport_height
    [save_as_pdf_pdfcrowd viewport_height=15000]
  • PHP function: viewport_height
    echo create_save_as_pdf_pdfcrowd_button(array('viewport_height' => 15000));
Rendering Mode
Set the rendering mode.
Allowed values:
  • default
    The mode based on the standard browser print functionality.
  • viewport
    The viewport width affects the @media min-width and max-width CSS properties. This mode can be used to choose a particular version (mobile, desktop, ..) of a responsive page.
Default: default
Examples:
  • Plugin settings: Print Resolution tab → Rendering Mode option
    The viewport width affects the @media min-width and max-width CSS properties. This mode can be used to choose a particular version (mobile, desktop, ..) of a responsive page.
  • Shortcode: rendering_mode
    [save_as_pdf_pdfcrowd rendering_mode="viewport"]
  • PHP function: rendering_mode
    echo create_save_as_pdf_pdfcrowd_button(array('rendering_mode' => 'viewport'));
Smart Scaling Mode
Specifies the scaling mode used for fitting the HTML contents to the print area.
Allowed values:
  • default
    The mode based on the standard browser print functionality.
  • disabled
    No smart scaling is performed.
  • viewport-fit
    The viewport width fits the print area width.
  • content-fit
    The HTML contents width fits the print area width.
  • single-page-fit
    The whole HTML contents fits the print area of a single page.
  • mode1
    Scaling mode 1 is applied.
Default: default
Examples:
  • Plugin settings: Print Resolution tab → Smart Scaling Mode option
    Scaling mode 1 is applied.
  • Shortcode: smart_scaling_mode
    [save_as_pdf_pdfcrowd smart_scaling_mode="mode1"]
  • PHP function: smart_scaling_mode
    echo create_save_as_pdf_pdfcrowd_button(array('smart_scaling_mode' => 'mode1'));
Scale Factor
Set the scaling factor (zoom) for the main page area.
Constraint:
  • The value must be in the range 10-500.
Default: 100
Examples:
  • Plugin settings: Print Resolution tab → Scale Factor option
    50
  • Shortcode: scale_factor
    [save_as_pdf_pdfcrowd scale_factor=50]
  • PHP function: scale_factor
    echo create_save_as_pdf_pdfcrowd_button(array('scale_factor' => 50));
JPEG Quality
Set the quality of embedded JPEG images. A lower quality results in a smaller PDF file but can lead to compression artifacts.
Constraint:
  • The value must be in the range 1-100.
Default: 100
Examples:
  • Plugin settings: Print Resolution tab → JPEG Quality option
    70
  • Shortcode: jpeg_quality
    [save_as_pdf_pdfcrowd jpeg_quality=70]
  • PHP function: jpeg_quality
    echo create_save_as_pdf_pdfcrowd_button(array('jpeg_quality' => 70));
Convert Images To JPEG
Specify which image types will be converted to JPEG. Converting lossless compression image formats (PNG, GIF, ...) to JPEG may result in a smaller PDF file.
Allowed values:
  • none
    No image conversion is done.
  • opaque
    Only opaque images are converted to JPEG images.
  • all
    All images are converted to JPEG images. The JPEG format does not support transparency so the transparent color is replaced by a PDF page background color.
Default: none
Examples:
  • Plugin settings: Print Resolution tab → Convert Images To JPEG option
    All images are converted to JPEG images. The JPEG format does not support transparency so the transparent color is replaced by a PDF page background color.
  • Shortcode: convert_images_to_jpeg
    [save_as_pdf_pdfcrowd convert_images_to_jpeg="all"]
  • PHP function: convert_images_to_jpeg
    echo create_save_as_pdf_pdfcrowd_button(array('convert_images_to_jpeg' => 'all'));
Image DPI
Set the DPI of images in PDF. A lower DPI may result in a smaller PDF file. If the specified DPI is higher than the actual image DPI, the original image DPI is retained (no upscaling is performed). Use 0 to leave the images unaltered.
Constraint:
  • Must be a positive integer number or 0.
Default: 0
Examples:
  • Plugin settings: Print Resolution tab → Image DPI option
    300
  • Shortcode: image_dpi
    [save_as_pdf_pdfcrowd image_dpi=300]
  • PHP function: image_dpi
    echo create_save_as_pdf_pdfcrowd_button(array('image_dpi' => 300));

PDF Format

Miscellaneous values for PDF output.

Enable PDF Forms
Convert HTML forms to fillable PDF forms. Details can be found in the blog post.
Default: false
Examples:
  • Plugin settings: PDF Format tab → Enable PDF Forms checkbox
  • Shortcode: enable_pdf_forms
    [save_as_pdf_pdfcrowd enable_pdf_forms=true]
  • PHP function: enable_pdf_forms
    echo create_save_as_pdf_pdfcrowd_button(array('enable_pdf_forms' => true));
Linearize
Create linearized PDF. This is also known as Fast Web View.
Default: false
Examples:
  • Plugin settings: PDF Format tab → Linearize checkbox
  • Shortcode: linearize
    [save_as_pdf_pdfcrowd linearize=true]
  • PHP function: linearize
    echo create_save_as_pdf_pdfcrowd_button(array('linearize' => true));
Encrypt
Encrypt the PDF. This prevents search engines from indexing the contents.
Default: false
Examples:
  • Plugin settings: PDF Format tab → Encrypt checkbox
  • Shortcode: encrypt
    [save_as_pdf_pdfcrowd encrypt=true]
  • PHP function: encrypt
    echo create_save_as_pdf_pdfcrowd_button(array('encrypt' => true));
User Password
Protect the PDF with a user password. When a PDF has a user password, it must be supplied in order to view the document and to perform operations allowed by the access permissions.
Examples:
  • Plugin settings: PDF Format tab → User Password option
    123456
  • Shortcode: user_password
    [save_as_pdf_pdfcrowd user_password="123456"]
  • PHP function: user_password
    echo create_save_as_pdf_pdfcrowd_button(array('user_password' => '123456'));
Owner Password
Protect the PDF with an owner password. Supplying an owner password grants unlimited access to the PDF including changing the passwords and access permissions.
Examples:
  • Plugin settings: PDF Format tab → Owner Password option
    123456
  • Shortcode: owner_password
    [save_as_pdf_pdfcrowd owner_password="123456"]
  • PHP function: owner_password
    echo create_save_as_pdf_pdfcrowd_button(array('owner_password' => '123456'));
No Print
Disallow printing of the output PDF.
Default: false
Examples:
  • Plugin settings: PDF Format tab → No Print checkbox
  • Shortcode: no_print
    [save_as_pdf_pdfcrowd no_print=true]
  • PHP function: no_print
    echo create_save_as_pdf_pdfcrowd_button(array('no_print' => true));
No Modify
Disallow modification of the output PDF.
Default: false
Examples:
  • Plugin settings: PDF Format tab → No Modify checkbox
  • Shortcode: no_modify
    [save_as_pdf_pdfcrowd no_modify=true]
  • PHP function: no_modify
    echo create_save_as_pdf_pdfcrowd_button(array('no_modify' => true));
No Copy
Disallow text and graphics extraction from the output PDF.
Default: false
Examples:
  • Plugin settings: PDF Format tab → No Copy checkbox
  • Shortcode: no_copy
    [save_as_pdf_pdfcrowd no_copy=true]
  • PHP function: no_copy
    echo create_save_as_pdf_pdfcrowd_button(array('no_copy' => true));
Title
Set the title of the PDF.
Examples:
  • Plugin settings: PDF Format tab → Title option
    My Resume
  • Shortcode: title
    [save_as_pdf_pdfcrowd title="My Resume"]
  • PHP function: title
    echo create_save_as_pdf_pdfcrowd_button(array('title' => 'My Resume'));
Subject
Set the subject of the PDF.
Examples:
  • Plugin settings: PDF Format tab → Subject option
    CV - Software Developer
  • Shortcode: subject
    [save_as_pdf_pdfcrowd subject="CV - Software Developer"]
  • PHP function: subject
    echo create_save_as_pdf_pdfcrowd_button(array('subject' => 'CV - Software Developer'));
Author
Set the author of the PDF.
Examples:
  • Plugin settings: PDF Format tab → Author option
    John Doe
  • Shortcode: author
    [save_as_pdf_pdfcrowd author="John Doe"]
  • PHP function: author
    echo create_save_as_pdf_pdfcrowd_button(array('author' => 'John Doe'));
Keywords
Associate keywords with the document.
Examples:
  • Plugin settings: PDF Format tab → Keywords option
    software developer, Unix, databases
  • Shortcode: keywords
    [save_as_pdf_pdfcrowd keywords="software developer, Unix, databases"]
  • PHP function: keywords
    echo create_save_as_pdf_pdfcrowd_button(array('keywords' => 'software developer, Unix, databases'));
Extract Meta Tags
Extract meta tags (author, keywords and description) from the input HTML and use them in the output PDF.
Default: false
Examples:
  • Plugin settings: PDF Format tab → Extract Meta Tags checkbox
  • Shortcode: extract_meta_tags
    [save_as_pdf_pdfcrowd extract_meta_tags=true]
  • PHP function: extract_meta_tags
    echo create_save_as_pdf_pdfcrowd_button(array('extract_meta_tags' => true));

Viewer Preferences

These preferences specify how a PDF viewer should present the document. The preferences may be ignored by some PDF viewers.

Page Layout
Specify the page layout to be used when the document is opened.
Allowed values:
  • single-page
    Display one page at a time.
  • one-column
    Display the pages in one column.
  • two-column-left
    Display the pages in two columns, with odd-numbered pages on the left.
  • two-column-right
    Display the pages in two columns, with odd-numbered pages on the right.
Examples:
  • Plugin settings: Viewer Preferences tab → Page Layout option
    Display the pages in two columns, with odd-numbered pages on the right.
  • Shortcode: page_layout
    [save_as_pdf_pdfcrowd page_layout="two-column-right"]
  • PHP function: page_layout
    echo create_save_as_pdf_pdfcrowd_button(array('page_layout' => 'two-column-right'));
Page Mode
Specify how the document should be displayed when opened.
Allowed values:
  • full-screen
    Full-screen mode.
  • thumbnails
    Thumbnail images are visible.
  • outlines
    Document outline is visible.
Examples:
  • Plugin settings: Viewer Preferences tab → Page Mode option
    Document outline is visible.
  • Shortcode: page_mode
    [save_as_pdf_pdfcrowd page_mode="outlines"]
  • PHP function: page_mode
    echo create_save_as_pdf_pdfcrowd_button(array('page_mode' => 'outlines'));
Initial Zoom Type
Specify how the page should be displayed when opened.
Allowed values:
  • fit-width
    The page content is magnified just enough to fit the entire width of the page within the window.
  • fit-height
    The page content is magnified just enough to fit the entire height of the page within the window.
  • fit-page
    The page content is magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.
Examples:
  • Plugin settings: Viewer Preferences tab → Initial Zoom Type option
    The page content is magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.
  • Shortcode: initial_zoom_type
    [save_as_pdf_pdfcrowd initial_zoom_type="fit-page"]
  • PHP function: initial_zoom_type
    echo create_save_as_pdf_pdfcrowd_button(array('initial_zoom_type' => 'fit-page'));
Initial Page
Display the specified page when the document is opened.
Constraint:
  • Must be a positive integer number.
Examples:
  • Plugin settings: Viewer Preferences tab → Initial Page option
    2
  • Shortcode: initial_page
    [save_as_pdf_pdfcrowd initial_page=2]
  • PHP function: initial_page
    echo create_save_as_pdf_pdfcrowd_button(array('initial_page' => 2));
Initial Zoom
Specify the initial page zoom in percents when the document is opened.
Constraint:
  • Must be a positive integer number.
Examples:
  • Plugin settings: Viewer Preferences tab → Initial Zoom option
    50
  • Shortcode: initial_zoom
    [save_as_pdf_pdfcrowd initial_zoom=50]
  • PHP function: initial_zoom
    echo create_save_as_pdf_pdfcrowd_button(array('initial_zoom' => 50));
Hide Toolbar
Specify whether to hide the viewer application's tool bars when the document is active.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Hide Toolbar checkbox
  • Shortcode: hide_toolbar
    [save_as_pdf_pdfcrowd hide_toolbar=true]
  • PHP function: hide_toolbar
    echo create_save_as_pdf_pdfcrowd_button(array('hide_toolbar' => true));
Hide Menubar
Specify whether to hide the viewer application's menu bar when the document is active.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Hide Menubar checkbox
  • Shortcode: hide_menubar
    [save_as_pdf_pdfcrowd hide_menubar=true]
  • PHP function: hide_menubar
    echo create_save_as_pdf_pdfcrowd_button(array('hide_menubar' => true));
Hide Window UI
Specify whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Hide Window UI checkbox
  • Shortcode: hide_window_ui
    [save_as_pdf_pdfcrowd hide_window_ui=true]
  • PHP function: hide_window_ui
    echo create_save_as_pdf_pdfcrowd_button(array('hide_window_ui' => true));
Fit Window
Specify whether to resize the document's window to fit the size of the first displayed page.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Fit Window checkbox
  • Shortcode: fit_window
    [save_as_pdf_pdfcrowd fit_window=true]
  • PHP function: fit_window
    echo create_save_as_pdf_pdfcrowd_button(array('fit_window' => true));
Center Window
Specify whether to position the document's window in the center of the screen.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Center Window checkbox
  • Shortcode: center_window
    [save_as_pdf_pdfcrowd center_window=true]
  • PHP function: center_window
    echo create_save_as_pdf_pdfcrowd_button(array('center_window' => true));
Display Title
Specify whether the window's title bar should display the document title. If false , the title bar should instead display the name of the PDF file containing the document.
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Display Title checkbox
  • Shortcode: display_title
    [save_as_pdf_pdfcrowd display_title=true]
  • PHP function: display_title
    echo create_save_as_pdf_pdfcrowd_button(array('display_title' => true));
Right To Left
Set the predominant reading order for text to right-to-left. This option has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up
Default: false
Examples:
  • Plugin settings: Viewer Preferences tab → Right To Left checkbox
  • Shortcode: right_to_left
    [save_as_pdf_pdfcrowd right_to_left=true]
  • PHP function: right_to_left
    echo create_save_as_pdf_pdfcrowd_button(array('right_to_left' => true));

Data

Methods related to HTML template rendering.

Data String
Set the input data for template rendering. The data format can be JSON, XML, YAML or CSV.
Examples:
  • Plugin settings: Data tab → Data String option
    {"recipient": "Anna May", "sender": "John Doe"}
  • Shortcode: data_string
    [save_as_pdf_pdfcrowd data_string="{'recipient': 'Anna May', 'sender': 'John Doe'}"]
  • PHP function: data_string
    echo create_save_as_pdf_pdfcrowd_button(array('data_string' => '{"recipient": "Anna May", "sender": "John Doe"}'));
Data File
Load the input data for template rendering from the specified file. The data format can be JSON, XML, YAML or CSV.
Examples:
  • Plugin settings: Data tab → Data File option
    /home/user/john/data.json
  • Shortcode: data_file
    [save_as_pdf_pdfcrowd data_file="/home/user/john/data.json"]
  • PHP function: data_file
    echo create_save_as_pdf_pdfcrowd_button(array('data_file' => '/home/user/john/data.json'));
Data Format
Specify the input data format.
Allowed values:
  • auto
    the data format is auto detected
  • json
  • xml
  • yaml
  • csv
Default: auto
Examples:
  • Plugin settings: Data tab → Data Format option
    csv
  • Shortcode: data_format
    [save_as_pdf_pdfcrowd data_format="csv"]
  • PHP function: data_format
    echo create_save_as_pdf_pdfcrowd_button(array('data_format' => 'csv'));
Data Encoding
Set the encoding of the data file set by setDataFile.
Default: utf-8
Examples:
  • Plugin settings: Data tab → Data Encoding option
    iso8859-2
  • Shortcode: data_encoding
    [save_as_pdf_pdfcrowd data_encoding="iso8859-2"]
  • PHP function: data_encoding
    echo create_save_as_pdf_pdfcrowd_button(array('data_encoding' => 'iso8859-2'));
Data Ignore Undefined
Ignore undefined variables in the HTML template. The default mode is strict so any undefined variable causes the conversion to fail. You can use {% if variable is defined %} to check if the variable is defined.
Default: false
Examples:
  • Plugin settings: Data tab → Data Ignore Undefined checkbox
  • Shortcode: data_ignore_undefined
    [save_as_pdf_pdfcrowd data_ignore_undefined=true]
  • PHP function: data_ignore_undefined
    echo create_save_as_pdf_pdfcrowd_button(array('data_ignore_undefined' => true));
Data Auto Escape
Auto escape HTML symbols in the input data before placing them into the output.
Default: false
Examples:
  • Plugin settings: Data tab → Data Auto Escape checkbox
  • Shortcode: data_auto_escape
    [save_as_pdf_pdfcrowd data_auto_escape=true]
  • PHP function: data_auto_escape
    echo create_save_as_pdf_pdfcrowd_button(array('data_auto_escape' => true));
Data Trim Blocks
Auto trim whitespace around each template command block.
Default: false
Examples:
  • Plugin settings: Data tab → Data Trim Blocks checkbox
  • Shortcode: data_trim_blocks
    [save_as_pdf_pdfcrowd data_trim_blocks=true]
  • PHP function: data_trim_blocks
    echo create_save_as_pdf_pdfcrowd_button(array('data_trim_blocks' => true));
Data Options
Set the advanced data options:
  • csv_delimiter - The CSV data delimiter, the default is ,.
  • xml_remove_root - Remove the root XML element from the input data.
  • data_root - The name of the root element inserted into the input data without a root node (e.g. CSV), the default is data.
Examples:
  • Plugin settings: Data tab → Data Options option
    xml_remove_root=1
  • Shortcode: data_options
    [save_as_pdf_pdfcrowd data_options="xml_remove_root=1"]
  • PHP function: data_options
    echo create_save_as_pdf_pdfcrowd_button(array('data_options' => 'xml_remove_root=1'));

Miscellaneous

Debug Log
Turn on the debug logging. Details about the conversion are stored in the debug log. The debug log is available in conversion statistics.
Default: false
Examples:
  • Plugin settings: Miscellaneous tab → Debug Log checkbox
  • Shortcode: debug_log
    [save_as_pdf_pdfcrowd debug_log=true]
  • PHP function: debug_log
    echo create_save_as_pdf_pdfcrowd_button(array('debug_log' => true));
Tag
Tag the conversion with a custom value. The tag is used in conversion statistics. A value longer than 32 characters is cut off.
Examples:
  • Plugin settings: Miscellaneous tab → Tag option
    client-1234
  • Shortcode: tag
    [save_as_pdf_pdfcrowd tag="client-1234"]
  • PHP function: tag
    echo create_save_as_pdf_pdfcrowd_button(array('tag' => 'client-1234'));
HTTP Proxy
A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTP scheme. It can help to circumvent regional restrictions or provide limited access to your intranet.
Constraint:
  • The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
Examples:
  • Plugin settings: Miscellaneous tab → HTTP Proxy option
    113.25.84.10:33333
  • Shortcode: http_proxy
    [save_as_pdf_pdfcrowd http_proxy="113.25.84.10:33333"]
  • PHP function: http_proxy
    echo create_save_as_pdf_pdfcrowd_button(array('http_proxy' => '113.25.84.10:33333'));
HTTPS Proxy
A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTPS scheme. It can help to circumvent regional restrictions or provide limited access to your intranet.
Constraint:
  • The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
Examples:
  • Plugin settings: Miscellaneous tab → HTTPS Proxy option
    113.25.84.10:44333
  • Shortcode: https_proxy
    [save_as_pdf_pdfcrowd https_proxy="113.25.84.10:44333"]
  • PHP function: https_proxy
    echo create_save_as_pdf_pdfcrowd_button(array('https_proxy' => '113.25.84.10:44333'));
Client Certificate
A client certificate to authenticate Pdfcrowd converter on your web server. The certificate is used for two-way SSL/TLS authentication and adds extra security.
Constraint:
  • The file must exist and not be empty.
Examples:
  • Plugin settings: Miscellaneous tab → Client Certificate option
    /home/user/john/pdfcrowd.crt
  • Shortcode: client_certificate
    [save_as_pdf_pdfcrowd client_certificate="/home/user/john/pdfcrowd.crt"]
  • PHP function: client_certificate
    echo create_save_as_pdf_pdfcrowd_button(array('client_certificate' => '/home/user/john/pdfcrowd.crt'));
Client Certificate Password
A password for PKCS12 file with a client certificate if it is needed.
Examples:
  • Plugin settings: Miscellaneous tab → Client Certificate Password option
    123456
  • Shortcode: client_certificate_password
    [save_as_pdf_pdfcrowd client_certificate_password="123456"]
  • PHP function: client_certificate_password
    echo create_save_as_pdf_pdfcrowd_button(array('client_certificate_password' => '123456'));

Expert

Expert options for fine-tuning PDF output.

Layout DPI
Set the internal DPI resolution used for positioning of PDF contents. It can help in situations when there are small inaccuracies in the PDF. It is recommended to use values that are a multiple of 72, such as 288 or 360.
Constraint:
  • The value must be in the range of 72-600.
Default: 300
Examples:
  • Plugin settings: Expert tab → Layout DPI option
    144
  • Shortcode: layout_dpi
    [save_as_pdf_pdfcrowd layout_dpi=144]
  • PHP function: layout_dpi
    echo create_save_as_pdf_pdfcrowd_button(array('layout_dpi' => 144));
Contents Matrix
A 2D transformation matrix applied to the main contents on each page. The origin [0,0] is located at the top-left corner of the contents. The resolution is 72 dpi.
Default: 1,0,0,0,1,0
Examples:
  • Plugin settings: Expert tab → Contents Matrix option
    1,0,-10,0,1,-10
  • Shortcode: contents_matrix
    [save_as_pdf_pdfcrowd contents_matrix="1,0,-10,0,1,-10"]
  • PHP function: contents_matrix
    echo create_save_as_pdf_pdfcrowd_button(array('contents_matrix' => '1,0,-10,0,1,-10'));
Header Matrix
A 2D transformation matrix applied to the page header contents. The origin [0,0] is located at the top-left corner of the header. The resolution is 72 dpi.
Default: 1,0,0,0,1,0
Examples:
  • Plugin settings: Expert tab → Header Matrix option
    1,0,-10,0,1,-10
  • Shortcode: header_matrix
    [save_as_pdf_pdfcrowd header_matrix="1,0,-10,0,1,-10"]
  • PHP function: header_matrix
    echo create_save_as_pdf_pdfcrowd_button(array('header_matrix' => '1,0,-10,0,1,-10'));
A 2D transformation matrix applied to the page footer contents. The origin [0,0] is located at the top-left corner of the footer. The resolution is 72 dpi.
Examples:
  • Plugin settings: Expert tab → Footer Matrix option
    1,0,-10,0,1,-10
  • Shortcode: footer_matrix
    [save_as_pdf_pdfcrowd footer_matrix="1,0,-10,0,1,-10"]
  • PHP function: footer_matrix
    echo create_save_as_pdf_pdfcrowd_button(array('footer_matrix' => '1,0,-10,0,1,-10'));
Disable Page Height Optimization
Disable automatic height adjustment that compensates for pixel to point rounding errors.
Default: false
Examples:
  • Plugin settings: Expert tab → Disable Page Height Optimization checkbox
  • Shortcode: disable_page_height_optimization
    [save_as_pdf_pdfcrowd disable_page_height_optimization=true]
  • PHP function: disable_page_height_optimization
    echo create_save_as_pdf_pdfcrowd_button(array('disable_page_height_optimization' => true));
Main Document CSS Annotation
Add special CSS classes to the main document's body element. This allows applying custom styling based on these classes:
  • pdfcrowd-page-X - where X is the current page number
  • pdfcrowd-page-odd - odd page
  • pdfcrowd-page-even - even page
Default: false

Warning

If your custom styling affects the contents area size (e.g. by using different margins, padding, border width), the resulting PDF may contain duplicit contents or some contents may be missing.

Examples:
Add special CSS classes to the header/footer's body element. This allows applying custom styling based on these classes:
  • pdfcrowd-page-X - where X is the current page number
  • pdfcrowd-page-count-X - where X is the total page count
  • pdfcrowd-page-first - the first page
  • pdfcrowd-page-last - the last page
  • pdfcrowd-page-odd - odd page
  • pdfcrowd-page-even - even page
Examples:

API Client Options

Converter Version
Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case.
Allowed values:
  • latest
    The latest converter version.
  • 20.10
    Version 20.10.
  • 18.10
    Version 18.10.
Default: 20.10
Examples:
  • Plugin settings: API Client Options tab → Converter Version option
    Version 18.10.
  • Shortcode: converter_version
    [save_as_pdf_pdfcrowd converter_version="18.10"]
  • PHP function: converter_version
    echo create_save_as_pdf_pdfcrowd_button(array('converter_version' => '18.10'));
Use HTTP
Specifies if the client communicates over HTTP or HTTPS with Pdfcrowd API.
Default: false

Warning

Using HTTP is insecure as data sent over HTTP is not encrypted. Enable this option only if you know what you are doing.

Examples:
  • Plugin settings: API Client Options tab → Use HTTP checkbox
  • Shortcode: use_http
    [save_as_pdf_pdfcrowd use_http=true]
  • PHP function: use_http
    echo create_save_as_pdf_pdfcrowd_button(array('use_http' => true));
Retry Count
Specifies the number of automatic retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
Default: 1
Examples:
  • Plugin settings: API Client Options tab → Retry Count option
    3
  • Shortcode: retry_count
    [save_as_pdf_pdfcrowd retry_count=3]
  • PHP function: retry_count
    echo create_save_as_pdf_pdfcrowd_button(array('retry_count' => 3));