PRINTPDF

From iMacros
Jump to navigation Jump to search

Downloads the current browser window(webpage) as a PDF.

Syntax iMacros 2021.0

PRINTPDF FOLDER=folder_name FILE=file_name HEIGHT=paper_height WIDTH=paper_width LANDSCAPE=true_false_whether_to_print_in_landscape

Parameters

All the parameters are optional.

  • FOLDER
    Directory/Folder where the pdf file needs to be saved. If not provided, by default iMacros downloads location will be selected.
  • FILE
    Filename for the pdf generated. If not provided, Page title will be taken as the file name.
  • HEIGHT
    Paper height in millimeters. If not provided, the default paper height based on the locale will be used.
  • WIDTH
    Paper width in millimeters. If not provided, the default paper width based on the locale will be used.
  • LANDSCAPE
    Boolean value to set Portrait or Landscape mode of printing page. The default value is false => print mode is the portrait, accepted values or 0/1 and false/true.

Examples

PRINTPDF FOLDER=C:\Users\Administrator\Documents\iMacros\Downloads\PDFs FILE=test.pdf HEIGHT=200 WIDTH=300 LANDSCAPE=true

See Also

ONPRINT, ONDIALOG, How to save a website or take screenshot