Following are the properties of the PDF control that are available to the developer. They are divided to different logical sections depending on their usage.
ARRAY: .NET languages, this is an array of type IacObject (IacObject[]). Otherwise, it is a VARIANT, that internally contains an array of IacObjects.
Boolean: this is to signify that logically this is a Boolean value. In practice, this is a long integer value that will be 0 when false, any other value would be interpreted as true. It is recommended, however, to always use the value 1 to represent true.
Color: Color values are integers, and are set by building an integer containing the RGB value.
Property (general) |
Description |
Type |
Values |
Default Value |
---|---|---|---|---|
AutoRefresh |
When set to True, the control is refreshed each time a property is modified. |
Boolean (*) |
True/False |
True |
Copies |
Number of copies to print document. |
System.Int32 |
>= 1 |
1 |
One based index of page currently being displayed. |
System.Int32 |
>= 1 |
1 |
|
DataSource |
Data source to read external data. |
System.String |
Access .MDB file or an ODBC data source |
NULL |
DataSourceEx |
Data source to read external data. This can be used to provide a custom data source. |
acDatabase |
|
|
DataTableOrView |
Main data table or view from which to fetch data. |
System.String |
NULL |
|
Document *ReadOnly |
Document object. |
System.Object |
|
|
Duplex |
Activate duplex printing of document. |
System.Int16 |
0: Printer default. 1: No duplex. 2: Vertical duplex. 3: Horizontal duplex. (value needs to be entered in code, since no enumeration is defined) |
0: Printer default |
FitToParent |
Control sizes itself to fill the form where it is located. |
Boolean (*) |
True/False |
False |
GridView |
Show/Hide table grids. This is valid only for table or form style documents. |
GridViewConstants |
0: acGridViewNone (grids are hidden). 1: acGridViewBoth (show horizontal and vertical grids). 2: acGridViewVertical (show vertical grid). 3: acGridViewHorizontal (show horizontal grid). 4: acGridViewGrid. |
1: acGridViewBoth |
HorzScrollBar |
Displays a horizontal scroll bar when true. |
Boolean (*) |
True/False |
True |
Linearized |
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. |
Boolean (*) |
True/False |
False |
MinimumGap |
Minimum gap in pixels to be displayed between page view and borders. |
System.Int32 |
>= 0 |
30 pixels |
Modified |
Indicates whether the current Page is modified and needs to be saved. |
Boolean (*) |
True/False |
False |
PageCount *ReadOnly |
Number of pages in document. |
System.Int32 |
>= 1 |
1 |
PageLength |
Length of current page in Twips. |
System.Int32 |
|
|
PageWidth |
Width of current page in Twips. |
System.Int32 |
|
|
ParentContainer |
Parent object container. |
acContainer |
||
PrintToFileName |
When set, the document is printed to a file as opposed to a real printer. |
System.String |
NULL |
|
Protected *ReadOnly |
Document is password protected. |
Boolean (*) |
True/False |
False |
Readonly *ReadOnly |
Control is in read-only mode. This is determined by the license key. |
Boolean (*) |
True/False |
|
ReportState |
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 |
ReportView |
Report view option. |
ReportViewConstants |
0: acReportViewPage (Page by page view). 1: acReportViewTable (Table mode). 2: acReportViewPageContinuous(Document views in one long column). 3: acReportViewFacingPages (Two pages at a time). 4: acReportViewFacingPagesContinuous (Document views in two long columns). |
0: acReportViewPage |
RootBookmark *ReadOnly |
Root bookmark for access to whole bookmark tree. |
|||
RulerBackColor
|
Background color for rulers. |
System.Int32 |
|
System dependent |
|
||||
RulerSize |
Height of horizontal ruler and width of vertical ruler in Pixels. |
System.Int16 |
>= 0 |
25 pixels |
ScaleToPrinter |
Scale contents to fit in printed page. |
acScaleConstants |
0: acScaleNone (Do not fit page). 1: acScaleHorizontal (Fit horizontally). 2: acScaleVertical (Fit vertically). 3: acScaleBoth (Fith both vertically and horizontally). 4: acScaleRotatePage (When combined with one of the other options, rotate the printer page if the contents fits better). |
0: acScaleNone |
ScaleToWindow |
Scale contents to fit in window. |
acScaleConstants |
0: acScaleNone (Do not fit page). 1: acScaleHorizontal (Fit horizontally). 2: acScaleVertical (Fit vertically). 3: acScaleBoth (Fith both vertically and horizontally). 4: acScaleRotatePage (When combined with one of the other options, rotate the printer page if the contents fits better). |
0: acScaleNone |
SelectedObject |
Reference to the last selected object. Null if no object is selected. |
|||
SelectedObjectCount |
Number of selected objects. |
System.Int32 |
>= 0 |
0 |
ShowMargins |
Show page margins as thin lines around the page. |
Boolean(*) |
True/False |
True |
StatusBar |
Hide/Display status bar. |
Boolean(*) |
True/False |
True |
TemplateMode |
Set the PDF Creator in template mode. |
Boolean(*) |
True/False |
False |
TemplatePrint |
Specifies whether the template document should be printed or not. |
Boolean(*) |
True/False |
True |
TemplateRepeat |
Specifies whether the pages of the template document should be repeated when the number of pages is less than the main document’s pages. |
Boolean(*) |
True/False |
False |
TemplateVisible |
Specifies whether the template document is visible or hidden. |
Boolean(*) |
True/False |
True |
UsePropertiesDialog |
Specifies whether use Properties Dialog when the option is selected in the Contextual Menu of the object. |
Boolean(*) |
True/False |
False |
VerticalNavigationBar |
Hide/Display vertical navigation bar. |
Boolean(*) |
True/False |
True |
VertScrollBar |
Hide/Display vertical scroll bar. |
Boolean(*) |
True/False |
True |
WantTabs |
When True, Tab keys are handled by the control. |
Boolean(*) |
True/False |
True |
ZoomFactor |
Zoom factor at which document is viewed. |
Boolean(*) |
10 to 1000 |
140 |
Public Class Form1
Dim pdf As AxACPDFCREACTIVEX.AxPDFCreactiveX = New AxACPDFCREACTIVEX.AxPDFCreactiveX()
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Size = New Size(860, 380)
' Add to the form
Me.Controls.Add(pdf)
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator Evaluation"
Const strActivationCode As String = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
' set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode)
' Define the size And location
With pdf
.Size = New Size(500, 300)
.Location = New Point(20, 20)
End With
' Fit page to visible area
pdf.ScaleToWindow = ACPDFCREACTIVEX.acScaleConstants.acScaleBoth
' Start the control annotation mode
pdf.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateAnnotate
' Do Not show the ruler
pdf.RulerSize = 0
End Sub
End Class
public partial class Form1 : Form
{
AxACPDFCREACTIVEX.AxPDFCreactiveX pdf = new AxACPDFCREACTIVEX.AxPDFCreactiveX();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.Size = new Size(860, 380);
// Add to the form
this.Controls.Add(pdf);
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator Evaluation";
const string strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
// Set license key
pdf.SetLicenseKey(strLicenseTo, strActivationCode);
// Define the size And location
pdf.Size = new Size(500, 300);
pdf.Location = new Point(20, 20);
// Fit page to visible area
pdf.ScaleToWindow = ACPDFCREACTIVEX.acScaleConstants.acScaleBoth;
// Start the control annotation mode
pdf.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateAnnotate;
// Do Not show the ruler
pdf.RulerSize = 0;
}
}