Check if the given file can be opened by the converter.
UNICODE | int scCheckFormat( WCHAR *InputFile, long *Format ); | |
ANSI | int scCheckFormatA( CHAR *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 | int | Error code, zero if success. If successfully checked the file format identifier will be returned using the Format parameter. Please see GetLastError for a description of possible error codes. |
Convert the input file to a new file using the selected output format.
UNICODE | int scConvertFile( WCHAR *SerialNumber, WCHAR *InputFile, WCHAR *OutputFile, WCHAR *Format, double Scale, long BitsPerPixel, long DPI ); | |
ANSI | int scConvertFileA( CHAR *SerialNumber, CHAR *InputFile, CHAR *OutputFile, CHAR *Format, double Scale, long BitsPerPixel, long DPI ); | |
Parameters | SerialNumber | Your serial number. |
inputFileName | Name of file to convert. | |
outputFileName | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported:
|
  | dScale | Scalefactor. |
  | lBitsPixel | Bits Per Pixel (Used for raster only). |
  | lDPI | Pixels per Inch (Used for raster only). |
Returns | int | Error code, zero if file was successfully converted. Please see GetLastError for a description of possible error codes. |
Convert a single page from the input file into a new file using the given format.
Unicode version.
UNICODE | int scConvertFile( WCHAR *SerialNumber, WCHAR *InputFile, WCHAR *OutputFile, WCHAR *Format, long Page, double Scale, long BitsPerPixel, long DPI ); | |
ANSI | int scConvertFileA( CHAR *SerialNumber, CHAR *InputFile, CHAR *OutputFile, CHAR *Format, long Page, double Scale, long BitsPerPixel, long DPI ); | |
Parameters | SerialNumber | Your serial number. |
inputFileName | Name of file to convert. | |
outputFileName | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported:
|
  | 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 | Scale factor. |
  | BitsPixel | Bits Per Pixel (Used for raster only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | int | Error code, zero if file was successfully converted. Please see GetLastError for a description of possible error codes. |
Convert the input file to a new image file of the given file format.
This function gives better control of the created image.
UNICODE | int scConvertToImageFile( WCHAR *SerialNumber, WCHAR *InputFile, WCHAR *OutputFile, WCHAR *Format, long Page, double Scale, long ImageWidth, long ImageHeight, long BitsPerPixel, long DPI, long Flags, double dOffsetX, double dOffsetY ); | |
ANSI | scConvertToImageFileA( char *SerialNumber, char *InputFile, char *OutputFile, char *Format, long Page, double Scale, long ImageWidth, long ImageHeight, long BitsPerPixel, long DPI, long Flags, double dOffsetX, double dOffsetY ); | |
Parameters | SerialNumber | Your serial number. |
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. |
  | BitsPixel | 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 | int | Error code, zero if file was successfully converted. Please see GetLastError for a description of possible error codes. |
Convert the input file to a new file using the given format. The output file will be scaled to fit the given paper index.
Unicode version.
UNICODE | int scConvertToPaperSize( WCHAR *SerialNumber, WCHAR *InputFile, WCHAR *OutputFile, WCHAR *Format, LONG PaperSizeIndex, BOOL KeepPaper, LONG Page, LONG BitsPerPixel, LONG DPI ); | |
ANSI | int scConvertToPaperSize( char *SerialNumber, char *InputFile, char *OutputFile, char *Format, LONG PaperSizeIndex, BOOL bKeepPaper, LONG Page, LONG BitsPerPixel, LONG DPI ); | |
Parameters | SerialNumber | Your serial number. |
InputFileName | Name of file to convert. | |
OutputFileName | Name of destination file. | |
  | Format | Select output format to use. The following formats are supported:
|
  | PaperSizeIndex | The index of the predefined paper size to use for conversion. Please see ConvertToPaperSize method for a list of available paper sizes. |
  | KeepPaper | If enabled margins will be added if necessary, to make sure the output use 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 only). |
  | DPI | Pixels per Inch (Used for raster only). |
Returns | int | Error code, zero if file was successfully converted. Please see GetLastError for a description of possible error codes. |
Return dimensions of the given page in the given file.
All returned values are in millimeters.
Unicode version.
UNICODE | int scGetFileDimensions( WCHAR *InputFile, long Page, double *OffsetX, double *OffsetY, double *Width, double *Height, long *Rotation ); | |
ANSI | int scGetFileDimensionsA( CHAR *InputFile, long Page, double *OffsetX, double *OffsetY, double *Width, double *Height, long *Rotation ); | |
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. | |
Rotation | File rotation in angles (only returned for HPGL/2 files - RO instruction). | |
Returns | int | Error code, zero if file was successfully inspected. Please see GetLastError for a description of possible error codes. |
Return the number of pages in the given file.
UNICODE | int scGetNumFilePages( WCHAR *InputFile, long *Pages); | |
ANSI | int scGetNumFilePagesA( char *InputFile, long *Pages); | |
Parameters | InputFile | Full path to the file to inspect. |
Pages | Number of pages in the given file. | |
Returns | int | This function returns zero if successful. |
Return the value of the property with the give ID.
Syntax | int scGetProperty( long ID ); | |
Parameters | ID | Value for the the property to read, the following values are available:
|
Set path to where the additional file importers are located.
UNICODE | void scImportersPath( WCHAR *Path ); | |
ANSI | void scImportersPathA( CHAR *Path ); | |
Parameters | Enable | String containing path to file importer location. |
Returns | void |
Conform, or convert, an existing PDF file to selected PDF/A standard.
UNICODE | int scPDFConform(WCHAR *SerialNumber, WCHAR *InputFile, int ConformType, WCHAR *OutputFile, BSTR *Errors); | |
ANSI | N/A | |
Parameters | SerialNumber | Your serial number. |
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 | int | This function returns zero on success. |
Encrypt a PDF file using password(s) and restriction settings.
UNICODE | int PDFEncrypt(WCHAR *OriginalFile, WCHAR *EncryptedFile, WCHAR *OpenPassword, WCHAR *OwnerPassword, LONG Restrictions); | |
ANSI | int PDFEncryptA(char *OriginalFile, char *EncryptedFile, char *OpenPassword, char *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 original 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 | int | This function returns zero on success. |
Add a PDF file to the currently merged PDF file.
All pages from the give file will be added to the merged output file.
scPDFMergeInit must be called before any PDF file is added.
UNICODE | int scPDFMergeAddFile(WCHAR *PDFFileName); | |
ANSI | int scPDFMergeAddFileA(char *PDFFileName); | |
Parameters | PDFFileName | Full path name to the PDF file to add to the currently merged PDF. |
Returns | int | Returns 0 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.
UNICODE | HRESULT PDFMergeAddFile(WCHAR *PDFFileName, WCAHR *PageInformation); | |
ANSI | int scPDFMergeAddFileExA(char *PDFFileName, char *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 | int | Returns 0 if successful. Any other value indicates an error, see GetLastError for more information. |
Close the currently open PDF file and output the merged result to the given file name.
UNICODE | int scPDFMergeClose(WCHAR *PDFOutputName); | |
ANSI | int scPDFMergeClose(char *PDFOutputName); | |
Parameters | PDFOutputName | Full path name of the merged PDF file that will be created. |
Returns | int | Returns 0 if successful. Any other value indicates an error, see GetLastError for more information. |
Create a new empty PDF file prepared for merging.
Use scPDFMergeAddFile and scPDFMergeAddFileEx to add files, and finally call PDFMergeClose to complete the merge.
UNICODE | int PDFMergeInit(WCHAR *SerialNumber); | |
ANSI | int PDFMergeInitA(char *SerialNumber); | |
Parameters | SerialNumber | Your serial number. |
Returns | int | Returns 0 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 | int PDFOptimize(WCHAR *InputFile, WCHAR * OutputFile, long MonoDPI, long ColorDPI, long MonoCompression, long lColorCompression); | |
Parameters | SerialNumber | Your serial number. |
InputFile | The original PDF file you want optimize. | |
OutputFile | The optimized output 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 | int | Returns 0 if successful. Any other value indicates an error, see GetLastError for more information. |
Split a multi-page PDF file into smaller files based on user settings.
UNICODE | int scPDFSplit(WCHAR *SerialNumber, WCHAR *InputFile, WCHAR *OutputFolder, WCHAR *FileLabel, LONG PagesPerFile); | |
ANSI | int scPDFSplitA(char *SerialNumber, char *InputFile, char *OutputFolder, char *FileLabel, LONG PagesPerFile); | |
Parameters | SerialNumber | Your serial number. |
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 | int | Returns zero if successful. Any other value indicates an error, see GetLastError for more information. |
Convert a PDF file to an editable vector format file, for example Autodesk DXF.
UNICODE | int scPDFToCAD( WCHAR *SerialNumber, WCHAR *InputFileName, long PageNo, WCHAR *Format, WCHAR *OutputFileName); | |
ANSI | int scPDFToCADA( CHAR *SerialNumber, CHAR *InputFileName, long PageNo, CHAR *Format, CHAR *OutputFileName); | |
Parameters | SerialNumber | Your serial number. |
InputFile | Name of the PDF file to convert. | |
PageNo | PDF page that will converted to vector format. | |
Format |
Export format to use for conversion. Supported formats:
|
|
  | OutputFileName | Name of the exported vector file. |
Returns | int | Returns zero if successful. Any other value indicates an error, see GetLastError for more information. |
Set filename for an existing Gerber aperture table file that are to be used when loading RS-274D Gerber data.
UNICODE | void scSetGerberApertureFileName( WCHAR *ApertureFile); | |
ANSI | void scSetGerberApertureFileNameA( CHAR *ApertureFile); | |
Parameters | ApertureFile | Full path to aperture file that will be used. |
Returns | void |
Change settings that are needed to load RS-274D Gerber files correctly.
Syntax | void scSetGerberFormatSettings(BOOL Incremental, LONG NumDigits, LONG NumDecimals, LONG Units, BOOL SuppressLeadingZeros, BOOL SuppressTrailingZeros); | |
Parameters | Incremental | If true the Gerber files contains incremental coordinates. Set to false for absolute coordinates. |
Preceding | Number of digits before decimal point. | |
Succeeding | Number of digits after decimal point. | |
Units | Units used in Gerber file. Set to 0 for Inch and 1 for Milimeters. | |
SuppressLeadingZeros | Leading zeros are suppressed if set to true. | |
SuppressTrailingZeros | Trailing zeros are suppressed if set to true. | |
Returns | void |
Enables or disables grayscale (shades of gray) conversion.
Syntax | void scSetGrayscale( long Enable ); | |
Parameters | Enable | Set to non-zero (true) to enable grayscale conversion. |
Returns | void |
Add margins to the converted file.
Syntax | void scSetMargins( 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 | void |
Enables or disables monochrome (black & white) conversion.
Syntax | void scSetMonochrome( long Enable ); | |
Parameters | Enable | Set to non-zero (true) to enable monochrome conversion. |
Returns | void |
Enables or disables creation of large format PDF files (up to 60x60 meters).
Syntax | void scSetPDFLargeFormat( long Enable ); | |
Parameters | Enable | If set to non-zero large format PDF files are supported. |
Returns | void |
Enable or disable creation of layered PDF files.
Syntax | void scSetPDFLayers( long Enable ); | |
Parameters | Enable | If set to non-zero pens will be mapped to PDF layers. |
Returns | void |
Select PDF standard to use for converted files.
Syntax | void scSetPDFWriteFormat( long FormatIdentifier ); | |
Parameters | FormatIdentifier | Set PDF standard to use for converted files, following options is available:
|
Returns | void |
Set a property to the given long value.
Syntax | int scSetProperty( long ID, long Value ); | |
Parameters | ID | Value for the the property to modify. See scGetProperty for a list of available ID's. |
Value | See scGetProperty for a list of available properties and the values they accept. | |
Returns | int | Returns zero if successful. Any other value indicates an error, see GetLastError for more information. |
Set compression types to use for exported TIFF files.
Syntax | int scSetTIFFCompression( 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 | int | always returns 0. |
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):
Syntax | void scSetTIFFSingleStrip( long Enable ); | |
Parameters | Enable | Set to non-zero to create single-strip TIFF files. |
Returns | void |
Split a multi-page TIFF file into multiple single paged files (one per page).
UNICODE | int scTIFFSplit( WCHAR *InputFile, WCHAR *OutputFolder, WCHAR *FileLabel ); | |
ANSI | int scTIFFSplitA( char *InputFile, char *OutputFolder, char *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. |
Enable or disable use of RO (rotation) instruction in HPGL/2 files.
Syntax | void scUseROInstruction( long Enable ); | |
Parameters | Enable | If set to non-zero if RO instruction should be used during conversion. |
Returns | void |