Skip to content

Document generation

Document requests

OperaJM generates reports, offers and production documents. The CLI help lists operac -d- for discovering document codes and -d for document generation. It associates document generation with the job ID (-jid), year (-jyear) and window-type ID (-jwid). Confirm the required identifiers and output handling for the document code you use.

When an Output directory is configured in OperaJM, prints are saved there as PDF files.

Discover job reports and documents

The Reports section of the browser calculation report builds its list from the server's report catalog and configured archives. To discover the same choices from an integration, query the XML sources and apply the filters below. The generation column shows the document argument. In each request, append the job ID and year as &-jid<id>&-jyear<year>.

Report category Discovery GET XML records and stylesheet filter Generation argument
Built-in job reports /query?-d- /job_report_types/job_report_type with a name and a code without a colon -d<code>
Configured job documents /query?-edoc /jobs/job/docs/doc where document_type is job -ddocument:<document_name>
Configured external reports /query?-erpe /jobs/job/reports/report where report_type is job -dreport:<report_name>
Labels /query?-eeti /jobs/job/lbls/lbl where label_type is job or window type -dlabel:<label_name>
Rule conformity documents /query?-enrm /jobs/job/norms/norm where norm_type is product or threshold and the norm_conformity_doc element exists -druledocument:<norm_name>
Configured print reports /query?-efsc /jobs/job/fscs/fsc -d(<prints_report_name>)

The stylesheet adds the named document, report, label, and rule categories when -d- includes the corresponding document:, report:, label:, or ruledocument: entry with a name. Availability depends on the server's configuration.

Conformity documents can support regional workflows, such as CE marking in Europe or NAFS in North America. Discover the available rule through -enrm and use its returned norm_name in the -druledocument: request.

Job schemes

Use -dschema with the job ID and year to request the job schemes document. The same link is available in the Reports section of the browser calculation report.

http://localhost:9001/query?-dschema&-jid5&-jyear2026

On the tested server, this request returned HTTP 200 with application/pdf. On success, read the response as PDF bytes.

Job image preview

Send -jp with the job ID and year to retrieve a graphic preview of an existing job. Substitute the identifiers for the job you want to preview.

http://localhost:9001/query?-jp&-jid5&-jyear2026

On the tested build 3.10.1.81, the request returned HTTP 200 with content type image/png and a 600 × 400 pixel PNG. Read the successful response as image bytes. Check the HTTP status and content type before displaying or saving the preview.

Job typology image preview

Use -jwp with the job ID, job year, and the window-type ID (-jwid) to request a preview of one typology in a job. The following requests use job 7/2012, window type 1, and -jwpd800x600.

Output Request Observed content type
Raster PNG, 800 × 600 pixels Open PNG preview image/png
Vector PDF Open PDF preview application/pdf
Vector SVG Open SVG preview image/svg+xml

The PNG was 800 × 600 pixels and the SVG used an 800 × 600 viewport. The PDF contained vector drawing commands and used its own page dimensions. Check the response status and content type before saving or displaying it.

Single typology WebGL viewer

Open the HTML5 viewer in a browser with WebGL support. Replace the job and window-type identifiers for the typology you want to view.

Open the WebGL preview for job 7/2012, window type 1.

The operac_query value contains the complete -jwp3 query. Encode the ampersands as %26 so the viewer receives them as part of that single parameter. The page creates a WebGL canvas and requests the scene from /query, appending -pfjst and a -pd value based on the page dimensions. The tested viewer returned text/html, and its scene request returned text/javascript.

Archive image export

The profile and accessory list pages render images by building a separate URL for each XML record. Open the list URLs in a browser that applies XSLT to see the catalog with thumbnails.

Catalog List URL Image request
Profiles /query?-lpro&-Yprofilelist.xsl /query?-papro&-pid<id>&-pfSVG,PNG&-pd60x40
Accessories /query?-lcmp&-Yaccessorylist.xsl /query?-pacmp&-pid<id>&-pfSVG,PNG&-pd60x40

Each stylesheet reads <ID> from the corresponding <record> in the list and passes it to -pid<id>. The -pa argument selects the archive, and -pd60x40 requests thumbnail dimensions of 60 × 40. To retrieve an image directly, replace <id> with the record's ID and send the image request as an HTTP GET.

The format preference -pfSVG,PNG tells operac to return a vector SVG when available and otherwise render a raster PNG. Check the HTTP status and response content type before displaying or saving the image. On the test server, profile requests returned image/svg+xml, and accessory requests returned both image/svg+xml and image/png. Check the returned dimensions if your layout depends on a fixed image size. The catalog stylesheets hide an image when it cannot be displayed.

The CLI help also lists DXF, PNG, JPG, BMP, and PCX as archive image export formats.

Output formats

All formats listed below are supported in all OperaJM versions.

Format Extension Type Description
JPEG .jpg Raster image Lossy compression suited to photographs.
PNG .png Raster image Lossless compression with optional transparency.
SVG .svg Vector image XML-based graphics that scale without losing sharpness.
PDF .pdf Document Portable document format that preserves page layout.
DXF .dxf CAD drawing Interchange format for sharing drawings between CAD applications.
DWG .dwg CAD drawing Native AutoCAD drawing format.
STL .stl 3D mesh Represents a 3D surface as triangles and is commonly used for 3D printing.
ZPL .zpl Printer language Zebra Programming Language instructions for label printers.