> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/core/conversion/convert-cad-to-pdf.md).

# Convert CAD / DWG to PDF on Server/Desktop

CAD Module is a new optional add-on utility which can be used with Apryse SDK 7.0 or later to convert CAD documents to PDF while preserving layers without any external dependencies.

{% hint style="info" %}
**Requirements**

*These packages are required to use these features in production. Trial keys have unlimited access to all features*

<a href="https://apryse.com/capabilities#CADConversion" class="button primary">Package: CAD Conversion</a><a href="/core/learn-more/modules.md#cad-module" class="button primary">Module: CAD</a><a href="https://showcase.apryse.com/cad-viewer" class="button primary">Live demo</a>
{% endhint %}

CAD Module is a new optional add-on utility which can be used with Apryse SDK 7.0 or later to convert CAD documents to PDF while preserving layers without any external dependencies. Supported CAD formats include DWG, DWF, DXF, and DGN can be directly converted to PDF using the [`PDF.Convert.FromCAD`](https://sdk.apryse.com/api/PDFTronSDK/cpp/classpdftron_1_1_p_d_f_1_1_convert.html#a800084eb798b11f6690bcef5cb7016e0) method with this module. Beta support for RVT format is also available on Windows.

You can find more details about [how to install CAD Module](/core/learn-more/modules.md#cad-module).

## Supported formats

| File Format   | Supported Versions    |
| ------------- | --------------------- |
| DGN           | V7, V8                |
| DXF, DWF, DWG | AutoCAD R12 and newer |
| RVT \*        | All ✓                 |

{% hint style="info" %}
**\* RVT format is currently on beta support only for Microsoft Windows**
{% endhint %}

## Usage

To use the CAD Module, you must use the `PDFNet.AddResourceSearchPath` method with the path to the module's `Lib/` folder to include the module files.

{% hint style="warning" %}
**Warning**

Requires the CAD module add-on. All files in the `Lib` folder of the archive must be present for the module to work as expected.
{% endhint %}

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
PDFNet.Initialize();
PDFNet.AddResourceSearchPath("relative/path/to/Lib/");
if (!CADModule.IsModuleAvailable())
{
    Console.WriteLine("Apryse SDK CAD module not available.");
}
```

{% endcode %}
{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
PDFNet::Initialize();
PDFNet::AddResourceSearchPath("relative/path/to/Lib/");
if(!CADModule::IsModuleAvailable())
{
  cout << "Apryse SDK CAD module not available." << endl;
}
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
PDFNet.initialize();
// use a try-catch block here to catch PDFNetException
PDFNet.addResourceSearchPath("relative/path/to/Lib/");
if(!CADModule.isModuleAvailable())
{
  System.out.println("Apryse SDK CAD module not available.");
}
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
const main = async () => {
  // use a try-catch block here to catch PDFNetException
  PDFNet.addResourceSearchPath("relative/path/to/Lib/");
  if (!(await PDFNet.CADModule.isModuleAvailable())) 
  {
    console.log("Apryse SDK CAD module not available.");
  }
}
PDFNet.runWithCleanup(main).then(function(){ PDFNet.shutdown(); });
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
PDFNet.initialize()
// use a try-catch block here to catch PDFNetException
PDFNet.addResourceSearchPath("relative/path/to/Lib/")
if(!CADModule.isModuleAvailable())
{
  println("Apryse SDK CAD module not available.")
}
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
[PTPDFNet Initialize];
[PTPDFNet AddResourceSearchPath:@"relative/path/to/Lib/"];
if (![PTCADModule IsModuleAvailable])
{
  printf("Apryse SDK CAD module not available.");
}
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
PTPDFNet.initialize()
PTPDFNet.addResourceSearchPath("relative/path/to/Lib/")
if (!PTCADModule.isModuleAvailable())
{
  print("Apryse SDK CAD module not available.")
}
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code lineNumbers="true" %}

```php
PDFNet::Initialize();
PDFNet::GetSystemFontList();    // Wait for fonts to be loaded if they haven't already. This is done because PHP can run into errors when shutting down if font loading is still in progress.
PDFNet::AddResourceSearchPath("../../../Lib/");
if(!CADModule::IsModuleAvailable()) {
  echo "Unable to run CAD2PDFTest: Apryse SDK CAD module not available.";
}
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
PDFNet.Initialize()
PDFNet.AddResourceSearchPath("../../../PDFNetC/Lib/")
if not CADModule.IsModuleAvailable():
    print("""
    Unable to run CAD2PDFTest: Apryse SDK CAD module not available.
    """)
```

{% endcode %}
{% endtab %}

{% tab title="Ruby" %}
{% code lineNumbers="true" %}

```ruby
PDFNet.Initialize
PDFNet.AddResourceSearchPath("../../../PDFNetC/Lib/");

begin  
  if !CADModule.IsModuleAvailable
    puts 'Unable to run CAD2PDFTest: Apryse SDK CAD module not available.'
  end
end
```

{% endcode %}
{% endtab %}

{% tab title="VB" %}
{% code lineNumbers="true" %}

```vb
PDFNet.Initialize()
PDFNet.AddResourceSearchPath("relative/path/to/Lib/")
If Not CADModule.IsModuleAvailable() Then
    Console.WriteLine("Apryse SDK CAD module not available.")
End If
```

{% endcode %}
{% endtab %}

{% tab title="Go" %}
{% code lineNumbers="true" %}

```go
PDFNetInitialize()
PDFNetAddResourceSearchPath("relative/path/to/Lib/")
if ! CADModuleIsModuleAvailable()
{
  fmt.Println("Apryse SDK CAD module not available.\n")
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

If the module has been successfully added, you can use the [`Convert.FromCAD`](https://sdk.apryse.com/api/PDFTronSDK/cpp/classpdftron_1_1_p_d_f_1_1_convert.html#a800084eb798b11f6690bcef5cb7016e0) method. This method requires that you pass in a [`PDFDoc`](https://sdk.apryse.com/api/PDFTronSDK/cpp/classpdftron_1_1_p_d_f_1_1_p_d_f_doc.html) object that will **append** converted pages to the specified PDF document.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
using (PDFDoc doc = new PDFDoc()){
    pdftron.PDF.Convert.FromCAD(doc, input_file_path + intput_file_name, null);
    doc.Save(output_file_path + output_file_name, SDFDoc.SaveOptions.e_remove_unused);
}
```

{% endcode %}
{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
PDFDoc doc;
Convert::FromCAD(doc, input_file_path + input_file_name, NULL);
doc.Save(output_file_path + output_file_name, SDF::SDFDoc::e_linearized, NULL);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
PDFDoc doc = new PDFDoc();
Convert.fromCAD(doc, input_file_path + input_file_name, null);
doc.save(output_file_path + output_file_name, SDFDoc.SaveMode.LINEARIZED, null);
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
async function main() {
  const doc = await PDFNet.PDFDoc.create();
  await PDFNet.Convert.fromCAD(doc, input_file_path + input_file_name);
  await doc.save(output_file_path + output_file_name, PDFNet.SDFDoc.SaveOptions.e_linearized);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
val doc = PDFDoc()
Convert.fromCAD(doc, input_file_path + input_file_name, null)
doc.save(output_file_path + output_file_name, SDFDoc.SaveMode.LINEARIZED, null);
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
PTPDFDoc* doc = [[PTPDFDoc alloc] initWithFilepath:filename];
[PTConvert FromCAD:doc in_filename:input_file_name opts:nil];
[doc SaveToFile: [output_file_path stringByAppendingPathComponent: @output_file_name] flags: e_ptlinearized];
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
let doc: PTPDFDoc = PTPDFDoc()
PTConvert.fromCAD(doc, in_filename: filename)
doc.save(toFile: output_filename, flags: e_ptlinearized)
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code lineNumbers="true" %}

```php
$doc = new PDFDoc();
Convert::FromCAD($doc, $input_file_path.$filename);
$doc->Save($output_path.$output_file_name, 0);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
doc = PDFDoc()
Convert.FromCAD(doc, input_path + inputFileName, None)
doc.Save(output_path + outputFileName, 0)
```

{% endcode %}
{% endtab %}

{% tab title="Ruby" %}
{% code lineNumbers="true" %}

```ruby
doc = PDFDoc.new
Convert.FromCAD(doc, input_path + inputFileName)
doc.Save(output_path + outputFileName, 0)
```

{% endcode %}
{% endtab %}

{% tab title="VB" %}
{% code lineNumbers="true" %}

```vb
Dim doc As PDFDoc = New PDFDoc()
pdftron.PDF.Convert.FromCAD(doc, input_path & input_file_name, Nothing)
doc.Save(output_path & output_file_name, SDFDoc.SaveOptions.e_remove_unused)
```

{% endcode %}
{% endtab %}

{% tab title="Go" %}
{% code lineNumbers="true" %}

```go
doc := NewPDFDoc()
ConvertFromCAD(doc, inputPath + inputFileName)
doc.Save(output_file_path + output_file_name, uint(SDFDocE_linearized))
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Conversion options

You can also optionally provide a `CADConvertOptions` as an argument to change the `PageHeight` and `PageWidth` attributes for the conversion of the CAD document. If your document is of the RVT format, you can also set the `RasterDPI` and `Sheets` attributes to control the rasterization resolution and list of sheets to be converted (RVT beta support currently only available on Windows). You must call the `AddSheets` method multiple times depending on the number of sheets you would like to add.

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
CADConvertOptions opts = new CADConvertOptions();
opts.SetPageWidth(800);
opts.SetPageHeight(600);

// RVT documents only:
opts.SetRasterDPI(150);
opts.AddSheets("sheet_id1");

pdftron.PDF.Convert.FromCAD(doc, input_file_path + input_file_name, opts);
```

{% endcode %}
{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
CADConvertOptions opts;
opts.SetPageWidth(800);
opts.SetPageHeight(600);

// RVT documents only:
opts.SetRasterDPI(150);
opts.AddSheets("sheet_id1");

Convert::FromCAD(doc, input_file_path + input_file_name, &opts);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
CADConvertOptions opts = new CADConvertOptions();
opts.setPageHeight(800);
opts.setPageWidth(300);

// RVT documents only:
opts.setRasterDPI(150);
opts.addSheets("sheet_id1");

Convert.fromCAD(doc, input_file_path + input_file_name, opts);
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
async function main() {
  const opts = new PDFNet.Convert.CADConvertOptions();
  opts.setPageHeight(800);
  opts.setPageWidth(300);

  // RVT documents only:
  opts.setRasterDPI(150);
  opts.addSheets("sheet_id1");

  await PDFNet.Convert.fromCAD(doc, input_file_path + input_file_name, opts);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
val opts = CADConvertOptions()
opts.setPageHeight(800)
opts.setPageWidth(300)

// RVT documents only:
opts.setRasterDPI(150);
opts.addSheets("sheet_id1")

Convert.fromCAD(doc, input_file_path + input_file_name, opts)
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
SWIGTYPE_p_CADConvertOptions * opts = [SWIGTYPE_p_CADConvertOptions alloc];
[opts setPageHeight:800]
[opts setPageWidth:300]

// RVT documents only:
[opts setRasterDPI:150]
[opts addSheets:"sheet_id1"]

[PTConvert FromCAD:doc in_filename:input_file_name opts:opts];
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
opts : SWIGTYPE_p_CADConvertOptions = SWIGTYPE_p_CADConvertOptions();
opts.setPageHeight(800)
opts.setPageWidth(300)

// RVT documents only:
opts.setRasterDPI(150)
opts.addSheets("sheet_id1")

PTConvert.fromCAD(doc, in_filename: filename, opts: opts)
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code lineNumbers="true" %}

```php
$opts = new CADConvertOptions();
$opts.SetPageWidth(800);
$opts.SetPageHeight(600);

// RVT documents only:
$opts.SetRasterDPI(150)
$opts.AddSheets("sheet_id1")

Convert::FromCAD($doc, $input_file_path.$filename, $opts);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
opts = CADConvertOptions()
opts.SetPageWidth(800)
opts.SetPageHeight(600)

# RVT documents only:
opts.SetRasterDPI(150)
opts.AddSheets("sheet_id1")

Convert.FromCAD(doc, input_path + inputFileName, opts)
```

{% endcode %}
{% endtab %}

{% tab title="Ruby" %}
{% code lineNumbers="true" %}

```ruby
opts = CADConvertOptions.new
opts.SetPageWidth(800)
opts.SetPageHeight(600)

# RVT documents only:
opts.SetRasterDPI(150)
opts.AddSheets("sheet_id1")

Convert.FromCAD(doc, input_path + inputFileName, opts)
```

{% endcode %}
{% endtab %}

{% tab title="VB" %}
{% code lineNumbers="true" %}

```vb
Dim opts As CADConvertOptions = New CADConvertOptions()
opts.SetPageWidth(800)
opts.SetPageHeight(600)

' RVT documents only:
opts.SetRasterDPI(150)
opts.AddSheets("sheet_id1")

pdftron.PDF.Convert.FromCAD(doc, input_path & input_file_name, opts)
```

{% endcode %}
{% endtab %}

{% tab title="Go" %}
{% code lineNumbers="true" %}

```go
opts := NewCADConvertOptions()
opts.SetPageWidth(800)
opts.SetPageHeight(600)

// RVT documents only:
opts.SetRasterDPI(150)
opts.AddSheets("sheet_id1")

ConvertFromCAD(doc, inputPath + inputFileName, opts)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Layers

By default, layers present in the original CAD drawing will be preserved as [Optional Content Groups (OCGs)](/core/layer-ocg/layers.md) in the PDF. OCGs can be extracted, edited, manipulated, and removed with Apryse SDK. They can also be rendered into a viewer where users can interact with them.

## Sample

The CAD Module ships with the [CAD2PDFTest sample](/core/get-started/samples/cad2pdftest.md) which can be used to test the conversion functionality using provided test files or your own documents. The sample first initializes PDFNet, which is required for all Apryse SDK functionality, then uses `PDFNet.AddResourceSearchPath` to include the CAD Module. The same lines of code can be used to integrate the module in your application or project. Code sample is available in C++, C#, Java, Python, Go, PHP, Ruby & VB.

The CAD2PDFTest sample also shows how to check if a file is of RVT file format and uses CADConvertOptions to convert to PDF (currently only supported on Windows).

## Troubleshooting

### Fonts

For best results, the CAD Module requires access to the fonts (SHX, RSC and TTF) used in the drawing. If the requisite fonts are not embedded in the drawing and not installed on your server, the CAD Module will use its own bundled fonts (located in the in `fonts/` folder within the CAD module package) as substitutes for the originals. The specifics of the substitution mappings are defined in a file called `substitution.json` (which is also located in the `fonts/` folder). If necessary, this file can be customized to define different font mappings or add new mappings. The JSON has following entries:

* fontFileMappings:
  * This is where direct substitutions based on font file name are specified.
  * For each font you want to replace, you can define multiple fonts in list form. CAD Module searches fonts one by one from the beginning of the list and choose the first font that is found.
* fallbackFonts:
  * This is where fallback fonts are defined.
  * Fallback fonts for monospaced and proportional font are defined separately.
  * You can define/customize fallback fonts for each language as needed; default ones are used otherwise.

An alternative way of performing direct substitutions for a font is to provide a font file and name it as "\<target\_font\_name>`_fallback`.\[ttf | ttc |otf]". For example, if you want to map `iso8.shx` to a TTF font, then name your TTF file to `iso8_fallback.ttf` and place it in the location discoverable by the CAD Module (you can use `PDFNet.AddResourceSearchPath()` to specify the location of the font). Note that the fallback font name must be in lowercase. This method takes priority over the JSON file method.

#### Fonts for DGN when resource files (.rsc) are not present

There are times when a DGN CAD file uses fonts that are packaged in resource files (.rsc), but these files are not available where the DGN file is loaded from.

Without the .rsc files present alongside the .dgn, there is no way to get the equivalent font data for the fonts used in the DGN file which are specified using font ID numbers. Font ID numbers may be different from the known standard ones which can be mapped internally to known font names. In this case, the DGN may, in some cases, have font names provided as hints. We can map these names to TrueType font file names.

For example, to map the names Arial, Arial Narrow, and Arial Bold, you can add the following lines to the `substitutions.json` in the `fontFileMappings` section:

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
"arial.shx": [ "arial.ttf" ],
"Arial Narrow.shx": [ "arialn.ttf" ],
"Arial Bold.shx": [ "arialb.ttf" ]
```

{% endcode %}
{% endtab %}
{% endtabs %}

You can then copy, or make available, the corresponding files (e.g. `arial``n``.ttf`, `arial``b``.ttf`, and `arial.ttf`) under the `fonts` folder which is in the module binary’s folder, in the same location where the `.DGN` file is located. Alternatively, you can use `PDFNet.AddResourceSearchPath()` to specify the location of the files.

### OpenGL

On Linux CADModule uses OpenGL API for rendering 3D objects. In a headless server environment (i.e., without monitors/graphical drivers) implementation of OpenGL specification needs to be provided. One such implementation is [Mesa](https://www.mesa3d.org/). On headless Linux you may need to install `libgl1-mesa-dev`, `libx11-dev` and `libglu1-mesa-dev`.

## Custom Plot Styles

The CAD module supports optionally applying some style changes when converting a CAD file to PDF.

This section describes the format for the the `Plot-styles` JSON object which can be provided by the user to specify custom plot styles when converting a CAD drawing to PDF.

### Plot styles JSON location

To provide plot style changes/override, a `Plot-styles` JSON object can be authored and saved in a `.json` file. The CAD module tries to load the settings for plot styles from the following locations:

* The CAD file folder
* The CAD Module binary's folder
* The current working directory of the process

The name of the plot style settings JSON file would be:

* `cadstyledwg.json` for DWG files.
* `cadstyledgn.json` for DGN files.
* `cadstyle.json` if neither of the above are found.

### Example of Plot-styles object in JSON

The following is a sample of using the plot-styles object.

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
"Plot-styles": { // The plot styles object. If missing, no plot styles will be applied.
	"Named-styles": { // We can have either the Named-styles object or Direct-overrides object (see below). Priority is for Direct-overrides if both are present.
		"Input-stb-file": "C:/Temp/test.stb", // Pathname of an .stb file (AutoCAD styles table.). If present will try to load and apply styles from this file. It takes priority over the Styles object below.
		"Styles": { // List of named styles. Named styles can be used together with Layer-to-style-map below to assign a style by name to layers.
			"Normal": { // A style name
				"ColorRGBVal": "00FF2702", // A Hex color value. “AARRGGBB” - can also be “RRGGBB”
				"LineWeightIndex": 0 // An index into the Lineweights table (see below). The index value can range between 0 and 23 even if the Lineweights table below does not override all 24 entries.

			 }, 
			"New Level Style": { // Another named style
				"ColorRGBVal": "00FFFF00",
				"LineWeightIndex": 23,
				"LineType": "dashed", // See list of accepted line types below
				"LineEndType": "bevel", // See list of accepted line end types below
				"LineJoinType": "miter", // See list of accepted line join types below
				"FillType": "solid", // See list of accepted fill types below
			},
			"New Level-1 Style": { // Another named style
				"ColorRGBVal": "00FF00FF",
				"LineWeightIndex": 3,
				"LineType": "iso-dash",
				"LineEndType": "bevel",
				"LineJoinType": "miter"
			},
			"New Level-2 Style": {
			}
		},


		"Lineweights": { // Default line weights override table
			"0": { "mm": 1.5 }, // Override default value at index 0 with 1.5 millimeters
			"3": { "in": 0.05 }, // Override default value at index 3 with 0.05 inches
			"23": { "mm": 12.0 }
		},


		"Layer-to-style-map": { // Map of layer names to style names to set on layers
			"0": "Normal", // Sets the style called Normal on the layer named 0
			"Default": "Normal", // Sets the style called Normal on the layer named Default
			"New Level": "New Level Style", // Sets the style called New Level Style on the layer named New Level
			"New Level-1": "New Level-2 Style"
		}
	}, // End of Named-styles object

	"Direct-overrides": { // Direct-overrides object, when present, takes priority
	                      // over the Named-styles section (see above). This approach
	                      // works differently from the styles approach above. Here we
	                      // specify attributes that correspond to the standard indices
	                      // for line weight tables and color tables and change the default
	                      // values for those indices. We then iterate all the layers and
	                      // objects in a CAD drawing and for each layer or object that has
	                      // for its line weight or color index one of the indices we
		"Lineweights": { // Overridable line weight indices for DWG range from 0 to 23
			"0": { "mm": 1.5 },
			"3": { "mm": 0.5 },
			"23": { "mm": 2.0 }
		},
		"Colors": { // Overridable color indices for DWG range from 1 to 255
			"2": "FFFF00",
			"5": "270200",
			"7": "2702FF"
		},
		"fordgn": { // The same as above. but these apply to DGN CAD files
			"Lineweights": { // Overridable line weight indices for DGN range from 0 to 31
				"1": { "mm": 2.5 },
				"31": { "in": 0.01 },
				"0": 2.0 // No unit specified means value is mm
			},
			"Colors": { // Overridable color indices for DGN range from 0 to 255
				"1": "FF2702",
				"3": "00FF00",
				"0": "FF00FF"
			}
		}
	} // End of Direct-overrides object
} // End of Plot-styles object
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Accepted values for `LineType` entry

Acceptable values for the `LineType` entry from the example above include:

"solid", "dashed", "dotted", "dash-dot", "short-dash", "medium-dash", "long-dash", "short-dash-x2", "medium-dash-x2", "long-dash-x2", "medium-long-dash", "medium-dash-short-dash-short-dash", "long-dash-short-dash", "long-dash-dot-dot", "long-dash-dot", "medium-dash-short-dash-dot", "sparse-dot", "iso-dash", "iso-dash-space", "iso-long-dash-dot", "iso-long-dash-double-dot", "iso-long-dash-triple-dot", "iso-dot", "iso-long-dash-short-dash", "iso-long-dash-double-short-dash", "iso-dash-dot", "iso-double-dash-dot", "iso-dash-double-dot", "iso-double-dash-double-dot", "iso-dash-triple-dot", "iso-double-dash-triple-dot"

#### Accepted values for `LineEndType` entry

Acceptable values for the `LineEndType` entry from the example above include:

"butt", "square", "round", "diamond"

#### Accepted values for `LineJoinType` entry

Acceptable values for the `LineJoinType` entry from the example above include:

"miter", "bevel", "round", "diamond"

#### Accepted values for `FillType` entry

Acceptable values for the `FillType` entry from the example above include:

"solid", "checkerboard", "crosshatch", "diamonds", "horizontal-bars", "slant-left", "slant-right", "square-dots", "vertical-bars"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/core/conversion/convert-cad-to-pdf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
