Skip to content
pdfconversionapi

DWG to TIFF API

Send a DWG to POST /v2/convert/dwg/to/tiff for a single-page, uncompressed TIFF of the drawing's model space, 2400 × 1600 pixels on a dark background. The sample asks for ColorSpace=gray, which stores one 8-bit channel instead of four.

Endpoint
POST /v2/convert/dwg/to/tiff
Accepts
dwg
Sample timing
0.16 s median of 5 runsHow we measure
Request size
Up to 10 MB on the Free plan or 100 MB on paid plans, all files together

Request and response

Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.

curl -sS -X POST \
  https://api.pdfconversionapi.com/v2/convert/dwg/to/tiff \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@deck-framing-plan.dwg \
  --form-string ColorSpace=gray \
  -o response.json

# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
  mkdir -p converted
  name=$(jq -r '.Files[0].FileName' response.json)
  jq -r '.Files[0].FileData' response.json \
    | base64 --decode > "converted/$name"
else
  cat response.json
fi
200 OK0.16 s median1 file, 3.7 MB
{
  "ConversionCost": 1,
  "ConversionTime": 0.16,
  "Files": [
    {
      "FileName": "deck-framing-plan.tiff",
      "FileExt": "tiff",
      "FileSize": 3840230,
      "FileData": "SUkqADiYOgABAAAAAQAAAAEA…"
    }
  ]
}

Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.

The sample, converted

The same file the code sends. Download the input and the output and compare them yourself.

First page of deck-framing-plan.tiff, rendered by the API
Input
deck-framing-plan.dwg (12 KB)
Output
deck-framing-plan.tiff (3.7 MB)
Source
A framing plan for a fictional 16 by 12 foot backyard deck, which we drew as a DXF with a short script and saved as DWG (2004 format) (CC0-1.0). How it was made
Made by
2026-11-04, API build 9eeeb0640aba

Parameters

Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.

ParameterWhat it does
ColorSpaceenum, default defaultgray stores 8-bit gray, 3,840,230 bytes for the sample instead of 15,360,342 for 8-bit RGBA. monochrome stores only black and white pixels in the same 8-bit gray layout, so it is no smaller. rgb drops the alpha channel, since every pixel is opaque: 11,520,306 bytes. truecolors, ConvertAPI's documented default, returns the same RGBA file as leaving the option out. cmyk returns 400.Values: default, rgb, truecolors, gray, grayscale, monochrome
ImageResolutionintegerWritten to the TIFF's resolution tags only; the image stays 2400 × 1600. Without it the tags are still there but say 1 × 1 with no unit, so no DPI is recorded.Values: 10–800
TransparentColorstringTurns one exact color transparent. 33,40,48, the background color, leaves only the linework opaque: 97,888 of 3,840,000 pixels in the color TIFF of the sample. ConvertAPI doesn't document it for this pair, but the API applies it.Values: A color name, #RRGGBB or R,G,B
MultiPageboolean, default trueAccepted with either value. A drawing gives a single page, so there is nothing to combine.
FileNamestringName of the TIFF, minus .tiff; it defaults to the DWG's name.
StoreFileboolean, default falseAnswer with a link to the stored TIFF, valid 3 hours, which is easier than base64 for a 15 MB file.

Not supported yet

Setting one of these to anything but its default returns 400.

OptionWhat to do instead
ImageWidthFixed at 2400 × 1600; any width returns 400.
SpaceToConvertOnly model space can be drawn.
ExportLayersfalse returns 400.

Also refused when set: ImageHeight, CustomSpaceToConvert.

What carries over, and what doesn't

Kept

  • Every pixel of the 2400 × 1600 CAD-screen picture, stored without compression, so nothing is lost to encoding
  • Color layers, white color-7 lines and the dark background in the default RGBA output
  • Dashed HIDDEN lines, the wall hatch, the three post blocks and the section mark attributes
  • Layer visibility from the file: the off S-DECKING boards are not drawn

Lost or not yet supported

  • Size. Nothing is compressed: the sample would be 15,360,342 bytes in color, and even gray is 3,840,230 bytes, for a 12,268-byte DWG.
  • In gray, dark colors sink into the background. Gray values are computed from the colors, so the background becomes 39, the red beam about 50, only a little lighter, and the blue ledger about 23, darker than the background; both are barely visible.
  • The background is dark, not white, and there is no option to change it; BackgroundColor is ignored on this route.
  • The drawing is fitted to the frame with no scale, and paper-space layouts are not drawn.
  • Only one page, even for a DWG with several layouts.

Limits

  • DWG files saved in the R13 through 2018 formats.
  • One single-page TIFF per DWG, 2400 × 1600.
  • ImageResolution outside 10–800 returns 400.
  • A damaged DWG returns 422 with the reader's message.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together; 120 seconds per conversion, then 504.

Where teams use it

Records systems that file images as TIFF

Document management and records platforms often store attachments as TIFF. Convert the DWG on its way in so the archive holds a picture of the drawing that its viewer can open.

A picture of a drawing next to the original

Keep a TIFF snapshot beside each DWG revision. The ImageResolution tag can be set to match the rest of a scanned collection, while the pixels stay the same.

Questions

Why is the TIFF so large?

It is written without compression: 2400 × 1600 pixels × 4 bytes is 15,360,000 bytes plus a small header. Gray needs 1 byte per pixel, which is why the sample is 3,840,230 bytes. If size matters more than format, dwg/to/png gives the same picture in 97,617 bytes.

Is the TIFF compressed with LZW or CCITT?

No. The single page is stored raw. LZW is used only when several pages are combined into one multi-page TIFF, which never happens for a drawing.

Can I make the background transparent?

Yes: send TransparentColor=33,40,48. Pixels of exactly that color get alpha 0, leaving the lines and fills opaque. Antialiased edges keep a dark fringe, because only the exact color is keyed out.

Can I get a black-on-white TIFF for printing?

Not from this route; the drawing is drawn light on dark. Convert to PDF with /v2/convert/dwg/to/pdf, which prints color 7 black on a white sheet, and then use /v2/convert/pdf/to/tiff.

Convert your first DWG file in a minute.