NPM Package/docs/components/files/print-portion
Print Portion
Select an area of the current drawing, preview the crop, and choose its print size.
Open the sample drawing in the demo and choose Print Portion from the parent toolbar.
- 1Drag a rectangle around the area you want to print. Releasing the pointer opens the preview.
- 2Choose Fit to page to scale the selection to the printable area, or Selection size to use the selected area’s dimensions when they fit within the page margins. Check the printed area shown in the preview.
- 3Choose Select again to redraw the rectangle, Cancel to return to the drawing, or Print to open your browser’s print dialog. If the browser offers Save as PDF, you can save the selection there.
Wait for viewer.ready() and the document to open. Enable the button when viewer.getInfo().capabilities includes printPortion.
Call viewer.tools.startPrintPortion() from the button handler. Disable the button while the request is pending and display any error in the parent.
typescript
Start from the Parent Toolbar
The method accepts optional requestId and timeoutMs. It resolves with { success: true, requestId } once Canvas starts selection. The SDK exposes no completion event for printing or cancellation.
The Export & Print page covers whole-document printing and export.


