DWG to PDF Converter

How to set PDF output color during converting AutoCAD to PDF

In this article, I would like to show you how to use VeryDOC DWG to PDF Converter to convert AutoCAD to PDF and edit PDF output color with command line and parameters.

VeryDOC DWG to PDF Converter enables you to convert AutoCAD file to PDF file and set PDF output color with commands and GUI. Besides basically converting AutoCAD file to PDF file singly or in batches, this application allows Windows users to edit PDF output color, PDF DPI, etc.. So if you want to know more about editing output color of PDF file, please do not hesitate to read the following paragraphs.

First of all, please download installer of this software:

Download VeryDOC DWG to PDF Converter

Then, please double click it and follow setup wizard to install trial version including GUI and CMD in your computer directly, and then, you can use it in following steps:

1. Run command prompt window

Command prompt is running window of commands in Windows systems, so you need to run cmd to open it on your screen so that following process could be accomplished on your own.

2. Convert AutoCAD file to PDF file and set PDF output color

In opened command prompt, please refer to example below to fulfill your own process:

dwg2pdf.exe -b 1 -i C:\input2.dwg -o C:\output2.pdf

where you need to know:

  • -b <Color type>: specify color type for output file
    -b 1: output black and white PDF file
    -b 2: output gray PDF file
    -b 3: output 256 colors PDF file
  • dwg2pdf.exe is to run application through calling executive file “dwg2pdf.exe”
  • -i C:\input2.dwg is to specify input AutoCAD file
  • -o C:\output2.pdf is to specify output PDF file

As you can see, it is very easy to use VeryDOC DWG to PDF Converter to convert AutoCAD file to PDF file and edit PDF output color flexibly. To know more about merits and other functions of this software, please feel free to read other articles here about VeryDOC DWG to PDF Converter. Thank you for your support here.

DWG to PDF Converter

How to convert AutoCAD to PDF and edit PDF page size with command line

This article aims to show you how to use VeryDOC DWG to PDF Converter to convert AutoCAD to PDF and edit PDF page size with command line on Windows platforms.

Here is trial version of VeryDOC DWG to PDF Converter below:

Download VeryDOC DWG to PDF Converter

After you get trial version of this application in your computer, both GUI and CMD are located in your computer. And here are details about using CMD version of this utility to convert AutoCAD files to PDF files and edit PDF page size with commands:

1. Open command prompt window

Command prompt is running environment of commands, so please run  cmd.exe in your computer to open it directly. Then, you can use that utility to accomplish conversion step by step.

2. Convert AutoCAD file to PDF file and set PDF page size

After command prompt is opened, please refer to following example to fulfill process by yourself:

dwg2pdf.exe -w 800 -h 600 -i C:\input1.dwg -o C:\output1.pdf

where parameters:

-i <AutoCAD Files>: specify input AutoCAD filename

-o <PDF Files>: specify output PDF filename

-w <Page Width>: specify page width, unit is point

-h <Page Height>: specify page height, unit is point

 

where directories:

dwg2pdf.exe is to call executive file “dwg2pdf.exe” to run software

C:\input1.dwg is to ensure input file

C:\output1.pdf is to ensure output file

After commands and parameters like above are typed in command prompt, you can directly convert AutoCAD files, e.g., C:\input1.dwg to PDF file C:\output1.pdf with specific page size.

Extension Knowledge

CAD (Computer-Aided Design) files may contain 2D or 3D designs. They are generated by CAD software programs, which can be used to create models or architecture plans. 2D CAD files are often referred to as drawings, while 3D files are often called models, parts, or assemblies. Common CAD file extensions include .dwg, .dxf, .dwf, etc..

Here is the end of this article, which is to convert AutoCAD file to PDF file and edit PDF page size with commands through VeryDOC DWG to PDF Converter. Welcome to read other articles here to know more functions of this software and other software.

DWG to PDF Converter

How to batch convert AutoCAD to PDF and combine PDF

If you want to know more about batch converting AutoCAD to PDF and combine PDF files with GUI interface, please do not hesitate to read the following paragraphs.

In this article, our main tool is VeryDOC DWG to PDF Converter, which is a professional application for Windows users to produce PDF files from AutoCAD files, e.g., DXF, DWG, DWF, DWT. Moreover, it supports drag and drop of adding source AutoCAD files, which can bring you more convenience during conversion. In addition, this application is not only a basic converting tool, but also an editing tool, e.g., setting PDF encryption, etc.. To know details about this conversion with PDF combination, please keep reading this article.

Step1. Installation

You need to download installer of VeryDOC DWG to PDF Converter here firstly, then double click this installer in your computer so that you can follow setup wizard to install this software in your computer successfully, and trial version could be used directly in later process by yourself.

Step2. Adding

After installation, please run this software in your computer, and then follow steps below to add source AutoCAD files:

Click Add File(s) on GUI interface > choose source AutoCAD files of supported formats and click Open in pop dialog box, so AutoCAD files are successfully added into processing form on GUI interface, which could be proved by popped directories in that table. And here is relevant snapshot below:

Add AutoCAD files for converting AutoCAD to PDF and combine PDF with GUI interface

Step3. Setting 

After successful adding as above, you need to click Setting on GUI interface so that you can setting PDF combination mode like below:

Click Setting so that its own panel could be popped on screen, where you can:

  • click tab Save Mode > click radio Combine AutoCAD files into one PDF file
  • click tab Save Mode > click radio Convert multiple directories to multiple PDF files, in case you click File > select Add Directories on pop list > select one folder in pop dialog box > click Ok when adding source AutoCAD files in batches

Here is relevant snapshot below:

Set PDF combination mode during batch converting AutoCAD to PDF and combine PDF

Step4. Converting

 

When all the basic setting like above is finished, please click Make PDF on GUI interface, then, program provides you with last dialog box where you can set destination folder and click Save, finally, VeryDOC DWG to PDF Converter helps you batch convert AutoCAD files to PDF files and combine PDF files into one PDF file.

Here is the end of this article, which is about using VeryDOC DWG to PDF Converter to batch convert AutoCAD files to  PDF files and combine PDF files into one PDF file through GUI interface in Windows systems. To know more relevant articles about functions of this application, welcome to keep concentrating here. Thank you for your support!

DWG to PDF Converter

How to batch convert DWG/DXF/DWT/DWF to PDF

It is simple to use VeryDOC DWG to PDF Converter to batch convert DWF/DXF/DWT/DWG to PDF on Windows platforms, and there are details in the following paragraphs.

About VeryDOC DWG to PDF Converter

It helps Windows users produce PDF files singly or in batches from various source AutoCAD files, e.g., DWG, DXF, DWT, DWF. This application allows you to edit PDF files in multiple ways, e.g., PDF information, PDF encryption, etc.. To know more about this software, welcome to log on homepage of VeryDOC DWG to PDF Converter.

About steps to batch convert DWG/DXF/DWT/DWF to PDF

1. Install software

From the following icon, you can get installer of this application in your computer, then you can double click it and follow setup wizard step by step till it is successful to install this application in your computer. So trial version of this utility could be used in following conversion by yourself.

Download VeryDOC DWG to PDF Converter

2. Add AutoCAD files

Run this software in your computer so that its GUI interface could be opened on screen, where you can add source AutoCAD files like this:

Click Add File(s) on GUI interface, then select AutoCAD files of DWG, DXF, DWT, DWF in pop dialog box > click Open there, finally, they could be added as paths in processing form of GUI interface like below:

Add AutoCAD files for batch converting DXF/DWF/DWT/DWG to PDF through GUI interface

3. Set PDF properties optionally

After adding source files, please click Setting on GUI interface in order to edit PDF properties optionally:

When setting panel is opened on screen, you can optionally:

  • Click tab Save Mode, you can make PDF files mode, save mode, destination folder
  • Click tab Base Setting, you can set output color of PDF, DPI of PDF, etc..
  • Click tab PDF Info, you can edit PDF information, e.g., title, keywords, etc..
  • Click tab Encrypt Options, you can directly encrypt PDF files in various ways

Optionally set PDF properties during batch converting DXF/DWT/DWF/DWG to PDF

After you finish setting on panel like above, please click OK so that program can help you save these settings and take you back to GUI interface.

4. Select targeting folder and batch convert DXF/DWT/DWG/DWF to PDF

On GUI interface, after setting optional properties of PDF files, please click Make PDF > select targeting folder in pop dialog box > click Save there, at last, VeryDOC DWG to PDF Converter helps you batch convert DWT/DXF/DWG/DWF to PDF in Windows systems. And then, you can find that quality of produced PDF files are as good as original AutoCAD files!

Besides batch converting DXF/DWT/DWG/DWF to PDF, VeryDOC DWG to PDF Converter has other advantages, e.g., command line conversion, etc.. To know more about command line conversion, or more about GUI conversion, please keep visiting here. Thank you for your support!

DOC to Any Converter

How to call doc2any.exe from C++ source code

#include "stdAfx.h"

#pragma hdrstop

#pragma warning(disable:4311)

#pragma warning(disable:4312)

void SilentSpawnVeryPDFAndWait( const CString fileNameIn , const CString fileNameOut) // launch excel to PDF converter

{

    LONG rc;

 

    HKEY keyToPdf;

    DWORD valueType;

    DWORD sizeOfFile = 256;

    char targetDirectory[256];

    char finalDirectory[256];

    char fileToOpen[256];

 

    sprintf(fileToOpen, " -wtext \"Page %%PageNumber%% of %%PageCount%%\" -wpagebegin 2 -wpageend 500 -wpageoffset -1 \"%s\"  \"%s\" ",

              fileNameIn, fileNameOut);

 

       // set up the exe location

       sprintf(finalDirectory, "%s", "C:\\_VeryPdfDoc2AnyCLTool\\doc2any_cmd\\doc2any.exe");

 

       CWnd *wnd = (CWnd *)AfxGetMainWnd();

 

    STARTUPINFO si;

    PROCESS_INFORMATION pi;

 

    // initialize structures

    ZeroMemory(&si, sizeof(STARTUPINFO));

    ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));

    si.cb = sizeof(STARTUPINFO);

    si.dwFlags = STARTF_USESHOWWINDOW;

       si.wShowWindow = SW_HIDE;

 

    //CreateProcess...

    SetCursorWait();

    CreateProcess(finalDirectory, fileToOpen, NULL, NULL, false, 0, NULL, NULL, &si, &pi);

 

    //CreateProcess( NULL, commandLine, NULL, NULL, false,    0, NULL, NULL, &si, &pi );

    //CreateProcess( commandLine,NULL, NULL, NULL, false,     0, NULL, NULL, &si, &pi );

    //WaitForInputIdle(GetCurrentProcess(), INFINITE);

 

    // loop until process terminates

    HWND hWnd = GetActiveWindow();

 

    if( pi.hProcess )

        {

        DWORD dwExitCode = STILL_ACTIVE;

 

        while( dwExitCode == STILL_ACTIVE )

            {

            WaitForSingleObject(pi.hProcess, 1000);

            GetExitCodeProcess(pi.hProcess, &dwExitCode);

            }

        }

}