Skip to content

title: AskSheetImages description: AskSheetImages extracts full-sheet images from a technical drawing. It returns high‑fidelity raster images of entire sheets—preserving layout, annotations, title blocks, and graphical elements—for downstream processing, visualization, review, or archival. path: tree/main/docs/asks source: sheet-images.md


AskSheetImages

AskSheetImages returns page‑sized images of technical drawing sheets. The output is ideal for lightweight viewers, QA workflows, human review, and long‑term archiving—without requiring native CAD applications.

When to use

Use AskSheetImages when you need to:

  • Archive drawing sheets as portable images.
  • Visualize drawings in dashboards, emails, support tickets, or mobile apps.
  • Annotate or review drawings outside CAD.
  • Snapshot the exact page context for detections made by other asks (e.g., balloons, callouts, notes).

ROTATION

Werk24 auto‑corrects page rotation to a natural reading orientation. If you rely on coordinate‑based extractions (e.g., via AskBalloons), always use the generated sheet image as your base rather than the raw upload.

Typical workflow

  1. Upload a drawing to Werk24 and request AskSheetImages.
  2. Receive one response per page with the image bytes.
  3. (Optional) Pipe the image into your viewer/QA pipeline or persist to object storage.

Example: Python

from pathlib import Path
from werk24 import  AskType, AskSheetImages, read_example_drawing

# Prepare inputs
asks = AskSheetImages()
example_path = Path("./examples/drawings/plate_a4.pdf")

# Execute
results = read_example_drawing(example_path, [asks])

# Persist images
for response in results.get(AskType.SHEET_IMAGES):
for page_response in results.get("ASK_SHEET_IMAGES", []):
    if getattr(page_response, "payload_bytes", None):
        out = Path(f"sheet_image_{i:02d}.png")
        out.write_bytes(page_response.payload_bytes)
        print(f"Wrote {out}")

Best practices

  • Coordinate stability: If you chain asks that depend on pixel coordinates (AskBalloons), reference the returned sheet image to maintain orientation alignment.
  • Storage strategy: Use deterministic keys such as {drawing_id}/{revision}/sheets/{page:02d}.png for idempotent storage.
  • Compression & size: For web UIs, consider generating thumbnails (e.g., 1024px max dimension) alongside full‑res images.
  • Access control: If images contain proprietary geometry or notes, store them in a secure bucket with short‑lived, signed URLs for sharing.

Limitations

  • Raster output: The result is a raster image; vector fidelity (from original CAD/PDF) is not preserved.
  • Very large sheets: Extremely high‑resolution scans can be large; downscale or stream as needed for browsers/mobile.

Common pairings

  • AskTitleBlock – capture title, rev, drawing number for filenames and indexing.
  • AskBalloons – detect and track callouts; overlay on the returned sheet image.
  • AskViewports – split multi‑view sheets; store both the full sheet and cropped views.
  • AskNotes – extract general notes; keep sheet images for contextual review.

FAQ

Does AskSheetImages modify my drawing? No. It produces a separate image for each page. Your original upload remains unchanged.

Why do my coordinates change after I download the image? Auto‑rotation ensures readability. Use the auto‑rotated sheet image as the reference for any pixel coordinates.

What image formats are supported? PNG is the default for lossless clarity.

What DPI should I expect? The DPI depend on the input source. We return images of 200dpi unless the input file has lower resolution.