DWG to Image Command Line can not trim white margins from generated image files, DWG to JPG and PNG Converter

We've ordered the "DWG to Image Command Line End User License" software.


Now, we used the V3.2 program from your company website, and it can be run with the series number!


* We used version currently as below for your reference:*
DWGTools Converter Command Line v3.2
Convert DWG and DXF files to Raster BMP, JPG, PNG, TIFF, GIF formats.
Release Date: Nov  7 2016
Operating system: Windows 10 64bit

Although the program can running with serial number, we have some problem, please help us to check it.

(1) use "-debug" parameter:
Conversion fail, why is no any extra debugging information?!

(2) use "-dpi" parameter:
If we use the "-dpi" parameter, the conversion file has a lot of blank areas above and below (please see the attachment); and if we don't use the "-dpi" parameter, it automatically removes the blank. Is there any parameter that we can solve the blank space problem?!

(3) use "zoomtype" parameter:
We think to use "zoomtype 2 (Zoom Extents) parameter, It should be possible to remove the white space, but in fact, this parameter has no effect. Do you have any suggestion for that?!

(4) Could you please inform us which version program is running stability and suitable for us to use?!

Thanks for your assistance!

Best regards,
Thanks for your message, here are answers to your questions,

1. Conversion fail, why is no any extra debugging information?

In general, the conversion fail may caused by high DPI value, the high DPI resolution will generate very big width and height values, such as an image file with 50000x50000 pixel or more dimension, if your system hasn't enough memory, it will show "Conversion fail" error message, in this case, you may reduce the DPI value to try again, e.g., "-dpi 10" or "-dpi 20",

dwg2img.exe -bgcolor 255 -dpi 20 test3.dwg _test3.png

btw, if you wish to remove highlight colors from PNG image file, you can run following command line to convert from color PNG image file to black and white image file,

imgconv.exe -threshold 98% _test3-trim.png _test3-bw.png

after you run above command line to process your image file, you will get a trimmed image file automatically.

2. In order to remove blank space from generated image files, you can use imgconv.exe application, imgconv.exe is included in the "verydoc_dwg2image_cmd.zip" package, you can run following command line to trim white margins from your PNG image files easily,

imgconv.exe -trim -border 50 -bordercolor white _test3.png _test3-trim.png

3. "zoomtype" parameter is just zoom DWG content to fit the paper size, it can't remove the margins, if you need to remove the margins, you need use imgconv.exe application.

4. You can always download the latest version from our website directly,



School How to convert your image to vector PDF, DXF, SVG formats (png to svg, jpg to svg, png to dxf, jpg to dxf, etc.)?



VeryDOC has a Scan2CAD software also, with this Scan2CAD software, you can convert your images, such as PDF files, or BMP, or any other image, into a clean, editable Vector file, such as DXF, PDF, SVG, etc. formats.

Just open following web page in your web browser,



Click on "Choose File" button to choose an architectural image, choose "Output Format" with PDF, SVG or DXF format, and choose some other options, after that, please click "Upload and Convert File" button, you will upload the raster image file to our server, our "Cloud Raster to Vector Converter" will convert this raster image file to vector DXF, PDF, SVG, etc. formats, you can download and save the converted vector file to your local system properly.

VN:F [1.9.20_1166]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
DWG to Image Command Line can not trim white margins from generated image files, DWG to JPG and PNG Converter, 10.0 out of 10 based on 2 ratings

Related Posts

One Reply to “DWG to Image Command Line can not trim white margins from generated image files, DWG to JPG and PNG Converter”

  1. Dear VeryDOC,

    Many thanks for your offer. We tried to run the imgconv.exe program with -border parameter, but it seems can only run “one file”, please see the attachment.
    We would like to run “one Folder” (all *.png files) to another folder name, How can we do? Would you please help us to do it?! Thank you so much!

    We use below command for your reference,

    C:\verydoc_dwg2image_cmd\imgconv.exe -trim -border 50 -bordercolor white C:\*.png C:\test\*.png

    Thanks for your message, you can use following command line to batch trim all PNG image files in one folder (C:\in\*.png) and place trimmed PNG image files to another folder (C:\out),

    for %F in (C:\in\*.png) do C:\verydoc_dwg2image_cmd\imgconv.exe -trim -border 50 -bordercolor white “%F” “C:\out\%~nxF.png”



    VN:F [1.9.20_1166]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.20_1166]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!