convert_url_to_pdf
Convert a web page to PDF from its URL. Specify the target URL and optional layout, page format, margins, and authentication to save the PDF locally.
Instructions
Convert a web page to PDF using the PDF4me ConvertUrlToPdf API. Required input is only web_url (https://...); no local file path is read. Optional: layout, page format, margins, scale, print background, auth (NoAuth or credentials), output_dir/output_file_name for where to save the PDF (default file name output.pdf).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Render scale (1.0 = 100%). | |
| layout | No | Page orientation (portrait or landscape). | portrait |
| web_url | Yes | Page to render (https://...). | |
| password | No | Optional password when the target URL requires authentication. | |
| username | No | Optional username when the target URL requires authentication. | |
| auth_type | No | Site auth mode (e.g. NoAuth; use Basic + username/password if needed). | NoAuth |
| output_dir | No | Directory to save the PDF. | |
| top_margin | No | 20px | |
| left_margin | No | 20px | |
| page_format | No | Paper size (e.g. A4, Letter, Tabloid per API docs). | A4 |
| right_margin | No | 20px | |
| bottom_margin | No | 20px | |
| output_file_name | No | File name for the saved PDF. | |
| print_background | No | Include backgrounds in the PDF. | |
| display_header_footer | No | Print browser header/footer region if supported. |