Welcome to scConverter
scConverter is a powerful component for converting plot files (PLT, HPGL, HPGL/2 and Calcomp), PDF, CGM, DWF, TIFF, PNG, JPEG, CALS and BMP files to PDF, DXF, DWF, TIF and many other formats.
You may use scConverter in any development environment that can use COM components, e.g.: Visual Basic, Visual C++, C#, ASP, ASPX, NET, Delphi and more.
The component can be used in environments not
supporting COM as the DLL does export functions that can be called directly. This makes it easy to use the DLL even in a Java application. If you choose to use the exported functions directly you do not have to register the DLL.
This document describes each method, property and event available in this component.
Add a Gerber layer to the control for conversion. Use this method to convert multiple layers to a single image file. When all layers are added you may use either ConvertGerberLayersToImage or ConvertGerberLayersToImageEx methods to create an image based on all layers.
Syntax | HRESULT AddGerberLayer( BSTR InputFile, OLE_COLOR Color, LONG Flags); | |
Parameters | InputFile | Name of Gerber file to add as layer. |
Color | Color to use for this Gerber layer during conversion. | |
  | Flags | Reserved for future use(set to 0). |
Returns | HRESULT | Returns S_OK if file is added successfully. Any other value indicates an error, see GetLastError for more information. |
Add markup data to a file already opened by OpenFileEx.
Syntax | HRESULT AddMarkupEx( long Handle, BSTR Markup ); | |
Parameters | Handle | Handle to file returned by OpenFileEx. |
Markup | This may either be a filename that contains markup data, or it may be string containing markup XML data. | |
Returns | HRESULT | This function returns S_OK if successful. |
Check if the given file can be opened by the converter.
Syntax | HRESULT CheckFile(BSTR InputFile, long *Format); | |
Parameters | InputFile | Name of the file to check. |
Format | Returned file format identifier if file can be opened by this converter. One of the following values is returned:
|
|
Returns | HRESULT | Returns S_OK if this file can be opened by the converter. |
Unload all added Gerber layers from the memory.
Syntax | HRESULT ClearGerberLayers(); | |
Parameters | None | |
Returns | HRESULT | Returns S_OK if successful. Any other value indicates an error, see GetLastError for more information. |
Close a file previously opened by OpenFileEx.
Syntax | HRESULT CloseFileEx(LONG Handle); | |
Parameters | Handle | Handle for the file to close. |
Returns | HRESULT | This function returns S_OK if successful. |
Convert the input file to a new file using the given format.
Syntax | HRESULT Convert(BSTR inputFileName, BSTR outputFileName, BSTR Format, double Scale, long BitsPixel, long DPI); | |
Parameters | inputFileName | Name of file to convert. |
outputFileName | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported:
|
  | Scale | Scale factor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert a single page, or all pages, from the input file into a new file using the given format.
Syntax | HRESULT ConvertFileEx( LONG Handle, BSTR outputFileName, BSTR Format, long Page, double Scale, long BitsPixel, long DPI); | |
Parameters | inputFileName | Name of file to convert. |
Handle | Handle returned by OpenFileEx. | |
  | Format | Select output format to use. Please see the Convert method for a list of supported formats. |
  | Page | Index of the page to extract from the input file, and convert to a new output file. First page number is 0 (zero indexed). Set to -1 to convert all pages in the document. |
  | Scale | Scale factor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert all loaded Gerber layers to a new image file of the given file format.
To be able to use this method one or more Gerber files must have previously been added as layers using the AddGerberLayer method.
Use the BackgroundColor property to change the image background color.
The image width and height will automatically be calculated based on the input file and given scale factor.
Syntax | HRESULT ConvertGerberLayersToImage( BSTR OutputFile, BSTR Format, DOUBLE ScaleFactor, LONG BitsPerPixel, LONG DPI, LONG Flags, double *ImageW, double *ImageH ); | |
OutputFile | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported by this method:
|
  | ScaleFactor | Scalefactor to use for conversion, 1.0 is original size. |
  | lBitsPixel | Bits Per Pixel. |
  | DPI | Pixels per Inch. |
  | Flags | Reserved (set to 0). |
  | ImageW | Returns the width of the created image in millimeters. |
  | ImageH | Returns the height of the created image in millimeters. |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert all loaded Gerber layers to a new image. To be able to use this method you will need to add one or more Gerber layers using the AddGerberLayer method.
Use the BackgroundColor property to change the image background color.
The image width and height will automatically be calculated based on the input files and given scale factor.
Syntax | HRESULT ConvertGerberLayersToImageEx( DOUBLE ScaleFactor, LONG BitsPerPixel, LONG DPI, LONG Flags, IPictureDisp** Picture); | |
  | ScaleFactor | Scalefactor to use for conversion, 1.0 is original size. |
  | lBitsPixel | Bits per pixel. Supported values include 1, 4, 8 and 24. |
  | DPI | Pixels per Inch. This will controls the resolution of the image, a high value gives better quality but consumes more memory. |
  | Flags | Reserved (set to 0). |
Picture | The returned image (IDispatch) | |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert the input file together with markup data to a new file using the given format.
Syntax | HRESULT ConvertMarkup(BSTR InputFileName, BSTR Markup, BSTR OutputFileName, BSTR Format, double Scale, long BitsPerPixel, long DPI ); | |
Parameters | inputFileName | Name of file to convert. |
Markup | This may either be a filename that contains markup data, or it may be string containing markup XML data. | |
OutputFileName | Name of destination file. | |
  | Format | Select output format to use. Please see the Convert method for a list of supported formats. |
  | Scale | Scale factor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert a single page from the input file into a new file using the given format.
Syntax | HRESULT ConvertPage(BSTR inputFileName, BSTR outputFileName, BSTR Format, long Page, double Scale, long BitsPixel, long DPI); | |
Parameters | inputFileName | Name of file to convert. |
outputFileName | Name of destination file. | |
  | Format | Select output format to use. Please see the Convert method for a list of supported formats. |
  | Page | Index of the page to extract from the input file, and convert to a new output file. First page number is 0 (zero indexed). |
  | Scale | Scalefactor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert a single page from the input file into a memory image.
Syntax | HRESULT ConvertPageToImage(BSTR inputFileName, long Page, double Scale, long BitsPixel, long DPI, IPictureDisp** Picture); | |
Parameters | inputFileName | Name of file to convert. |
  | Page | Index of the page to convert into an image. First page number is 0 (zero indexed). |
  | Scale | Scalefactor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Picture | The returned image (IDispatch) | |
Returns | HRESULT | Returns S_OK if the image was created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert a single page from an already loaded file into a memory image.
Syntax | HRESULT ConvertPageToImage(LONG Handle, long Page, double Scale, long BitsPixel, long DPI, IPictureDisp** Picture); | |
Parameters | Handle | File handle returned by OpenFileEx. |
  | Page | Index of the page to convert into an image. First page number is 0 (zero indexed). |
  | Scale | Scalefactor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Picture | The returned image (IDispatch) | |
Returns | HRESULT | Returns S_OK if the image was created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert the input file to a new image file of the given file format.
This method gives better control of the created image that can be very useful for Gerber to image conversion.
Syntax | HRESULT ConvertToImageFile( BSTR InputFile, BSTR OutputFile, BSTR Format, LONG Page, DOUBLE ScaleFactor, LONG ImageWidth, LONG ImageHeight, LONG BitsPerPixel, LONG DPI, LONG Flags, DOUBLE OffsetX, DOUBLE OffsetY ); | |
Parameters | InputFile | Name of file to convert. |
OutputFile | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported by this method:
|
  | Page | Page number to convert to image. |
  | ScaleFactor | Scalefactor to use for conversion, 1.0 is original size. |
  | ImageWidth | Width of the destination image file in pixels. |
  | ImageHeight | Height of the destination image file in pixels. |
  | lBitsPixel | Bits Per Pixel. |
  | DPI | Pixels per Inch. |
  | Flags |
Following flag bits are supported: 1. The original Gerber offsets will be used during conversion. 2. The output file will be scaled to fit the given output size. |
  | OffsetX | Left offset in pixels. |
  | OffsetY | Top offset in pixels. |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert the input file to a new file using the given format and selected paper size.
Syntax | ConvertToPaperSize(BSTR InputFile, BSTR OutputFile, BSTR Format, LONG PaperSizeIndex, BOOL KeepPaper, LONG Page, LONG BitsPerPixel, LONG DPI); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters | inputFileName | Name of file to convert. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outputFileName | Name of destination file. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | Format | Select output format to use. Please see the Convert method for a list of supported formats. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | PaperSizeIndex | The index of the predefined paper size to use for conversion. The output file will be scaled to fit the selected paper size. The following paper sizes are supported:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | KeepPaper | If enabled margins will be added if necessary, to make sure the output uses the exact paper size. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | Page | Page number to convert. Page numbering starts at 0. Set this parameter to -1 convert all pages in a multi-page document. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | BitsPixel | Bits Per Pixel (Used for raster output only). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  | DPI | Pixels per Inch (Used for raster output only). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert the input file to a new file using the given format and selected paper size.
Syntax | HRESULT ConvertToPaperSizeEx(LONG Handle, BSTR OutputFile, BSTR Format, LONG PaperSizeIndex, VARIANT_BOOL KeepPaper, LONG Page, LONG BitsPerPixel, LONG DPI); | |
Parameters | Handle | Handle returned by OpenFileEx. |
This function is equal to ConvertToPaperSize, except for the handle parameter. Please see ConvertToPaperSize for a description of the other parameters. |
||
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Convert the input file into a PDF file.
Syntax | HRESULT ConvertToPDF(BSTR InputFileName, BSTR OutputFileName ); | |
Parameters | InputFileName | Name of file to convert. |
OutputFileName | Name of destination PDF file. | |
Returns | HRESULT | Returns S_OK if file is created successfully. Any other value indicates an error, see GetLastError for more information. |
Change settings that are needed to load RS-274D Gerber files correctly.
Syntax | HRESULT GerberFormatSettings(VARIANT_BOOL bIncremental, long lPreceding, long lSucceeding, long lUnits, VARIANT_BOOL bLeading, VARIANT_BOOL bTrailing); | |
Parameters | bIncremental | If true the Gerber files contains incremental coordinates. Set to false for absolute coordinates. |
lPreceding | Number of digits before decimal point. | |
lSucceeding | Number of digits after decimal point. | |
lUnits | Units used in Gerber file. Set to 0 for Inch and 1 for Milimeters. | |
bLeading | Leading zeros suppressed if set to true. | |
bTrailing | Trailing zeros suppressed if set to true. | |
Returns | long | This function returns S_OK if successful. |
Return dimensions of the given page in the given file.
All returned values are in millimeters.
Syntax | HRESULT GetFileDimensions( BSTR InputFile, long Page, double *OffsetX, double *OffsetY, double *Width, double *Height ); | |
Parameters | InputFile | Full path to the file to inspect. |
Page | Selected page number. | |
OffsetX | Original file x offset of the selected page. | |
OffsetY | Original file y offset of the selected page. | |
Width | Width of the selected page. | |
Height | Height of the selected page. | |
Returns | HRESULT | This function returns S_OK if successful. |
Return dimensions of the given page in the given file.
All returned values are in millimeters.
Syntax | HRESULT GetFileDimensionsEx( LONG Handle, LONG Page, double *OffsetX, double *OffsetY, double *Width, double *Height ); | |
Parameters | Handle | Handle returned by OpenFileEx. |
Page | Selected page number. | |
OffsetX | Original file x offset of the selected page. | |
OffsetY | Original file y offset of the selected page. | |
Width | Width of the selected page. | |
Height | Height of the selected page. | |
Returns | HRESULT | This function returns S_OK if successful. |
Return dimensions, bits per pixel and resolution of selected page in an already opened file.
Syntax | HRESULT GetFileRasterInfoEx(LONG Handle, LONG Page, LONG *Width, LONG *Height, LONG *BitsPerPixel, LONG *DPI ); | |
Parameters | Handle | Handle returned by OpenFileEx. |
Page | Selected page number. | |
Width | Width of raster page in pixels. | |
Height | Height of raster page in pixels. | |
BitsPerPixel | Returned bits per pixel used for selected page. | |
DPI | Returned resolution for selected page. | |
Returns | HRESULT | This function returns S_OK if successful. |
Return format identifier for given file handle.
Syntax | HRESULT GetFormatEx( LONG Handle, LONG *Format); | |
Parameters | Handle | Handle for which format identifier should be returned. The handle must be previously returned by OpenFileEx |
Format | Returned file format identifier. One of the following values is returned:
|
|
Returns | HRESULT | Returns S_OK if no error occured. |
Returns the number of pages in the given file.
Syntax | HRESULT GetFileDimensions( BSTR InputFile, long *Pages); | |
Parameters | InputFile | Full path to the file to inspect. |
Pages | Returns number of pages in the given file. | |
Returns | HRESULT | This function returns S_OK if successful. |
Returns the number of pages in the given file.
Syntax | HRESULT GetFileDimensionsEx( LONG Handle, long *Pages); | |
Parameters | Handle | Handle returned by OpenFileEx. |
Pages | Returns number of pages in the given file. | |
Returns | HRESULT | This function returns S_OK if successful. |
Returns a thumbnail image for the given page and file handle.
You may alos take a look at the C# scPDFMerge sample too see how this method is used.
Syntax | LONG GetPageThumbnailEx(LONG Handle, LONG Page, LONG Width, LONG Height, LONG BitsPerPixel, IPictureDisp** Thumbnail); | |
Parameters | Handle | Handle to file returned by OpenFileEx |
Page | Page number to create a thumbnail of (first page is index 0) | |
Width | Width of thumbnail image in pixels | |
Height | Height of thumbnail image in pixels | |
BitsPerPixel | The bits per pixel controls number of colors to use in the thumbnail image. Set this value to 1 for a monochrome (black & white) image, or 24 for a true color image. | |
Thumbnail | The returned image (IDispatch) | |
Returns | long | TRUE if success. |
Return width, color and style for the given pen table entry.
Please see the SetPenTableEntry method for descritpion of the returned values.
Syntax | HRESULT GetPenTableEntry(long Pen, double Width, long Color, long LineStyle, long EndStyle); | |
Parameters | Pen | Pen number. |
  | Width | Returned pen width. |
  | Color | Returned pen color. |
  | LineStyle | Returned pen linestyle. |
  | EndStyle | Returned pen endstyle. |
Returns | HRESULT | This function returns S_OK if successful. |
Load a ViewCompanion compatible pen table file.
Syntax | HRESULT LoadPenTable(BSTR pFileName); | |
Parameters | FileName | Name of pentable file to load. |
Returns | HRESULT | This function returns S_OK if successful. |
Open a file and keep it open for as long as needed.
This method will return a handle that may be uses by other methods to perform different tasks.
When you've done with the file it should be closed by using the CloseFileEx method.
Syntax | HRESULT OpenFileEx(BSTR FileName, LONG* Handle); | |
Parameters | FileName | Full name of file to open. |
  | Handle | Returned file handle. |
Returns | HRESULT | This function returns S_OK if successful. |
Conform, or convert, an existing PDF file to selected PDF/A standard.
Syntax | HRESULT PDFConform( BSTR InputFile, SC_PDF_CONFORM ConformType, BSTR OutputFile, BSTR *Errors); | |
Parameters | InputFile | The original PDF file you want to create a conformed copy of. |
  | ConformType | Selected PDF/A standard. The following values are available:
|
  | OutputFile | The conformed PDF file. |
  | Errors | Some PDF files cannot be converted to PDF/A standard, in this case any error message will be returned in this parameter. |
Returns | HRESULT | This function returns S_OK on success. |
Encrypt a PDF file using password(s) and restriction settings.
Syntax | HRESULT PDFEncrypt(BSTR OriginalFile, BSTR EncryptedFile, BSTR OpenPassword, BSTR OwnerPassword, LONG Restrictions); | |
Parameters | OriginalFile | The original PDF file you want to create an encrypted copy of. |
  | EncryptedFile | The encrypted PDF file. This will be an exact copy of the orignal file but encrypted. |
  | OpenPassword | Optional password required to open the file. |
  | OwnerPassword | Optional owner password. |
  | Restrictions | Set optional user restrictions for the encrypted PDF file. The following values are available:
|
Returns | HRESULT | This function returns S_OK on success. |
Add a PDF file to the currently merged PDF file.
All pages from the given PDF file will be added to the merged output file.
PDFMergeInit must be called before any PDF file is added.
Syntax | HRESULT PDFMergeAddFile(BSTR PDFFileName); | |
Parameters | PDFFileName | Full path name to the PDF file to add to the currently merged PDF. |
Returns | HRESULT | Returns S_OK if successful. Any other value indicates an error, see GetLastError for more information. |
Add a PDF file to the currently merged PDF file.
The PageInformation parameter controls which pages from the given PDF file that will be added to the merged output file.
PDFMergeInit must be called before any PDF file is added.
Syntax | HRESULT PDFMergeAddFile(BSTR PDFFileName, BSTR PageInformation); | |
Parameters | PDFFileName | Full path name to the PDF file to add to the currently merged PDF. |
PageInformation | Control which pages that should be imported from the given PDF file. Use ";" to separate pages, e.g.: setting PageInformation to "1,2,10,11" will import pages 1,2,10 and 11 and add to the merged PDF file. | |
Returns | HRESULT | Returns S_OK if successful. Any other value indicates an error, see GetLastError for more information. |
Close the currently merged PDF file and output to given file name.
Syntax | HRESULT PDFMergeClose(BSTR PDFOutputName); | |
Parameters | PDFOutputName | Full path name of the new PDF file to create. |
Returns | HRESULT | Returns S_OK if successful. Any other value indicates an error, see GetLastError for more information. |
Start a new empty PDF file prepared for merging.
Use PDFMergeAddFile to add files, and finally call PDFMergeClose to complete the merge.
Syntax | HRESULT PDFMergeInit(); | |
Parameters | None | |
Returns | HRESULT | Returns S_OK if successful. Any other value indicates an error, see GetLastError for more information. |
Optimize a PDF file for faster loading and rendering. The optimize process will rescale images and rebuild the structure of the input file. The function rebuilds the content streams of all pages, templates and, annotations. Useless operators as well as errors in content streams will be removed. The resulting content streams are error free and usually smaller. How much the optimization takes effect depends on the quality of the original content streams.
Syntax | HRESULT longPDFOptimize(BSTR InputFile, BSTR OutputFile, long MonoDPI, long ColorDPI, long MonoCompression, long lColorCompression); | |
Parameters | InputFile | The original PDF file you want optimize. |
OutputFile | The optimized PDF file. | |
MonoDPI | Resolution to use for monochrome images in output file. Any image larger than the set resolution will be rescaled to fit this setting. | |
ColorDPI | Resolution to use for color images in output file. Any image larger than the set resolution will be rescaled to fit this setting. | |
  | MonoCompression | Set compression method to use for monochrome images: The following values are available:
|
  | ColorCompression | Set compression method to use for color images: The following values are available:
|
Returns | HRESULT | This function returns S_OK on success. |
Split a multi-page PDF file into smaller files based on user settings.
Syntax | HRESULT PDFSplit(BSTR InputFile, BSTR OutputFolder, BSTR FileLabel, LONG PagesPerFile); | |
Parameters | InputFile | The multi-page PDF file that will be split into smaller files. |
  | OutputFolder | A valid folder name for the output files. |
  | FileLabel | Optional label to add to output filenames. By default the output files will be named "inputfilename_1.pdf", "inputfilename_2.pdf" and so on. By adding "part" as label, the output files will be named "inputfilename__part_1.pdf", "inputfilename__part_2.pdf" and so on. |
  | PagesPerFile | Number of pages per output file. If the input document contains 20 pages and you set page per file to 1, the control will create 20 files. If you set pages per file to e.g. 2, the control will output 10 files with 2 pages each. |
Returns | HRESULT | This function returns S_OK on success. |
Convert a PDF file to an editable vector format file, for example Autodesk DXF.
Syntax | HRESULT PDFToCAD( BSTR InputFileName, BSTR OutputFileName, BSTR Format, long PageNo ); | |
Parameters | InputFileName | Name of the PDF file to convert. |
OutputFileName | Name of the exported vector file.. | |
Format |
Export format to use for conversion. Supported formats:
|
|
PageNo | PDF page that will converted to vector format. | |
  | OutputFileName | Name of the exported vector file. |
Returns | HRESULT | This function returns S_OK on successn. |
Saves the thumbnail for the given page and file handle to an image file.
Syntax | HRESULT SaveThumbnailEx(LONG Handle, LONG Page, LONG Width, LONG Height, LONG BitsPerPixel, BSTR Format, BSTR OutputFile); | |
Parameters | Handle | Handle to file returned by OpenFileEx |
Page | Page number to create a thumbnail of (first page is index 0) | |
Width | Width of thumbnail image in pixels | |
Height | Height of thumbnail image in pixels | |
BitsPerPixel | The bits per pixel controls number of colors to use in the thumbnail image. Set this value to 1 for a monochrome (black & white) image, or 24 for a true color image. | |
Format | The file format to use for the thumbnail image file. The following format identifiers are accepted:
|
|
OutputFile | Name of the thumbnail image file | |
HRESULT | long | S_OK if success. |
Add margins to the converted file.
Syntax | HRESULT SetMargins( VARIANT_BOOL AddMargins, DOUBLE Left, DOUBLE Top, DOUBLE Right, DOUBLE Bottom ); | |
Parameters | AddMargins | If TRUE margins will be added to the converted file. Set to FALSE to disable margins. |
  | Left | Set left margin in millimeters. |
  | Top | Set top margin in millimeters. |
  | Right | Set right margin in millimeters. |
  | Bottom | Set bottom margin in millimeters. |
Returns | HRESULT | This function returns S_OK on success. |
Use this function to unlock the component to use all it's functionality.
You will get your own this serialnumber when You purchase a developer license.
Syntax | HRESULT SetSerialNumber( BSTR SerialNumber); | |
Parameters | SerialNumber | Serial number to unlock control. |
Returns | HRESULT | This function returns S_OK if a correct serial number is given. |
Set width, color, linestyle and line endstyle for the given pen table entry.
Syntax | HRESULT SetPenTableEntry(long Pen, double Width, long Color, long LineStyle, long EndStyle); | |
Parameters | Pen | Pen number. |
  | Width | Pen Width in millimeters. |
  | crColor | Pen Color (Windows COLORREF). The color value has the following hexadecimal form: 0x00bbggrr. |
  | LineStyle | The following styles are supported:#define PS_SOLID 0 #define PS_DASH 1 /* ------- */ #define PS_DOT 2 /* ....... */ #define PS_DASHDOT 3 /* _._._._ */ #define PS_DASHDOTDOT 4 /* _.._.._ */ |
  | EndStyle | The following line end styles are supported:
|
Returns | HRESULT | This function returns S_OK on success. |
Set compression types to use for exported TIFF files.
Syntax | HRESULT SetTIFFCompression( LONG Monochrome, LONG Color, LONG TrueColor ); | |||||||||||||||
Parameters | Monochrome | Set compression type to use for monochrome, 1-bit, files. Supported values:
|
||||||||||||||
Color | Set compression type to use for color, 4-bit and 8-bit, files. Supported values:
|
|||||||||||||||
TrueColor | Set compression type to use for true color, 24-bit, files. Supported values:
|
|||||||||||||||
Returns | HRESULT | This function returns S_OK if success. |
Extract text from an already open document.
Syntax | HRESULT TextExtractEx(LONG Handle, LONG Page, BSTR *Text); | |
Parameters | Handle | Handle returned by OpenFileEx. |
  | Page | Page number to extract text from. First page is 0 (zero index). |
  | Text | Extracted text. |
Returns | HRESULT | This function returns S_OK if text was extracted from the document. |
Split a multi-page TIFF file into multiple single paged files (one per page).
Syntax | HRESULT TIFFSplit(BSTR InputFile, BSTR OutputFolder, BSTR FileLabel ); | |
Parameters | InputFile | The multi-page TIFF file that will be split into smaller files. |
  | OutputFolder | A valid folder name for the output files. |
  | FileLabel | Optional label to add to output filenames. By default the output files will be named "inputfilename_1.tif", "inputfilename_2.tif" and so on. By adding "part" as label, the output files will be named "inputfilename__part_1.tif", "inputfilename__part_2.tif" and so on. |
Returns | HRESULT | This function returns S_OK if success. |
BackgroundColor
Set the background color that will be used for the converted files. This property accepts a COLORREF (Windows RGB) value.
Default Value : 0x00FFFFFF (white)
DWFExporterDPI
Set resolution to use for exported DWF files.
Default Value : 1000
DWFLoadMarkup
If set to 1 (true) markup created by Autodesk Design Review will be loaded and included in the conversion.
Set to 0 to ignore markup created by Design Review.
Default Value : 1
DWFUsePaperSize
If set to 1 (true) all DWF files will be loaded using paper size if this is available, else the file will be loaded with drawing extents.
Default Value : 1
DXFForceLineLW
If set to non-zero all line elements will be written as LWPolyline instead of Line. This will increase file size, but makes it possible to write lines with width..
Default Value : 1
DXFIgnoreWhiteAreas
If set to non-zero, all filled white areas will be ignored when the DXF files is written. This may be useful if you're converting PDF files to DXF because white areas may give problems in AutoCAD.
Default Value : 0
DXFWriteMM
If enabled all DXF files be written using coordinates in millimeter. If disabled DXF files will use Inch coordinates.
Default Value : Depends on system regional settings
GerberApertureFileName
Set filename for an Gerber aperture table to be used when loading RS274D Gerber data.
Default Value : none
GetLastError
Retrieves the component's last-error code value.
Possible error codes:
ImportersPath
Set path to where the additional file importers are located.
MonochromeMode
Enable or disable monochrome export. If set to non-zero the converted files will only contain black and white graphics.
Default Value : 0
PDFHighPrecision
Enable or disable creation of high resolution PDF files. If set to non-zero, all coordinates will be written using 4 decimals to give higher accuracy. If this option is disabled 2 decimals will be used for coordinates. High resolution will increase file size.
Default Value : TRUE
PDFLargeFormat
Enables or disables creation of large format PDF files (up to 60x60 meters).
Default Value : TRUE
PDFLayers
Enable or disable creation of layered PDF files. If set to non-zero, pens will be mapped to PDF layers.
Default Value : 1
PDFMonoRasterCompression
Select the compression method to use for monochrome (1-bit) raster images in exported PDF files.
Following compression methods are available:
PDFSearchable
Enable or disable creation of searchable PDF files. If this option is enabled and the original file contains text, the converted PDF file will be searchable.
Default Value : FALSE
PDFTransparency
Enable or disable use of transparency in exported PDF files.Some printer drivers doesn't support transparency, and turning off transparency for exported PDF files may make your files print faster.
Default Value : TRUE
PDFWriterFormat
Select PDF standard to use for converted files, following options is available:
PLTEncoded
Enable or disable encoded polylines (PE instruction) in exported PLT (HPGL/2) files. Files with encoded polyline are smaller (compressed).
Default Value : 1 (Use encoded polygons)
TIFFSingleStrip
Enable or disable creation of single-strip TIFF files. By default the component will create multi-strip files.
Single-strip files are usually smaller (in terms of file size) than multi-strip files. A multi-strip file may however have some advantages (depends on application):
UsePenTable
Enable or disable the pen table settings. If set to non-zero the converted files be converted using the current pen table settings.
Pen tables are supported for PLT (HPGL, HPGL/2 and Calcomp), CGM and DWF file formats.
Default Value : 0