Apply Page Setup
page_setup_applySet a paper-space layout's plot configuration in one call: paper size, scale, orientation, device, and plot style, validated before anything is written.
Instructions
AutoCAD's PAGESETUP as one call, on both engines.
Paper sizes are ISO 216 / ANSI Y14.1; the media is written in AutoCAD's own
spelling (ISO_A3_(420.00_x_297.00_MM)). changed lists only the values
that moved — re-applying the same setup reports {}. An unknown ctb is
written and reported plot_style_known: false (a missing ctb only matters
at plot time). Viewports on the sheet are never touched.
Refused before anything is written: an unknown paper, orientation, scale
or plot_area, an empty device or plot_style, margins that leave no
printable area, Model, an unknown layout. On the live engine margins_mm
is refused (the .pc3 owns them) and a media the device does not offer is
refused with the device's names for the same paper.
The proof is the PDF: batch_plot reads each sheet's /MediaBox back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper | Yes | ISO_A0…ISO_A4 or ANSI_A…ANSI_E (short forms A3, ansi_b accepted). | |
| scale | No | fit | 1:1 | 1:2 | 1:5 | 1:10 | 1:20 | 1:50 | 1:100 | 2:1 | 5:1 | 10:1 | fit |
| center | No | Centre the plot on the paper. | |
| device | No | Plotter configuration (.pc3) or printer name. | DWG To PDF.pc3 |
| layout | Yes | Paper-space layout to set up (never 'Model'). | |
| plot_area | No | layout | extents | layout |
| margins_mm | No | [top, bottom, left, right] in mm. Headless only: AutoCAD takes margins from the .pc3. | |
| plot_style | No | Plot style table, e.g. monochrome.ctb, acad.ctb, Grayscale.ctb (plot_style_list). | monochrome.ctb |
| orientation | No | landscape | portrait | landscape |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||