Toolkit 2017

Alphabetical List
AddBookmarks
AddComment
AddExternalLinkBookmark
AddFieldsToXMP
AddInternalLinkBookmark
AddLaunchBookmark
AddRelatedQuery
AddTextBookmark
AddURLBookmark
Author
BoundingBoxHeight
BoundingBoxLeft
BoundingBoxTop
BoundingBoxWidth
CenterWindow
ClearHeaderInfo
ClearPDFSecurity
ClearQueries
CloseOutputFile
CopyForm
CreateCertificate
CreateDate
Creator
DBToForm
DecryptPDF
DoFormFormatting
DrawTo
EmbedFlashFile
EncryptPDF
ExportComments
ExportFormAsXML
FieldInfo
FindCertificate
FlattenRemainingFormFields
ForceColorReset
ForceHeaderColorReset
FormNumbering
FullScreen
GetBoundingBox
GetCustomProperty
GetDisplayValue
GetDocumentProperty
GetExportValue
GetHeaderTextWidth
GetInitialViewInfo
GetInputPageRotation
GetPDFInfo
GetTextHeight
GetTextWidth
GetUniqueFileName
GetUserProperty
GetXMPFieldInfo
GetXmpManager
GotoNextBookmarkLevel
GotoPreviousBookmarkLevel
GreyBar
Height
HideMenuBar
HideToolBars
HideWindowControls
ImageRotation
ImageToPDF
InputByteArray
InputByteStream
Instance
InvisiblySignFile
IsFileLinearized
ItemsSize
JPEGToPDF
Keywords
LinearizeFile
LineWidth
LoadDBMapFile
Magnification
MergeFile
MergeFiles
ModDate
MoveTo
Name
NavigationTab
NewPage
NumPages
OpenInputFile
OpenOutputFile
OpenToPage
OutputByteStream
OutputLinearized
OutputPageHeight
OutputPageWidth
PageLayout
PageNum
PrintImage
PrintJPEG
PrintMultilineText
PrintText
PrintTIFF
Producer
ReadOnlyOnMerge
RelatedQuerySeparator
RemoveCustomProperty
RemoveDocumentProperty
RemoveUserProperty
Reset
ResetFormFields
ResetHeaderTextColor
ResetHeaderTextTransparency
ResetTextColor
ResetTextTransparency
ResizeWindow
SaveMemoryToDisk
SetCustomProperty
SetDBInputTemplate
SetDBMultiRowSeparator
SetDefaultDBMergeFlag
SetDocumentProperty
SetFont
SetFormFieldData
SetHeaderFont
SetHeaderGreyBar
SetHeaderHLine
SetHeaderImage
SetHeaderJPEG
SetHeaderMultilineText
SetHeaderRotation
SetHeaderText
SetHeaderTextBackground
SetHeaderTextColor
SetHeaderTextColorCMYK
SetHeaderTextFillMode
SetHeaderTextStrokeColor
SetHeaderTextStrokeColorCMYK
SetHeaderTextTransparency
SetHeaderTIFF
SetHeaderVLine
SetHeaderWPgNbr
SetInfo
SetInputBookmark
SetMasterQuery
SetNamespace
SetPDFCompression
SetPDFSecurity
SetTextColor
SetTextColorCMYK
SetTextFillMode
SetTextRotation
SetTextStrokeColor
SetTextStrokeColorCMYK
SetTextTransparency
SetUserProperty
Show
SignExistingField
SignOutputFile
Subject
TIFFToPDF
Title
ToolkitVersion
Type
Value
VisiblySignFile
Width
X
XMLSetFormFieldData
Y
Annotations
AddComment
ExportComments
Bookmarks
AddBookmarks
AddExternalLinkBookmark
AddInternalLinkBookmark
AddLaunchBookmark
AddTextBookmark
AddURLBookmark
GotoNextBookmarkLevel
GotoPreviousBookmarkLevel
SetInputBookmark
Compression
SetPDFCompression
Convert to PDF
ImageToPDF
JPEGToPDF
TIFFToPDF
Database
AddRelatedQuery
ClearQueries
LoadDBMapFile
RelatedQuerySeparator
SetDBInputTemplate
SetDBMultiRowSeparator
SetDefaultDBMergeFlag
SetMasterQuery
Debug
ToolkitVersion
Digital Certificates
CreateCertificate
FindCertificate
InvisiblySignFile
SignExistingField
SignOutputFile
VisiblySignFile
Drawing
DrawTo
GreyBar
LineWidth
MoveTo
SetHeaderGreyBar
SetHeaderHLine
SetHeaderVLine
Fields
DBToForm
DoFormFormatting
ExportFormAsXML
FieldInfo
FlattenRemainingFormFields
FormNumbering
ResetFormFields
SetFormFieldData
XMLSetFormFieldData
File Input
OpenInputFile
File Output
CloseOutputFile
GetUniqueFileName
OpenOutputFile
Flash
EmbedFlashFile
Memory
InputByteArray
InputByteStream
OutputByteStream
SaveMemoryToDisk
Merging
MergeFile
MergeFiles
ReadOnlyOnMerge
Metadata
Author
CreateDate
Creator
GetPDFInfo
Keywords
ModDate
Producer
SetInfo
Subject
Title
PDF Information
BoundingBoxHeight
BoundingBoxLeft
BoundingBoxTop
BoundingBoxWidth
GetBoundingBox
GetInputPageRotation
NumPages
Page Control
OutputPageHeight
OutputPageWidth
Pages
CopyForm
NewPage
Security (PDF)
ClearPDFSecurity
DecryptPDF
EncryptPDF
SetPDFSecurity
Stamping
ClearHeaderInfo
ForceColorReset
ForceHeaderColorReset
GetHeaderTextWidth
GetTextHeight
GetTextWidth
ImageRotation
PrintImage
PrintJPEG
PrintMultilineText
PrintText
PrintTIFF
ResetHeaderTextColor
ResetHeaderTextTransparency
ResetTextColor
ResetTextTransparency
SetFont
SetHeaderFont
SetHeaderImage
SetHeaderJPEG
SetHeaderMultilineText
SetHeaderRotation
SetHeaderText
SetHeaderTextBackground
SetHeaderTextColor
SetHeaderTextColorCMYK
SetHeaderTextFillMode
SetHeaderTextStrokeColor
SetHeaderTextStrokeColorCMYK
SetHeaderTextTransparency
SetHeaderTIFF
SetHeaderWPgNbr
SetTextColor
SetTextColorCMYK
SetTextFillMode
SetTextRotation
SetTextStrokeColor
SetTextStrokeColorCMYK
SetTextTransparency
Unknown
HideToolBars
View
CenterWindow
FullScreen
GetInitialViewInfo
HideMenuBar
HideWindowControls
Magnification
NavigationTab
OpenToPage
PageLayout
Reset
ResizeWindow
Show
Web View
IsFileLinearized
LinearizeFile
OutputLinearized
XMP
AddFieldsToXMP
GetCustomProperty
GetDisplayValue
GetDocumentProperty
GetExportValue
GetUserProperty
GetXMPFieldInfo
GetXmpManager
Height
Instance
ItemsSize
Name
PageNum
RemoveCustomProperty
RemoveDocumentProperty
RemoveUserProperty
SetCustomProperty
SetDocumentProperty
SetNamespace
SetUserProperty
Type
Value
Width
X
Y

Height

Example code is for an older version of Toolkit, newer code is available.
// Copyright (c) 2017 ActivePDF, Inc.
// ActivePDF Toolkit 2017
// Example generated 12/12/17 

using System;

// Make sure to add the ActivePDF product .NET DLL(s) to your application.
// .NET DLL(s) are typically found in the products 'bin' folder.

class Examples
{
  public static void Example()
  {
    string strPath;
    int intOpenInputFile;
    string strFieldInfo;
    long longFieldInfo;
    float floatFieldInfo;
    
    strPath = System.AppDomain.CurrentDomain.BaseDirectory;

    // Instantiate Object
    APToolkitNET.Toolkit oTK = new APToolkitNET.Toolkit();
    
    // Open the PDF to read from
    intOpenInputFile = oTK.OpenInputFile(strPath + "xmpfields.pdf");
    if (intOpenInputFile != 0)
    {
      ErrorHandler("OpenInputFile", intOpenInputFile);
    }
    
    // Get the reference to the XMP object
    APToolkitNET.XMPManager oXMP = oTK.GetXMPManager();
    
    // Get a field instances from the XMP data
    APToolkitNET.XMPFieldInfo oXMPField = oXMP.GetXMPFieldInfo("name");
    
    // Get field properties and write them out
    strFieldInfo = oXMPField.Name;
    WriteResults(strFieldInfo);
    strFieldInfo = oXMPField.Type;
    WriteResults(strFieldInfo);
    strFieldInfo = oXMPField.Value;
    WriteResults(strFieldInfo);
    longFieldInfo = oXMPField.Instance;
    WriteResults(longFieldInfo.ToString());
    longFieldInfo = oXMPField.PageNum;
    WriteResults(longFieldInfo.ToString());
    
    // Bottom left of the field with the height and width
    floatFieldInfo = oXMPField.LLX;
    WriteResults(floatFieldInfo.ToString());
    floatFieldInfo = oXMPField.LLY;
    WriteResults(floatFieldInfo.ToString());
    floatFieldInfo = oXMPField.Width;
    WriteResults(floatFieldInfo.ToString());
    floatFieldInfo = oXMPField.Height;
    WriteResults(floatFieldInfo.ToString());
    
    // Combo box or list box items list count
    // count will be 0 for other field types
    longFieldInfo = oXMPField.ItemsSize;
    WriteResults(longFieldInfo.ToString());
    
    // For options available to dropdown fields
    strFieldInfo = oXMPField.GetDisplayValue(1);
    WriteResults(strFieldInfo);
    strFieldInfo = oXMPField.GetExportValue(1);
    WriteResults(strFieldInfo);
    
    // Close the input file
    oTK.CloseInputFile();
    
    // Release Object
    oTK.Dispose();
    
    // Process Complete
    WriteResults("Done!");
  }
  
  // Error Handling
  public static void ErrorHandler(string strMethod, object rtnCode)
  {
    WriteResults(strMethod + " error:  " + rtnCode.ToString());
  }
  
  // Write output data
  public static void WriteResults(string content)
  {
    // Choose where to write out results
  
    // Debug output
    //System.Diagnostics.Debug.WriteLine("ActivePDF: * " + content);
  
    // Console
    Console.WriteLine(content);
  
    // Log file
    //using (System.IO.TextWriter writer = new System.IO.StreamWriter(System.AppDomain.CurrentDomain.BaseDirectory + "application.log", true))
    //{
    //    writer.WriteLine("[" + DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss") + "]: => " + content);
    //}
  }
}

Copyright © 2017 ActivePDF, Inc