The reserved Document identifier can be used to access the main document’s attributes. Some of these attributes such as PageCount and CurrentPage can also be accessed directly from the ActiveX control properties. Reading/Writing these properties from either the ActiveX control or through the "Document" object will produce the same results.
Some attributes are of type “volatile”, which means they do not get saved with the PDF file but have to be set by the developer each time a file is viewed or processed.
Attribute Name |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
Defines the Language for the PDF/UA compatible document |
String |
See Section 10.8.1, “Natural Language Specification” of the PDF 1.7 specification for valid values. |
||
Define the preferences for the viewer. |
String |
See Section 8.1, “Viewer Preferences” of the PDF 1.7 specification for valid values. |
||
PageBackDropLevel |
Define the use of backdrop for transparencies. |
Longint |
0 - No backdrop. Transparencies as in v5.5. 1 - Backdrop used only for blending commands. 2 - Backdrop used for blending commands and transparency groups. 3 - Backdrop used for all above plus soft mask. |
3 |
OptimizePageContentBeforeSave |
Define if the document will simplify duplicated information in the PDF to reduce the final file size |
Boolean |
True/False |
False |
Attribute |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
ActivateObjects |
Determines if an object created by the user is activated after being created. |
Boolean |
True/False |
False |
Bit flags to determine which categories of action are allowed to run. This attribute needs to be set after the document is opened. |
enum acActionCategoriesConstants |
0x1: acActionCategoryGoTo 0x2: acActionCategoryLaunch 0x4: acActionCategoryThread 0x8: acActionCategoryURI 0x10: acActionCategoryShowHide 0x20: acActionCategoryOCGState 0x40: acActionCategoryJavaScript 0x80: acActionCategoryForm 0x100: acActionCategoryDestination 0xffff: acActionCategoryAll |
0xffff: acActionCategoryAll |
|
AllowJavaScript |
Allows or prevents execution of JavaScript actions. This attribute is also a shortcut to turn off the acActionCategoryJavaScript from AllowedActionCategories attribute. This attribute needs to be set after the document is opened. |
Boolean |
True/False |
True |
AppendMergeOptions |
Defines various options for handling form fields object names when appending or merging documents. This attribute is useful in order to resolve conflicts when the same object names are used in multiple documents that are being appended or merged. |
enum acAppendMergeOptions |
0: acAppendMergeNone 1: acAppendMergeCreateFieldsTreeA 2: acAppendMergeCreateFieldsTreeB 3: acAppendMergeCreateFieldsTreeAB 4: acAppendMergeRenameConflictingFieldsA 5: acAppendMergeRenameConflictingFieldsB |
0: acAppendMergeNone |
Attachments |
Gets all the attachment files from the document |
Array |
||
AutoAdjustFontMinimumSize |
Minimum Font size when the AutoAdjustFontSize Attribute is true. |
Longint |
>=1 |
9 |
AutoAdjustFontSize |
When editing text objects adjust automatically the font size to fit all entered text within the object' s bounds. |
Boolean |
True/False |
False |
AutoPrint |
Instructs Acrobat Reader to prompt the user to print the PDF document when it is opened. This option requires Javascript to be enabled in Acrobat Reader on the client system. |
Boolean |
False: The document is opened normally with no prompt for printing. True: The user is prompted with the Print dialogue box. |
False |
AutoTabOrder |
Used to change the behavior of the Tab key. |
enum AutoTabOrder |
0: acAutoTabOrderNone 1: acAutoTabOrderHorizontal 2: acAutoTabOrderVertical |
0: acAutoTabOrderNone |
BlackAndWhiteImageInterpolation |
Set the Black and White image interpolation mode depending on the type of image.. |
Longint |
0: Automatic. Will enable interpolation for large images such as scanned images an disable interpolation for small images such as scan codes. 1: Interpolation is always Enabled. Documents containing barcodes should not use this value. 2: Interpolation is always Disabled. |
1: Interpolation is always Enabled. |
CheckBoxSize |
Forces all checkboxes to be of the specified size. |
Longint |
>= -1 |
-1 |
ClearImagesAfterSavePage |
This will remove from memory the images reference by a page after it is saved, thus reducing memory usage when saving a document with a lot of images. |
Boolean |
True/False |
False |
ClipToBoundaries |
When set to True, this property forces all objects to be clipped within the page’s boundaries. |
Boolean |
True/False |
True |
Some PDF files contain fonts with custom character maps. The character maps are defined in external files which PDF Creator should be able to locate in order to render the font. CMapLocation is the location on the local system or local network where the character maps are located. The default character maps can be downloaded from here. |
String |
Not Null |
|
|
Same as CMapLocation except that the files are located on a website rather than the local network. This attribute can be set to http://www.amyuni.com/downloads/CMaps/ to allow download the character maps from the Amyuni website. |
String |
Not Null |
||
CurrentPage *Volatile |
Current page number |
Longint |
1 PageCount |
1 |
Default font used for all objects containing text. |
String in the form of: "FontName, FontSize, Weight, Italic, Underline" |
Not Null |
"Times New Roman,12,400,0,0" |
|
DefaultFontApplyToAll |
When true, changing the default font will change the fonts of all objects currently having the default font. When false, only newly created object will be affected. |
Boolean |
True/False |
False |
DefaultFormat |
Format |
|||
DefaultImageCompression |
Default compression algorithm to be used when saving images. Values are the same as for the Picture object. |
enum acImageCompressionConstants |
0: acCompressionDefault 1: acCompression256Colors 2: acCompressionJPegLow 7: acCompressionJPegMedium 9: acCompressionJPegHigh 10: acCompressionCCITTFax 11: acCompressionPNG 12: acCompressionJPG2000 13: acCompressionJBIG2 14: acCompressionJBIG2Huffman |
0: acCompressionDefault |
DefaultTitleFont |
Default font used for cell titles. |
String in the form of: "FontName, FontSize, Weight, Italic, Underline" |
Not Null |
"Times New Roman,9,700,0,0" |
DeleteBookmarksOfDeletedPages |
When set to TRUE, all bookmarks whose destination page is deleted are removed from the bookmarks tree. Note that if a certain bookmark has cchild nodes, it will be removed along with its children regardless of whether the children point to existing pages or not. |
Boolean |
True/False |
False |
DrawAsImage |
Each page is rendered as a single image. |
Boolean |
True/False |
False |
DrawObjectSizingGrips |
When an object is selected, sizing grips appear on the 4 corners of the object. These grips can be disabled by setting this attribute to False. |
Boolean |
True/False |
True |
*Volatile
|
Default back color for editable cells and fields in compiled or run mode. This value can be overridden by the backcolor attribute from each object. |
Color |
000000 to FFFFFF |
-1 (Transparent) |
*Volatile |
Back color for search results from ReachText method. |
Color |
000000 to FFFFFF |
0 (Black) |
Errors *ReadOnly |
List of errors encountering when opening a PDF |
Array |
||
FileSaveOption |
Part of the PDF document to save to file. |
enum IacFileSaveOption |
-1: acFileSaveDefault Takes the default Save option stored in the document. 0: acFileSaveAll save document design data and view. This option should be only used with PDF created by Amyuni PDF Creator 1: acFileSaveView save only document view (PDF format). 2: acFileSaveDesign save only document design data. 3: acFileSavePDFA_7 [Obsolete] save document in PDF/A format, PDF Specifications Version 7. 4: acFileSavePDFA save document in PDF/A format, PDF Specifications Version 8. 5: acFileSavePDF14 save document PDF Specifications Version 1.4. 6: acFileSavePDFUA save the file with XMP metadata compatible with PDF/UA. |
1: acFileSaveView |
Fonts *ReadOnly |
Array of all fonts used in document |
Array |
||
ForceNewNameWhenConflicting |
Prevents multiple form field objects from having the same name, this is known as grouped fields. |
Boolean |
False: Developer is allowed to set the same name to multiple form field objects, i.e. create grouped form field objects. True: If am object name is already in use, PDF Creator will assign a new name for other objects with the same name, e.g. acField1, acField2, ... |
True (for compatibility with v4.5) |
HideAnnotations |
Show or hide annotations depending on the document’s state |
enum HideAnnotations
|
Combination of : 0: acHideNever. 1: acHideInRunMode. 2: acHideInDesignMode. 8: acHideInPrintPreviewMode. 16: acHideInAnnotationMode. 255: acHideAlways. |
0: acHideNever |
KeepOriginalColors |
Colors in a PDF file can be defined using multiple color spaces such as RGB, CMYK or CIE based. This attribute prevents PDF Creator from converting all colors to RGB when the document is modified and resaved. |
Boolean |
False: All colors are converted to RGB when document is modified True: The colors of the resaved document preserve the same color space and match the original colors |
True |
IgnoreAnnotationsPrintFlag |
PDF annotations have an associated attribute that hides the annotation when the document is printed. Setting this attributes to True overrides the hide when printing attribute and forces all annotations to be printed. |
Boolean |
True/False |
False |
IgnoreDesignInformationOnOpen |
For PDF documents saved with PDF Creator custom design information, setting this attribute to True will open the file as a regular PDF and ignore all PDF Creator specific information. |
Boolean |
True/False |
False |
IgnoreStructElements |
Remove all tags from PDFs with structured elements (Optional Contents). Used to speed up processing of documents |
Boolean |
True/False |
False |
IgnoreTransparencies |
Improve display speed and print quality of certain documents containing transparent images. |
Boolean |
True/False |
False |
ImageOptimization |
Optimize loading of JPeg/PNG images by delaying the decompression of these images to when they are really needed. |
Boolean |
True/False |
True |
InterPageXGap |
When rendering a PDF in multi-page view mode, defines the horizontal gap between visible pages. |
Longint |
> 1 |
300 |
InterPageYGap |
When rendering a PDF in multi-page view mode, defines the vertical gap between visible pages. |
Longint |
> 1 |
300 |
LayerConfigs |
For details, refer to the sample project for creating layered PDFs (AddLayerConfiguration). |
Array |
NULL |
|
Layers |
For details, refer to the sample project for creating layered PDFs (AddLayerConfiguration). |
Array |
NULL |
|
Optimize a document for web viewing. PDF documents usually need to be completely downloaded before they can be viewed. A linearized document can be viewed one page at a time without the need to completely download the document. The XRef compression in SaveCompressedPDF attribute will be disabled when the Linearized attribute is set. |
Boolean |
True/False |
False |
|
LockLastSelectedTool *Volatile |
When a tool is used to add objects to the document, the same tool remains selected until the user right-clicks on the document. |
Boolean |
True/False |
True |
Log |
Log text that is generated when converting a regular PDF into PDF/A or PDF 1.4, details the operations that were performed during conversion. |
String |
|
|
MeasurementUnit *Volatile |
Unit of measurement used for the ruler bars and status bar. |
enum acMeasurementUnit |
0: Millimeters 1: Inches 2: Twips |
0: Millimeters |
MinimumGap |
Minimum gap in pixels to be displayed between age view and borders. |
Longint |
>=0 |
30 pixels |
ObjectType |
Returns the type of object. |
IacObjectType |
acObjectTypeDocument |
|
Defines an alternative location for the Tesseract dictionaries that are needed to perform an OCR on a document. It needs the OCR module activated. |
String |
Any valid directory path that contains all the distributable Tesseract files. |
NULL |
|
OpenOtherThanPDF |
Allows PDF Creator to directly open and files other than PDF files such as JPeg, TIFF or XPS files. |
Boolean |
True: PDF Creator will open files other than PDF False: PDF Creator will raise an exception when an attempt is made to open files other than PDF |
True |
OptimizeParams |
Fine tuning of the optimization algorithm that is used to optimize text before exporting to other formats. |
Longint |
Two flags are currently supported: 0: fine tuning disabled 4: acIgnoreOverlappingText, Do not optimize text objects that are overlapping. 8: acUseLowPrecisionPositioning, Allow a larger space between text objects for the objects to be considered as part of the same line. |
0: fine tuning disabled |
OptimizationLevel *ReadOnly |
The last optimization level to which the document was optimized. See OptimizeDocument Method |
Longint |
0: No optimization 1: Line optimization 2: Paragraph optimization 3: Table optimization |
0: No optimization |
PageContentCompression |
Enables or disables flate (zip) compression of the page’s content. Disabling flate compression produces larger PDF files and is only recommended for analyzing or debugging the contents of the PDF file. |
Boolean |
True/False |
True |
PageCount *ReadOnly |
Number of pages in document. |
Longint |
>= 1 |
1 |
PageLayout |
Only used to load and save the page layout parameter as defined by the PDF specifications and has no effect on the PDF Creator Viewer. |
String |
"SinglePage" "OneColumn" "TwoColumnLeft" "TwoColumnRight" "TwoPageLeft" "TwoPageRight" |
|
PageMode |
Determines how the document should be displayed when opened using Acrobat Reader®. |
Longint |
0: Default mode. 1: Neither document outline nor thumbnail images visible. 2: Document outline visible. 3: Thumbnail images visible. 4: Full-screen mode, with no menu bar, window controls or any other window visible. 5: OC visible. 6: Attachments visible. |
0: Default mode. |
PageNumbers |
Returns the PageNumbers object. |
IacObject |
||
Pages *ReadOnly |
Array of all pages in document. |
Array |
NULL |
|
Determines which pages are going to be saved to a PDF file, exported to other formats such as HTML, XLS, or used when appending documents. |
Integer [] |
> 0 |
||
Example //Create a PDF Creator Object ACPDFCREACTIVEX.PDFCreactiveX PDF = new ACPDFCREACTIVEX.PDFCreactiveX(); // Set licensing key PDF.SetLicenseKey("XXX", "XXX"); // open PDF file PDF.Open(@"c:\temp\pages.pdf", ""); // create array int[] PageSequence = new int[2]; // Save only pages 4 and 3 PageSequence[0] = 4; PageSequence[1] = 3; ACPDFCREACTIVEX.acObject objPage = PDF.GetObjectByName("Document"); objPage["PageSequence"] = PageSequence; // Using PageSequenceStr // PDF.set_ObjectAttribute("Document", "PageSequenceStr", "4,2"); PDF.Save("c:\\temp\\newpage.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView); |
||||
Provides a more flexible way of setting the PageSequence array, but does the same function. |
||||
*Volatile |
Number the page that it will keep in memory. |
Longint |
>= 0 |
0 |
PatternFillAntiAliasing |
Used when drawing the content of pattern brushes. The user might want to choose to have the content draw without anti-aliasing. |
Boolean |
True/False |
True |
Selects the conformance level for PDF/A standard. |
Longint |
0: None 65: Level A (PDFA-Na) 66: Level B (PDFA-Nb) 85: Level U (PDFA-Nu) |
0: None |
|
Selects the part of the PDF/A standard. |
Longint |
0: None 1: PDFA-1 2: PDFA-3 |
0: None |
|
RasterizedAreaInterpolationMode |
Interpolation mode used when creating the image of an area that is to be rasterized and sent to a printer. |
Longint |
>= 0 |
0 |
ReportState *ReadOnly |
Current state for document or report. |
enum ReportStateConstants |
0 : acReportStateRun document in Run mode. 1 : acReportStateDesign document in Design mode. 2 : acReportStateLoading document is being loaded from file. 3: acReportStatePrintPreview document in PrintPreview mode. 4: acReportStateAnnotate document in Annotation mode. |
0:acReportStateRun |
Rotate *write only
|
Paper rotation. This property takes effect only when the document is saved and reopened |
enum RotatePageConstants |
-90: acRotatePageLeft. 90: acRotatePageRight. 180: acRotatePageFull. |
|
*Volatile |
Helps reduce the size of large PDF files by compressing some objects in the saved PDF file. These XRef compression will be disabled when the Linearized attribute is set. |
Longint |
0: Non Compressed XREF table and Non compressed PDF objects 1: Only Compressed XRef Stream 2: Compressed XRef Stream and Compressed PDF objects |
2 |
SaveJBIG2 |
Compress black and white images that are loaded from a PDF with JBIG2 compression can be resaved into CCITT compressed images in order to remove the JBIG2 formatting from PDF files. |
Boolean |
True/False |
True |
ScaleToWindow |
Scale contents to fit in window. It is mandatory to call refresh method to activate the new value. |
enum IacScaleType |
0: acScaleNone. 1: acScaleHorizontal. 2: acScaleVertical. 3: acScaleBoth. |
0: acScaleNone. |
ScreenRenderer UseGdiPlus (deprecated) |
Selects which rendering engine is used to render a page to the screen or printer. |
Longint |
0: Use GDI32 (not available in WinRT) 1: Use GDI+ (not available in WinRT) 2: Use Direct2D (Windows Vista and later) |
1: GDI+ for ActiveX or .Net 2: Direct2D for WinRT |
ScrollThroughPages *Not available in WinRT |
Defines the behavior of the scroll-bars when the document contains multiple pages. |
Boolean |
False: Scrolling is limited to a single page True: When the end of a page is reached, the viewer scrolls to the next page |
True |
ShowObjectsBorderMarker |
Shows a border around every object even when the object’s border properties are not set. It only works in Design mode. |
Boolean |
True/ False |
False |
ShowObjectsBorders |
Show borders of all objects on the current page, irrespective of the object’s border. This operation is done creating frame objects. If the PDF file is saved, those frame object will be preserved. |
enum acShowObjectsBorders |
0: acShowNever Do not show borders 1: acShowInTemplate Show borders for objects in the template document 2: acShowInMain Show borders for objects in the main document 3: acShowIMainAndTemplate Show borders for objects in main and template documents. |
0: acShowNever |
UnicodeFonts *Volatile |
Sets wheter or not Unicode (CID) fonts will be used. |
Boolean |
True / False |
False |
UseCropBoxWhenExporting |
Limit the JPeg and BMP exports to the contents of the CropBox or page margins. |
Boolean |
False: The whole page is exported, the size of the resulting image is the size of the page including the margins. True: The size of the resulting image is the size of the CropBox region only, or the size of the page excluding the margins. |
False |
UseHTTPForOpenOrSave |
Allows opening or saving from or to an HTTP URI. A) To open a document from HTTP with method "GET": |
Boolean |
True/False |
False |
UseSystemFonts *Volatile |
Whenever possible, use the fonts installed on the system rather than the fonts embedded in the PDF file. Specially, modifying text, otherwise, it could be missing chars. If UseSystemFonts is True and the font is not on the system, there are two options: 1) Windows chooses equivalent font, 2) There is not substitution font, then we use the font inside of the PDF (similar behavior of having UseSystemFonts as False). |
Boolean |
True/False |
False |
XAML |
XAML representation of the whole document. Used when saving the document for viewing in a Silverlight control. |
String |
||
ZoomFactor |
Zoom factor at which document is viewed. |
Longint |
Between 10 and 1000 |
140 |
ZoomWithCtrlPlusMinusZero |
Allows zooming in and out in the PDF Creator viewer using the Ctrl+ and Ctrl- keyboard shortcuts. The default is set to False for compatibility with previous versions. |
Boolean |
True/False |
False |
Attribute |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
Author |
Document author |
String |
|
NULL |
Creator |
Document creator |
String |
|
Amyuni PDF Creator |
Keywords |
Document keywords |
String |
|
NULL |
PdfVersion |
PDF version number as found in the header of the PDF file. The value in the header is only an indication of the file format and does not reflect the real contents of the PDF. |
String |
1.4 |
|
Producer *ReadOnly |
Document producer |
String |
|
Amyuni PDF Creator 3.0 |
Subject |
Document subject |
String |
|
NULL |
Title |
Document title |
String |
|
NULL |
Metadata |
Specifies the type of metadata in the document |
Longint |
0: No metadata stream. 1: Basic XMP metadata generated by PDF Creator. 2: Custom metadata stream generated by the calling application. 3: PDF/A compatible metadata stream (Acrobat 8). 4:PDF/A compatible metadata stream (Acrobat 7). |
0 |
MetadataStream *ReadOnly
|
A string containing the XML metatadata. In the case of "External", the caller can also define a custom stream that can contain any valid XML block. So for cases 1, 3, and 4, the stream is generated by PDF Creator and is read-only. For 2, the stream is fully controlled by the application. |
String |
Returns a string containing the XML metatadata. In the case of "External", the caller can also define a custom stream that can contain any valid XML block. For cases 1, 3 and 4, the stream is generated by PDF Creator and is read-only. For 2, the stream is fully controlled by the application. |
NULL |
User specific metadata that is compatible with the standard metadata format. |
String |
This is included in the metadata only if the value of Metadata is 1. |
NULL |
|
Custom XMP metadata must be a buffer of XML that described an xml element names «rdf :Description» . which should define a new namespace, and, rdf :about must be a blank string. Below is an example buffer, where the bold-italic text should be replaced by developer specific values. Example <rdf:Description rdf:about=' ' xmlns:namespace=' your-name-space' > . . . Your own XML content here. . . . </rdf:Description> |
Attribute |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
DestinationFile |
When set, the document is printed to a file as opposed to a real printer. |
String |
|
NULL |
DuplexPrinting |
Double-sided printing. |
enum acDuplexPrinting |
0: acDuplexPrintingrDefault. 1: acDuplexPrintingNever. 2: acDuplexPrintingVertical. 3: acDuplexPrintingHorizontal. |
0: acDuplexPrintingrDefault |
FormToBinMap |
Assign each paper size to a specific printer tray. |
String |
(Printer1) Size1 Tray1 Size2 Tray2 (Printer2) Size1 Tray1 Size2 Tray2. |
NULL |
Example // Printer: Amyuni PDF Converter // Size: 5 * Legal (8.5 x 14 in.) // Tray: 256 * ID bin value generated by printer axPDFCreactiveX1.Document.Attribute["FormToBinMap"] = "(HP Lasertjet 4100) 5 256 3 257"; // 0: PDF file setting if any // 1: Set by the destination printer // 2: Set depending on the FormToBinMap axPDFCreactiveX1.Document.Attribute["TraySelection"] = 2; // Print to default printer axPDFCreactiveX1.Document.Print("", false); |
||||
MediaMap |
When printing to a printer with multiple trays, the tray can be selected depending on the name of the media inserted into the tray, e.g. “Color” or “Coated Paper”. This attribute allows matching between the media names stored in the PDF and the actual media names on the printer, e.g. /Mediamap (\(Media1\)\(Color\)\(Media2\)\(Coated\)). |
String |
||
PrintAsImage |
Each page is printed as a single image. |
Boolean |
True/False |
False |
PrinterDevMode |
Devmode structure associated with target printer |
ByteArray |
|
NULL |
Example // This method causes the printer dialog to show. One need to press the "Properties" button and then press OK there. // When OK is pressed the PrinterDevMode property is set in the document. axPDFCreactiveX1.Document.Print("HP LaserJet 6", true); // Now that the property is set, we can call get_ObjectAttribute to retrieve its value. The value is a byte array. Object val = axPDFCreactiveX1.Document.Attribute["PrinterDevMode"]; // Here, we directly set the same value we obtained. We could however, have saved it aside and used the // command below to restore the printer settings to settings1 after the user had brought up and changed // the printer settings a few times. axPDFCreactiveX1.Document.Attribute["PrinterDevMode").Value = val; |
||||
PrinterName |
Name of target printer. |
String |
NULL |
|
PrintJobID *ReadOnly |
When a document is printed, this is the job ID of the print job as it is returned by the print spooler. |
Longint |
|
0 |
PrintMultipleSheets |
Print large pages into multiple sheets depending on the default paper size of the destination printer. |
Boolean |
True/False |
False |
PrintSequence |
Sequence in which pages are printed |
IntArray |
|
NULL |
Example // Create a PDF Creator Object ACPDFCREACTIVEX.PDFCreactiveX PDF = new ACPDFCREACTIVEX.PDFCreactiveX(); // Set licensing key PDF.SetLicenseKey("XXX", "XXX"); // open PDF file PDF.Open(@"c:\temp\pages.pdf", ""); // create array int[] PrintSequence = new int[2]; // Print only pages 4 and 3 PrintSequence[0] = 4; PrintSequence[1] = 3; ACPDFCREACTIVEX.acObject objPage = PDF.GetObjectByName("Document"); objPage["PrintSequence"] = PrintSequence;// Print all the document string PrinterName = ""; // Default printer int Prompt = 0; pdf.Print(PrinterName, Prompt); |
||||
PrintTransparenciesAsPNG |
Used when rendering the content of objects with transparencies like acPicture or acPolygon fill brushes to a printer. The objects with transparencies are converted into a PNG with transparent background for improved rendering. |
Boolean |
True/False |
False |
ScaleToPrinter |
Scale contents to fit in printed page |
enum acScaleConstants |
0: acScaleNone. 1: acScaleHorizontal. 2: acScaleVertical. 3: acScaleBoth. 4: acScaleRotatePage. |
0: acScaleNone |
TraySelection |
Determines how the control selects paper trays when printing |
Long |
0: PDF file setting if any. 1: Set by the destination printer. 2: Set depending on the FormToBinMap property. |
0: PDF file setting if any. |
XPagesPerSheet |
Determines how many pages are printed on a single sheet of paper. |
Long |
> 1 |
1 |
YPagesPerSheet |
Determines how many pages are printed on a single sheet of paper. |
Long |
> 1 |
1 |
Attribute |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
OwnerPassword |
Owner password supplied when opening or encrypting the document. |
String |
|
NULL |
Permissions *ReadOnly |
Combination of flags that determines which operations are enabled in a password protected document. |
Longint |
4: Printing is allowed 8: Modify document contents 16: Copy text and graphics from the document 32: Add or modify annotations and form fields -64: User has full permissions. |
-64: User has full permissions |
Security *ReadOnly |
Specifies whether the document is protected by a password. |
Longint |
0: No Security 40: 40 bits security 128: 128 bits security |
0: No Security |
UserPassword |
User password supplied when opening or encrypting the document. |
String |
|
NULL |
UseSystemFonts |
Whenever possible, use the fonts installed on the system rather than the fonts embedded in the PDF file. |
Boolean |
True/False |
True |
XPagesPerSheet |
Determines how many pages are printed on a single sheet of paper. |
Longint |
|
1 |
YPagesPerSheet |
Determines how many pages are printed on a single sheet of paper. |
Longint |
|
1 |
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator Evaluation"
Const strActivationCode As String = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
' Initializing PDFCreativeX Object
Dim pdf As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
' Set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode)
' Set-up Metadata
' Using Document Object
Dim doc = pdf.Document
doc("Author") = "Amyuni"
doc("Keywords") = "document, sample, code"
doc("Title") = "Code Sample"
' Using Document Object and Attribute
doc.Attribute("Author") = "Amyuni"
doc.Attribute("Keywords") = "document, sample, code"
doc.Attribute("Title") = "Code Sample"
' OR using ObjectAttribute Property
pdf.ObjectAttribute("Document", "Author") = "Amyuni"
pdf.ObjectAttribute("Document", "Keywords") = "document, sample, code"
pdf.ObjectAttribute("Document", "Title") = "Code Sample"
' OR using ObjectAttributeStr
pdf.ObjectAttributeStr("Document", "Author", "Amyuni")
pdf.ObjectAttributeStr("Document", "Keywords", "document, sample, code")
pdf.ObjectAttributeStr("Document", "Title", "Code Sample")
' Show General information
Console.WriteLine(doc("CurrentPage").ToString)
Console.WriteLine(doc("DefaultFont").ToString)
' OR
Console.WriteLine(doc.Attribute("CurrentPage").ToString)
Console.WriteLine(doc.Attribute("DefaultFont").ToString)
' OR
Console.WriteLine(pdf.ObjectAttribute("Document", "CurrentPage"))
Console.WriteLine(pdf.ObjectAttribute("Document", "DefaultFont"))
' Save PDF
pdf.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
' destroy objects
pdf = Nothing
End Sub
static void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator Evaluation";
const string strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
// Initializing PDFCreativeX Object
ACPDFCREACTIVEX.PDFCreactiveX pdf = new ACPDFCREACTIVEX.PDFCreactiveX();
// Set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode);
// Set-up Metadata
// Using Document Object
dynamic doc = pdf.Document;
doc["Author"] = "Amyuni";
doc["Keywords"] = "document, sample, code";
doc["Title"] = "Code Sample";
// OR Document Object and Attribute
doc.Attribute["Author"] = "Amyuni";
doc.Attribute["Keywords"] = "document, sample, code";
doc.Attribute["Title"] = "Code Sample";
// OR using ObjectAttribute
pdf.set_ObjectAttribute("Document", "Author", "Amyuni");
pdf.set_ObjectAttribute("Document", "Keywords", "document, sample, code");
pdf.set_ObjectAttribute("Document", "Title", "Code Sample");
// OR using ObjectAttribute Property
pdf.ObjectAttribute["Document", "Author"] = "Amyuni";
pdf.ObjectAttribute["Document", "Keywords"] = "document, sample, code";
pdf.ObjectAttribute["Document", "Title"] = "Code Sample";
// OR using ObjectAttributeStr
pdf.ObjectAttributeStr("Document", "Author", "Amyuni");
pdf.ObjectAttributeStr("Document", "Keywords", "document, sample, code");
pdf.ObjectAttributeStr("Document", "Title", "Code Sample");
// Show General information
Console.WriteLine(doc["CurrentPage"].ToString());
Console.WriteLine(doc["DefaultFont"].ToString());
// OR
Console.WriteLine(doc.Attribute["CurrentPage"].ToString());
Console.WriteLine(doc.Attribute["DefaultFont"].ToString());
// OR
Console.WriteLine(pdf.ObjectAttribute["Document", "CurrentPage"]);
Console.WriteLine(pdf.ObjectAttribute["Document", "DefaultFont"]);
// OR
Console.WriteLine(pdf.get_ObjectAttribute("Document", "CurrentPage"));
Console.WriteLine(pdf.get_ObjectAttribute("Document", "DefaultFont"));
// Save PDF
pdf.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
// destroy objects
pdf = null;
}
#import "c:\users\amyuni\pdfcreactivex.dll" no_namespace
#include <iostream>
using namespace std;
int main()
{
// Constants for Activation codes
bstr_t strLicenseTo = "Amyuni PDF Creator Evaluation";
bstr_t strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
// Initialize the COM subsystem
CoInitialize(0);
// IPDFCreactiveXPtr is a smart pointer type defined in pdfcreactivex.tlh,
// the type library header file generated by the #import instruction above
IPDFCreactiveXPtr pdf;
// Create the PDFCreactiveX instance
pdf.CreateInstance(__uuidof(PDFCreactiveX));
// set license key
pdf->SetLicenseKey(_bstr_t(strLicenseTo), _bstr_t(strActivationCode));
// Create Document Object
IacObjectPtr doc = pdf->Document;
// Set-up Metadata
doc->PutAttribute(_bstr_t("Author"), _bstr_t("Amyuni Technologies"));
doc->PutAttribute(_bstr_t("Keywords"), _bstr_t("document, sample, code"));
doc->PutAttribute(_bstr_t("Title"), _bstr_t("Code Sample"));
// OR
pdf->ObjectAttributeStr(_bstr_t("Document"), _bstr_t("Author"), _bstr_t("Amyuni Technologies"));
pdf->ObjectAttributeStr(_bstr_t("Document"), _bstr_t("Keywords"), _bstr_t("document, sample, code"));
pdf->ObjectAttributeStr(_bstr_t("Document"), _bstr_t("Title"), _bstr_t("Code Sample"));
// Show General information
cout << (_bstr_t)doc->GetAttribute(_bstr_t("CurrentPage")) << endl;
cout << (_bstr_t)doc->GetAttribute(_bstr_t("DefaultFont")) << endl;
// OR
cout << (_bstr_t)pdf->GetObjectAttribute(_bstr_t("Document"), _bstr_t("CurrentPage")) << endl;
cout << (_bstr_t)pdf->GetObjectAttribute(_bstr_t("Document"), _bstr_t("DefaultFont")) << endl;
// Save PDF
pdf->Save("c:\\temp\\CreatePDFDocument_resulting.pdf", acFileSaveView);
// destroy objects
pdf = NULL;
Return 0;
}
' FileSaveOptionConstants
Const acFileSaveAll = 0
Const acFileSaveDefault = -1
Const acFileSaveView = 1
Const acFileSaveDesign = 2
Const acFileSavePDFA_7 = 3
Const acFileSavePDFA = 4
Const acFileSavePDF14 = 5
' Constants for Activation codes
Const strLicenseTo = "Amyuni PDF Creator Evaluation"
Const strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
' Initializing PDFCreativeX Object
Dim pdf
Set pdf = CreateObject("PDFCreactiveX.PDFCreactiveX.6.5")
' Set license key
pdf.SetLicenseKey strLicenseTo, strActivationCode
' Set-up Metadata
' Using Document Object
Dim doc
Set doc = pdf.Document
doc("Author") = "Amyuni"
doc("Keywords") = "document, sample, code"
doc("Title") = "Code Sample"
' Using Document Object and Attribute
doc.Attribute("Author") = "Amyuni"
doc.Attribute("Keywords") = "document, sample, code"
doc.Attribute("Title") = "Code Sample"
' OR using ObjectAttribute Property
pdf.ObjectAttribute("Document", "Author") = "Amyuni"
pdf.ObjectAttribute("Document", "Keywords") = "document, sample, code"
pdf.ObjectAttribute("Document", "Title") = "Code Sample"
' OR using ObjectAttributeStr
pdf.ObjectAttributeStr "Document", "Author", "Amyuni"
pdf.ObjectAttributeStr "Document", "Keywords", "document, sample, code"
pdf.ObjectAttributeStr "Document", "Title", "Code Sample"
' Show General information
WScript.Echo(doc("CurrentPage"))
WScript.Echo(doc("DefaultFont"))
' OR
WScript.Echo(doc.Attribute("CurrentPage"))
WScript.Echo(doc.Attribute("DefaultFont"))
' OR
WScript.Echo(pdf.ObjectAttribute("Document", "CurrentPage"))
WScript.Echo(pdf.ObjectAttribute("Document", "DefaultFont"))
' Save PDF
pdf.Save "c:\temp\CreatePDFDocument_resulting.pdf", acFileSaveView
' destroy Objects
Set pdf = Nothing
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator Evaluation"
Const strActivationCode As String = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
' Initializing pdfCreativeX Object
Dim pdf As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
' Set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode)
' Open an existent pdf file
Dim fileName As String = "https://www.amyuni.com/downloads/Amyuni%20PDF%20Converter.pdf"
Dim password As String = ""
' Open from Internet
pdf.ObjectAttribute("Document", "UseHTTPForOpenOrSave") = True
pdf.Open(fileName, password)
' Set CurrentPage
pdf.CurrentPage = 1
' Create a Text in the current Page
pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypeText, "Text1")
' Define Object
Dim oText As ACPDFCREACTIVEX.IacObject = pdf.GetObjectByName("Text1")
' General attributes
oText("Left") = 1000
oText("Right") = 5000
oText("Top") = 0
oText("Bottom") = 4000
oText("BorderColor") = &HFF00FF
oText("BorderWidth") = ACPDFCREACTIVEX.acBorderWidth.acBorderWidthDouble
' Text Attributes
oText("Text") = "Amyuni Technologies"
' Save Locally
pdf.ObjectAttribute("Document", "UseHTTPForOpenOrSave") = False
' Save pdf
pdf.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End Sub
static void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator Evaluation";
const string strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
// Initializing pdfCreativeX Object
ACPDFCREACTIVEX.PDFCreactiveX pdf = new ACPDFCREACTIVEX.PDFCreactiveX();
// Set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode);
// Open an existent pdf file
string fileName = @"https://www.amyuni.com/downloads/Amyuni%20PDF%20Converter.pdf";
string password = "";
// Open from Internet
pdf.ObjectAttribute["Document", "UseHTTPForOpenOrSave"] = true;
pdf.Open(fileName, password);
// Set CurrentPage
pdf.CurrentPage = 1;
// Create a Text in the current Page
pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypeText, "Text1");
// Define Object
ACPDFCREACTIVEX.IacObject oText = pdf.GetObjectByName("Text1");
// General attributes
oText["Left"] = 1000;
oText["Right"] = 5000;
oText["Top"] = 0;
oText["Bottom"] = 4000;
oText["BorderColor"] = 0xFF00FF;
oText["BorderWidth"] = ACPDFCREACTIVEX.acBorderWidth.acBorderWidthDouble;
// Text Attributes
oText["Text"] = "Amyuni Technologies";
// Save Locally
pdf.ObjectAttribute["Document", "UseHTTPForOpenOrSave"] = false;
// Save PDF
pdf.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
}
#include <iostream>
#import "c:\users\amyuni\pdfcreactivex.dll" no_namespace
using namespace std;
int main()
{
// Constants for Activation codes
bstr_t strLicenseTo = "Amyuni PDF Creator Evaluation";
bstr_t strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
// Initialize the COM subsystem
CoInitialize(0);
// IPDFCreactiveXPtr is a smart pointer type defined in pdfcreactivex.tlh,
// the type library header file generated by the #import instruction above
IPDFCreactiveXPtr pdf;
// Create the PDFCreactiveX instance
pdf.CreateInstance(__uuidof(PDFCreactiveX));
// set license key
pdf->SetLicenseKey(_bstr_t(strLicenseTo), _bstr_t(strActivationCode));
// Open an existent pdf file
_bstr_t fileName = "https://www.amyuni.com/downloads/Amyuni%20PDF%20Converter.pdf";
_bstr_t password = "";
// Open from Internet
pdf->ObjectAttributeLong("Document", "UseHTTPForOpenOrSave", true);
pdf->Open(fileName, password);
// Set CurrentPage
pdf->CurrentPage = 1;
// Set-up variables for attributes
_variant_t varAttribute;
varAttribute.vt = VT_I4; // integers
// Create a text in the current Page
pdf->CreateObject(acObjectTypeText, "Text1");
// Define Object
IacObjectPtr oText = pdf->GetObjectByName("Text1");
// General Attributes
oText->Attribute["Left"] = 1000;
oText->Attribute["Right"] = 5000;
oText->Attribute["Top"] = 0;
oText->Attribute["Bottom"] = 4000;
varAttribute.lVal = 0xFF00FF;
oText->Attribute["BorderColor"] = varAttribute;
varAttribute.lVal = acBorderWidthDouble;
oText->Attribute["BorderColor"] = varAttribute;
// Text Attributes
oText->Attribute["Text"] = "Amyuni Technologies";
// Save Locally
pdf->ObjectAttributeLong("Document", "UseHTTPForOpenOrSave", false);
// Save pdf
pdf->Save("c:\\temp\\CreatePDFDocument_resulting.pdf", acFileSaveView);
// destroy Objects
pdf = NULL;
oText = NULL;
return 0;
}
' ObjectTypeConstants
Const acObjectTypeArrow = 36
Const acObjectTypeBarcode = 45
Const acObjectTypeCell = 33
Const acObjectTypeCheckBox = 21
Const acObjectTypeEllipse = 4
Const acObjectTypeExcel = 17
Const acObjectTypeField = 6
Const acObjectTypeGraph = 19
Const acObjectTypeHighlight = 23
Const acObjectTypeLine = 1
Const acObjectTypePicture = 7
Const acObjectTypePolygon = 8
Const acObjectTypeRoundFrame = 3
Const acObjectTypeRow = 32
Const acObjectTypeSelection = 24
Const acObjectTypeSignature = 39
Const acObjectTypeStickyNote = 22
Const acObjectTypeTable = 16
Const acObjectTypeText = 5
' acBorderWidth
Const acBorderWidthNone = 0
Const acBorderWidthSimple = 1
Const acBorderWidthDouble = 2
Const acBorderWidthTriple = 3
Const acBorderWidthQuadruple = 4
' FileSaveOptionConstants
Const acFileSaveAll = 0
Const acFileSaveDefault = -1
Const acFileSaveView = 1
Const acFileSaveDesign = 2
Const acFileSavePDFA_7 = 3
Const acFileSavePDFA = 4
Const acFileSavePDF14 = 5
' Constants for Activation codes
Const strLicenseTo = "Amyuni PDF Creator Evaluation"
Const strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
' Initializing PDFCreativeX Object
Dim pdf
Set pdf = CreateObject("PDFCreactiveX.PDFCreactiveX.6")
' Set license key
pdf.SetLicenseKey strLicenseTo, strActivationCode
' Open an existent PDF file
Dim fileName
fileName = "https://www.amyuni.com/downloads/Amyuni%20PDF%20Converter.pdf"
Dim password
password = ""
' Open from Internet
pdf.ObjectAttribute("Document", "UseHTTPForOpenOrSave") = True
pdf.Open fileName, password
' Set CurrentPage
pdf.CurrentPage = 1
' Create a Text in the current Page
pdf.CreateObject acObjectTypeText, "Text1"
' Define Object
Dim oText
Set oText = pdf.GetObjectByName("Text1")
' General Attributes
oText("Left") = 1000
oText("Right") = 5000
oText("Top") = 0
oText("Bottom") = 4000
' Text Attributes
oText("BorderColor") = &HFF00FF
oText("BorderWidth") = acBorderWidthDouble
oText("Text") = "Amyuni Technologies"
' Save locally
pdf.ObjectAttribute("Document", "UseHTTPForOpenOrSave") = False
' Save PDF
pdf.Save "c:\temp\CreatePDFDocument_resulting.pdf", acFileSaveView
' destroy Objects
Set pdf = Nothing
Set oText = Nothing