See also printer-dc%.
(new post-script-dc% [ [interactive interactive] [parent parent] [use-paper-bbox use-paper-bbox] [as-eps as-eps] [width width] [height height] [output output]]) → (is-a?/c post-script-dc%) interactive : any/c = #t parent : (or/c (is-a?/c frame%) (is-a?/c dialog%) #f) = #f use-paper-bbox : any/c = #f as-eps : any/c = #t width : (or/c (and/c real? (not/c negative?)) #f) = #f height : (or/c (and/c real? (not/c negative?)) #f) = #f output : (or/c path-string? output-port? #f) = #f
If parent is not #f, it is used as the parent window of the configuration dialog.
If interactive is #f, then the settings returned by current-ps-setup are used. A file dialog is still presented to the user if the get-file method returns #f and output is #f, and the user may hit Cancel in that case so that ok? returns #f.
If use-paper-bbox is #f, then the PostScript bounding box for the output is determined by width and height (which are rounded upward using ceiling). If use-paper-bbox is not #f, then the bounding box is determined by the current paper size (as specified by current-ps-setup). When width or height is #f, then the corresponding dimension is determined by the paper size, even if use-paper-bbox is #f.
If as-eps is #f, then the generated PostScript does not include an Encapsulated PostScript (EPS) header, and instead includes a generic PostScript header. The margin and translation factors specified by current-ps-setup are used only when as-eps is #f. If as-eps is true, then the generated PostScript includes a header that identifiers it as EPS.
When output is not #f, then file-mode output is written to output. If output is #f, then the destination is determined via current-ps-setup or by prompting the user for a pathname. When output is a port, then data is written to port by a thread that is created with the post-script-dc% instance; in case that writing thread’s custodian is shut down, calling end-doc resumes the port-writing thread with thread-resume and (current-thread) as the second argument.