Windows file conversion automation

How to Convert Files Using the ViewCompanion Command Line

Convert PDF, DWG, DWF, DXF, TIFF, CGM, PLT, HPGL/2 and other supported technical files without opening each document manually. This guide shows the basic workflow, common output formats, reusable configuration files and Windows batch automation.

Why use command-line conversion?

The command-line interface lets you start a conversion from a script, another application, Windows Task Scheduler or an automated document workflow. Processing is performed locally on the Windows computer where ViewCompanion is installed.

Repeatable results

Use the same conversion settings every time instead of selecting options manually for each file.

Unattended workflows

Run conversions from batch files, scheduled tasks or another Windows application.

Local processing

Keep engineering drawings and business documents on your own computer or company network.

Create your first command-line conversion

A conversion command normally identifies the ViewCompanion executable, the source file, the destination file or folder, and any conversion or configuration options.

  1. Locate the ViewCompanion executableUse the complete installation path, especially when the path contains spaces.
  2. Select an input fileSupply the full path to the PDF, drawing, plot file or image you want to convert.
  3. Select the outputThe filename extension identifies the required output format, such as .pdf, .dxf, .tif or .png.
  4. Add conversion settingsUse command-line parameters or select a prepared configuration file for consistent output.
General command pattern"C:\Program Files\Software Companions\ViewCompanion Premium\ViewCompanion.exe" /c FORMAT "inputfile" "outputfile"
"C:\Program Files\Software Companions\ViewCompanion Pro\ViewCompanion.exe" /c FORMAT "inputfile" "outputfile"
"C:\Program Files\Software Companions\ViewCompanion Standard\ViewCompanion.exe" /c FORMAT "inputfile" "outputfile"
Working exampleviewcompanion.exe /c PDF "C:\Input\drawing.plt" "C:\Output\drawing.pdf"
Paths containing spaces: Put quotation marks around the executable path, input file, output file and configuration filename. Using full paths also makes commands more reliable when they are started by another application or Windows Task Scheduler.

Examples for common output formats

The required output format is usually selected by the destination extension. Additional format-specific settings can be supplied through a configuration file.

PDF

Convert a PLT file to PDF

Create a shareable PDF from an HPGL/2 or plot file.

viewcompanion.exe /c PDF "C:\Input\plan.plt" "C:\Output\plan.pdf"
DXF

Convert a DWF file to DXF

Create a CAD-compatible DXF file from a DWF file.

viewcompanion.exe /c DXF "C:\Input\drawing.dwf" "C:\Output\drawing.dxf"
TIFF

Convert a DWG file to TIFF

Create a raster output file using ViewCompanion's current TIFF settings.

viewcompanion.exe /c TIFF "C:\Input\drawing.dwg" "C:\Output\drawing.tif"
PNG

Create a PNG preview

Generate a raster preview for use in document systems, websites or thumbnails.

viewcompanion.exe /c PNG "C:\Input\drawing.dwg" "C:\Output\drawing.png"
PDF/A

Create a PDF/A-2b file

The /cpdfa command converts an existing PDF to the selected PDF/A level. Level 2 selects PDF/A-2b.

viewcompanion.exe /cpdfa 2 "C:\Input\document.pdf" "C:\Archive\document.pdf"
JPEG

Create a JPEG image

Use /ci to control resolution and JPEG quality with a reusable configuration file.

viewcompanion.exe /ci "C:\VCConfig\jpeg-preview.ini" JPEG "C:\Input\sheet.cgm" "C:\Output\sheet.jpg"

Use configuration files for consistent output

Configuration files let you prepare conversion settings in ViewCompanion and reuse them in automated jobs. This keeps long commands readable and makes it easier to maintain different conversion profiles.

A configuration may contain format-specific choices such as PDF/A level, page size, raster resolution, color depth, image compression, DXF units or arc resolution. Use /ci instead of /c and place the configuration filename immediately after the command.

Conversion with a named configurationviewcompanion.exe /ci "C:\VCConfig\dxf-millimeters.ini" DXF "C:\Input\drawing.pdf" "C:\Output\drawing.dxf"

Keep the command and settings separate

The command identifies what should be converted. The configuration file defines how the output should be created. You can update the configuration without rewriting every batch file that uses it.

Example configuration profiles

  • standard-pdf.iniStandardized PDF page size, margins and compression.
  • pdfa-2b-archive.iniPDF/A-2b output for long-term document archiving.
  • dxf-millimeters.iniDXF output using millimeters and a selected DXF version.
  • tiff-g4-300dpi.iniBlack-and-white TIFF output at 300 DPI with Group 4 compression.
  • png-preview.iniPNG output sized for document previews or thumbnails.
  • dwg-default-layout.iniConvert Only the Default DWG Layout.

Example conversion configuration file

Every configuration file starts with the [ViewCompanion Convert Configuration] header. The example below creates monochrome TIFF output at 300 DPI using CCITT Group 4 compression.

tiff-g4-300dpi.ini[ViewCompanion Convert Configuration]
RASTERDPI=300
RASTERBPP=1
MONOCHROME=ON
TIFFCOMPRESSION=4
CREATEMULTIPAGE=ON

See the conversion configuration file reference for all available settings and accepted values.

Download example configuration files

Ready-to-use ViewCompanion configuration files for PDF, PDF/A, DXF, TIFF, PNG and JPEG conversion are available from our GitHub repository.

WorkflowTypical inputOutputSuggested configuration
Standardize incoming drawingsPLT, DWF, CGMPDFstandard-pdf.ini
Prepare CAD dataPDF vector drawingsDXFdxf-millimeters.ini
Archive documentsPDF and supported technical filesPDF/Apdfa-2b-archive.ini
Create monochrome raster outputPDF, DWF, PLTTIFFtiff-g4-300dpi.ini
Generate previewsDWG, PDF, DXFPNG or JPEGpng-preview.ini

Convert several files with wildcards

The /c command accepts wildcards in the input filename. When using a wildcard, the final parameter is the destination folder rather than an individual output filename.

Convert every PLT file to a separate PDF fileviewcompanion.exe /c PDF "C:\Drawings\Incoming\*.plt" "C:\Drawings\PDF"
Use a configuration for every converted fileviewcompanion.exe /ci "C:\VCConfig\standard-pdf.ini" PDF "C:\Drawings\Incoming\*.plt" "C:\Drawings\PDF"

The same approach can be adapted for other source extensions and output formats. Test a new command with a small set of sample documents before using it in production.

Create one multipage output file

Use /cm when several matching source files should be combined into one supported multipage output file. The available formats are DWF, PDF, PDFRASTER, PLT and TIFF.

Combine all PLT files into one PDFviewcompanion.exe /cm PDF "C:\Drawings\Incoming\*.plt" "C:\Drawings\combined.pdf"

Use /cmi to perform the same operation with a conversion configuration file:

Multipage conversion with a configurationviewcompanion.exe /cmi "C:\VCConfig\standard-pdf.ini" PDF "C:\Drawings\Incoming\*.plt" "C:\Drawings\combined.pdf"

Tips for reliable unattended conversion

  • Put quotation marks around every executable, input, output and configuration path that may contain spaces.
  • Use full paths so that the command does not depend on the current working directory.
  • Make sure the account running the command can read the source folder and write to the output folder.
  • Install any required SHX fonts and make DWG external reference folders available when converting DWG drawings.
  • Decide how existing destination files should be handled before running a recurring conversion job.
  • Use a separate configuration file for each output profile rather than changing one shared file between jobs.
  • Verify multipage, layout and paper-size behavior with representative documents.

Frequently asked questions

Does ViewCompanion upload files for conversion?

No. Command-line conversion is performed locally on the Windows computer running ViewCompanion.

Can different jobs use different conversion settings?

Yes. Create separate configuration files for different output formats, customers or workflows and select the appropriate file in each command.

Can I run conversion from Windows Task Scheduler?

Yes. A tested batch file or command can be started by Windows Task Scheduler, provided the selected Windows account has access to all required files and folders.

For software developers

Need command-level integration in your own application?

For software developers who need direct control over file conversion and PDF processing, the scConverter SDK provides DLL and COM interfaces for integration into Windows applications and automated solutions.

Learn more about the scConverter Conversion SDK

Related information

Automate technical file conversion with ViewCompanion

ViewCompanion combines desktop viewing, printing and conversion with command-line and batch-processing tools for Windows workflows.

Explore ViewCompanion Premium Explore ViewCompanion Pro Explore ViewCompanion Standard