Exports the current view to an Adobe Portable Document Format (PDF) file.
Visual Basic |
---|
Public Function ExportPdf( _ ByVal filename As String, _ ByVal paperFormat As String, _ ByVal parameters As String _ ) As Integer |
Title
|
For PDF Properties | ||||
Subject
|
For PDF Properties | ||||
Keywords
|
For PDF Properties | ||||
Author
|
For PDF Properties Values containing non-alphanumeric characters, such as space, asterisk, and so on, |
||||
ContentLandscape
|
Possible values: True or False. This command is deprecated. |
||||
CompressBitmaps |
Possible values: |
||||
CompressStreams | Possible values: True - compresses PDF streams to reduce the size of the PDF document (default). False - no compression. |
||||
DownsampleBitmaps | Possible values: True - downsample bitmaps to the chosen resolution (default). False - no downsampling carried out. |
||||
ExportForegroundOnly | Possible values: True or False This parameter is used in GeognoSIS only, where you can have a foreground swd and a background swd. The default is to export both, if you set this property to true, then only the foreground swd will be exported. |
||||
ExportInvisibleLayers |
Possible values: |
||||
ExportItemProperties |
integer, default=0 1 + 8 = 9 |
||||
*ExportItemPropertiesLimit |
integer, default=2000 |
||||
*ExportItemPropertiesColor | 0xRRGGBB, default=cyan The colour of PDF comments. |
||||
*ExportItemPropertiesIconSize | integer between 1 and 100000, default=100 relative size of PDF comment icons, in percent. |
||||
*ExportItemIgnoreLayers | default=no layers ignored numbers of overlays to be ignored, delimited by semi-colon (;) |
||||
Note: Keywords marked * |
Example 1 Example 2
Example 3
|
||||
FontEmbedding |
Possible values: |
||||
FontListEmbedAlways | a carriage-return separated list of font names. |
||||
FontListEmbedNever | a carriage-return separated list of font names. (Fonts will only be embedded if the licence inside the font allows embedding) |
||||
FontSubsetLimit | an integer between 0 and 100: default=0, fonts are subset before embedding if not more than this percentage of glyphs of the font are used. 0=never subset, 100=always subset |
||||
HyperLinks | a comma separated list, possible values are: Text Point LineString Polygon 3D Other * (means all) Default is nothing. |
||||
Keywords | string specifies any keywords. |
||||
LayerInfoIllustrator10 | true or false (default false). Export layer information so that Adobe® Illustrator® 10 and previous versions can display each overlay as a separate layer. |
||||
LayerInfoAcrobat6 | true or false (default false). Export layer information so that Adobe® Acrobat® 6 and later versions can display each overlay as a separate layer. |
||||
MaxBitmapChunkSize | Default value =1048576 Very large bitmaps are chunked when they are exported to PDF. This parameter allows you to specify the (maximum) size of these chunks, for example 1048576 (1MB). Bitmap width * chunk height * bits per pixel / 8 will restrict the size of the chunks keeping them smaller than the entered value. |
||||
Measurement |
=PDF : (for Adobe® Acrobat® 7.0 and above, this entry is equivalent to "True" in Cadcorp SIS 6.3) It is possible to use a combination of these options, for example: |
||||
MinHotSpotWidth | Floating point number specify the unit, if units are not specified points (1/72th of an inch) will be used. Increases the range in which the mouse pointer changes from pointer mark to hand mark. The default range is approx 0.1mm square. Example: MinHotSpotWidth=1cm |
||||
MinLineWidth | distance, default=1/3 pt, possible values, e.g. "1cm", "1.3mm", etc. If no unit is given, pt (1/72inch) is assumed. This is the minimum line width of all lines in the PDF document. Smaller line widths can give better results when zooming into the PDF document very far. Thicker line widths usually give better results on printouts. |
||||
Monochrome | true or false If true, a monochrome document will be created. If false (default), a true colour document will be created. |
||||
OnlyLayersInsidePhotos |
true or false |
||||
OwnerPassword | string This is the password that users must type if they want to change the document’s security settings. This password must be different from the UserPassword. |
||||
PaperFormat |
string See Notes below. |
||||
PermissionPrinting | 0/1/2 0 = None 1 = Low resolution 2 = High Resolution |
PermissionChanging
|
0/1/2/3/4 0 = None 1 = Inserting, Deleting and rotating of images 2 = Fill in form fields and of signing 3 = Commenting, Fill in form fields and of signing 4 = Any except extracting of pages |
||||
PermissionCopying | true or false If true, users can select and copy the contents of the PDF document. This also grants access to those contents to utilities such as Adobe Catalog. |
||||
PermissionTextAccess | true or false If true, visually-impaired users can read the document with screen readers. This option does not allow users to copy or extract the content of the document. |
||||
Permission | number. T his command is deprecated. |
||||
ReferenceDC | Reference Device 0=Screen (default) 1=current printer 2=best printer (auto selected) |
||||
RotateImage |
Rotates the image. 0 = rotate 0° (default) 90 = rotate 90° 270 = rotate 270° |
||||
Scale |
Fit = This is the default when Scale is missing. This forces behaviour View = Use the SWD's view's scale. This is usually fixed to 1 or 1000000 and does not change <N> = Forces the output to be at the specified scale, i.e. Scale-1250. This parameter is especially useful for print templates. You can use Scale=1 and be sure that the PDF output will be at scale 1:1, regardless of the contents of the print template. |
||||
Subject | string specifies the Subject |
||||
Title | string specifies the Title |
||||
UserPassword | string the password users have to enter to open the PDF document |
Use double quotes (ASCII character 34) around the Params text to obtain spaces and/or symbols within each parameter. Visual Basic programmers can enter the quote symbol twice to embed a single quote symbol.
Notes: The paperFormat argument is a string that defines the paper size, border size, output resolution and units.
Here are some examples:
Build the paperFormat argument from the following components. The square brackets indicate optional parameters.
Argument Format
"A4" A4 portrait, no border, 300 dpi
"A4*" A4 landscape, no border, 300 dpi
"500x800" 500pts wide, 800 pts high, no border, 300 dpi
"20x30cm" 20cm wide, 30cm high, no border, 300 dpi
"A4:36" A4 portrait, 36pts border, 300 dpi
"20x30cm:150" 20cm wide, 30cm high, 150pts border, 300 dpi
"20x30cm:15mm" 20cm wide, 30cm high, 15mm border, 300 dpi
"A4*@600" A4 landscape, no border, 600 dpi
"A3:2cm@600dpi" A3 portrait, 2cm border, 600 dpi
Build the paperFormat argument from the following components. The square brackets indicate optional parameters.
Block Consists of
paperFormat [ BorderSep Border ] [ ResolSep Resolution ]
PaperSize [ InLandscape ] [ PaperSizeUnits ]
PaperSizePredef one of A4, A3 or a paper size that appears in the Export PDF dialog in SIS
InLandscape *
PaperSizeUnits Size x Size [Unit ]
Size a positive floating point number
Unit one of cm, mm, or one of the units appearing in the Export PDF dialog in Cadcorp SIS. The default units are points.
BorderSep :
Border Size [ Unit ]
ResolSep @
Resolution Number [ ResolUnit ]
Number a positive integer
ResolUnit dpi
Available: GEO MM ME MD OD OM SISpy
Groups:
sis.ExportPdf ("c:\docs\map.pdf", "A3:2cm@600dpi", Title=""Town Centre"", Author=MF, Subject=Maps, ContentLandscape=False")
Exports the current view as a 600dpi file, with a 2cm border, in A3 portrait format. The PDF document's information dictionary contains entries for Title (Town Centre), Author (MF) and Subject (Maps)
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).