Toolkit 2011

Alphabetical List
AddBookmarks
AddComment
AddRelatedQuery
Author
BBHeight
BBLeft
BBTop
BBWidth
ClearHeaderInfo
ClearQueries
CloseOutputFile
CopyForm
CreateCertificate
CreateDate
Creator
DBToForm
DoFormFormatting
DrawTo
EmbedFlashFile
EncryptFile
EncryptFile128
EncryptFileAES
ExportComments
ExportFormAsXML
FieldInfo
FindCertificate
FlattenRemainingFormFields
ForceColorReset
ForceHeaderColorReset
FormNumbering
GetBoundingBox
GetHeaderTextWidth
GetInputPageRotation
GetPDFInfo
GetTextWidth
GetUniqueFileName
GreyBar
ImageRotation
ImageToPDF
InputByteArray
InputByteStream
InvisiblySignFile
IsFileLinearized
JPEGToPDF
Keywords
LinearizeFile
LineWidth
LoadDBMapFile
MergeFile
ModDate
MoveTo
NewPage
NumPages
OpenInputFile
OpenOutputFile
OutputByteStream
OutputLinearized
OutputPageHeight
OutputPageWidth
PrintImage
PrintJPEG
PrintMultilineText
PrintText
PrintTIFF
Producer
ReadOnlyOnMerge
RelatedQuerySeparator
ResetFormFields
ResetHeaderTextColor
ResetHeaderTextTransparency
ResetTextColor
ResetTextTransparency
SaveMemoryToDisk
SetDBInputTemplate
SetDBMultiRowSeparator
SetDefaultDBMergeFlag
SetFont
SetFormFieldData
SetHeaderFont
SetHeaderGreyBar
SetHeaderHLine
SetHeaderImage
SetHeaderJPEG
SetHeaderMultilineText
SetHeaderRotation
SetHeaderText
SetHeaderTextBackground
SetHeaderTextColor
SetHeaderTextColorCMYK
SetHeaderTextFillMode
SetHeaderTextStrokeColor
SetHeaderTextStrokeColorCMYK
SetHeaderTextTransparency
SetHeaderTIFF
SetHeaderVLine
SetHeaderWPgNbr
SetInfo
SetInputBookmark
SetMasterQuery
SetOutputSecurity
SetOutputSecurity128
SetOutputSecurityAES
SetTextColor
SetTextColorCMYK
SetTextFillMode
SetTextRotation
SetTextStrokeColor
SetTextStrokeColorCMYK
SetTextTransparency
SetViewerPreferences
SignExistingField
SignOutputFile
Subject
TIFFToPDF
Title
ToolkitVersion
VisiblySignFile
XMLSetFormFieldData
Annotations
AddComment
ExportComments
Bookmarks
AddBookmarks
SetInputBookmark
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
ReadOnlyOnMerge
Metadata
Author
CreateDate
Creator
GetPDFInfo
Keywords
ModDate
Producer
SetInfo
Subject
Title
PDF Information
BBHeight
BBLeft
BBTop
BBWidth
GetBoundingBox
GetInputPageRotation
NumPages
Page Control
OutputPageHeight
OutputPageWidth
Pages
CopyForm
NewPage
Security (PDF)
EncryptFile
EncryptFile128
EncryptFileAES
SetOutputSecurity
SetOutputSecurity128
SetOutputSecurityAES
Stamping
ClearHeaderInfo
ForceColorReset
ForceHeaderColorReset
GetHeaderTextWidth
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
View
SetViewerPreferences
Web View
IsFileLinearized
LinearizeFile
OutputLinearized

CloseOutputFile

Example code is for an older version of Toolkit, newer code is available.
// Copyright (c) 2019 ActivePDF, Inc.
// ActivePDF Toolkit 2011
// Example generated 07/21/19 

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 intOpenOutputFile;
    int intOpenInputFile;
    int intCopyForm;
    
    strPath = System.AppDomain.CurrentDomain.BaseDirectory;

    // Instantiate Object
    APToolkitNET.Toolkit oTK = new APToolkitNET.Toolkit();
    
    // Here you can place any code that will alter the output file
    // Such as adding security, setting page dimensions, etc.
    
    // Create the new PDF file
    intOpenOutputFile = oTK.OpenOutputFile(strPath + "new.pdf");
    if (intOpenOutputFile != 0)
    {
      ErrorHandler("OpenOutputFile", intOpenOutputFile);
    }
    
    // Open the template PDF
    intOpenInputFile = oTK.OpenInputFile(strPath + "PDF.pdf");
    if (intOpenInputFile != 0)
    {
      ErrorHandler("OpenInputFile", intOpenInputFile);
    }
    
    // Here you can call any Toolkit functions that will manipulate
    // the input file such as text and image stamping, form filling, etc.
    
    // Copy the template (with any changes) to the new file
    // Start page and end page, 0 = all pages
    intCopyForm = oTK.CopyForm(0, 0);
    if (intCopyForm != 1)
    {
      ErrorHandler("CopyForm", intCopyForm);
    }
    
    // Close the new file to complete PDF creation
    oTK.CloseOutputFile();
    
    // 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 © 2019 ActivePDF, Inc