43
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
>0
Logo added successfully. This is the logo index number.
Syntax
object.AddLogo LogoFileName, Background
The AddLogo method has these required parts:
Part
Value Type
Description
Object
An expression of the Toolkit object.
LogoFileName
String
The full path to the PDF file of which Toolkit creates a
PDF Logo.
Background
Short
1= Add PDF Logo in background.
0 = Add PDF Logo in foreground. (Default.)
NOTE: If the pages merged from an existing PDF are
not transparent, the merged page covers a PDF Logo
placed in the background. Similarly, if the source page
for the PDF Logo is not transparent, the PDF Logo
placed in the foreground covers the page underneath.
Remarks
Toolkit aligns the lower-left corner (0,0) of the PDF Logo to the lower-left corner (0,0) of the new or
existing page. If the new or existing page is smaller than the PDF Logo, the image will bleed past the
top and right edges.
Toolkit uses a predefined identifier, /Xqx, for the corresponding XObject inside the PDF file. As a result,
you can apply the same PDF Logo to multiple PDF documents, but you cannot apply a PDF Logo to a
PDF that already contains a PDF Logo.
AddPostScriptComment
Description
A PostScript (PS) comment is a command added to the PS stream of the PDF, which executes upon
exporting to PS or printing the document. AddPostScriptComment instructs Toolkit to add a PS
comment to the current output PDF.
Return type
None
Syntax
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
48
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
object.AddPostscriptComment PostscriptComment
The AddPostscriptComment method has these required parts:
Part
Value Type
Description
Object
An expression of the Toolkit object.
PostscriptComment
String
The PS stream to insert into the output PDF.
AddRelatedQuery
Description
The organized structure of a database enables the easy request of information, or query, based on the
columns and rows. AddRelatedQuery instructs Toolkit to perform the master query specified with
SetMasterQuery again, replacing the original variable with the related variable. Toolkit appends the
data to the original query.
Return type
None
Syntax
object.AddRelatedQuery ConnectionString, UserID, Password, Options, QueryString,
MultiRows
The AddRelatedQuery method has these required parts:
Part
Value Type
Description
Object
An expression of the Toolkit object.
ConnectionString
String
The connection string used to connect to the database.
For example connection strings, see below.
UserID
String
The User ID required by your connection.
Password
String
The password required by your connection.
Options
Long
This should be set to -1.
QueryString
String
The SQL query string to execute.
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
48
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
MultiRows
Long
Indicates whether the related query is a one-to-many
query.
Connection Strings
The following are some common examples of connection string values.
ConnectionString
Example Value
Using a named DSN
"DSN=MyDatabase;"
Microsoft Access using the
ODBC
Driver"DBQ=C:\InetPub\database\donations.mdb;Driver={Microsoft
Access Driver(*.mdb)};"
Microsoft Access using the
Access OLEDB driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source
C:\InetPub\database\donations.mdb;"
SQL Server using the
ODBC driver
"Driver={SQL Server};Server=activePDF;Database= pubs;Uid=sa;
Pwd=;"
SQL Server using the
OLEDB driver
"PROVIDER=SQLOLEDB;DATA SOURCE=ServerName;DATABASE=
pubs;USER ID=sa;PASSWORD=;"
Remarks
To specify the master query variable to replace, you will need to enclose the related variable in pipe
characters ("|") or the RelatedQuerySeparator . For example, if your master query selects an OrderID
from the sales table and your related query selects the description of the order from the sales table,
you might use the following script:
Select * from OrderDetails where OrderId='|OrderID|'
If you want to cancel all queries, you can call ClearQueries.
Example CF
Public Sub ExampleCodeForAddRelatedQuery()
<CFSET TK.AddRelatedQuery "DBQ=C:\InetPub\database\donations.mdb;Driver={Microsoft
Access Driver (*.mdb)};", "admin", "", -1, "Select * from OrderDetails where
OrderID='|OrderID|'">
End Sub
AddTextBookmark
Description
AddTextBookmark instructs Toolkit to create a text-only bookmark in the current output file. This is
useful for grouping multiple bookmarks on a similar topic or categorizing bookmarks into more
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
41
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
manageable sections. For example, if you have multiple bookmarks relating to topic "A", you can
create a higher-level bookmark named "Topic A". The lower-level bookmarks under "Topic A" are only
viewable in the bookmark window when you click the text-only bookmark to expand the topic.
Return type
None
Syntax
object.AddTextBookmark BookmarkText
The AddTextBookmark method has these required parts:
Part
Value Type
Description
Object
An expression of the Toolkit object.
BookmarkText
String
The text to add as a bookmark.
Remarks
You can generate bookmarks after adding a page. By default, Toolkit generates bookmarks at the
highest level of the topic tree. You can call GotoNextBookmarkLevel or GotoPreviousBookmarkLevel
prior to any bookmark method to control its level in the tree.
AddToStream
Description
<<OnlyPro>> AddToStream instructs Toolkit to add additional bytes the existing PDF Stream.
NOTE: This method requires a strong understanding of PDF code. activePDF does not support
functionality or features implemented by adding PDF code.
Return type
Long
Syntax
object.AddToStream Data, PageNr
The AddToStream method has these required parts:
Part
Value Type
Description
Data
String
The PDF code added to the stream.
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
39
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
PageNr
Long
Optional.
0 = The action will take place on the new or current open page
of the input file or cover. (Default)
>1 = The action will occur on the specified page number.
-1 = The action will occur on all pages.
AddURLBookmark
Description
AddURLBookmark instructs Toolkit to create a bookmark in the current output file that connects to an
external URL.
Return type
None
Syntax
object.AddURLBookmark BookmarkText, URL
The AddURLBookmark method has these required parts:
Part
Value Type
Description
Object
An expression of the Toolkit object.
BookmarkText
String
The text to add as a bookmark.
URL
String
The destination URL specified as the endpoint of the link.
Remarks
You can generate bookmarks after adding a page. By default, Toolkit generates bookmarks at the
highest level of the topic tree. You can call GotoNextBookmarkLevel or GotoPreviousBookmarkLevel
prior to any bookmark method to control its level in the tree.
BinaryImage
Description
Returns the PDF as an array of bytes suitable for Response.BinaryWrite.
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
31
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
Return type
Variant
Description
The specified PDF as an array of bytes.
Syntax
value = object.BinaryImage
The BinaryImage method has this part:
Part
Description
Object
An expression of the Toolkit object.
ClearHeaderInfo
Description
Clears the variables used for setting the attributes that are used in SetHeader methods. Also clears
the content stream that paints logos or images without deleting the logo or image from memory.
Return type
None
Syntax
object.ClearHeaderInfo
The ClearHeaderInfo method has this part:
Part
Description
Object
An expression of the Toolkit object.
ClearLogosAndImages
Description
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
33
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
ClearLogosAndImages clears the variables created by the Image and Logo methods without clearing
the content stream.
Return type
None
Syntax
object.ClearLogosAndImages
The ClearLogosAndImages method has this part:
Part
Description
Object
An expression of the Toolkit object.
ClearQueries
Description
Clears and closes the connections made during calls to SetMasterQuery and AddRelatedQuery.
Return type
None
Syntax
object.ClearQueries
The ClearQueries method has this part:
Part
Description
Object
An expression of the Toolkit object.
CloseInputFile
Description
CloseInputFile instructs Toolkit to close the currently open input file.
Return type
None
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
35
activePDF Toolkit <<Lite>><<Standard>><<Professional>> Edition
Syntax
object.CloseInputFile
The CloseInputFile method has this part:
Part
Description
Object
An expression of the Toolkit object.
CloseOutputFile
Description
<<InLite>> <<LiteOnly>>CloseOutputFile instructs Toolkit to close the currently open output file.
NOTE: You should only use CloseOutputFile after you make all desired changes to the output file. You
will need to recreate a new output file for additional changes.
<<Standard>> CloseOutputFile instructs Toolkit to close the currently open output file. If an input file
is currently open, Toolkit closes this file as well.
<<Standard>> NOTE: You should only use CloseOutputFile after you make all desired changes to
the output file. Any additional changes will require you to reopen the file.
Return type
None
Syntax
object.CloseOutputFile
The CloseOutputFile method has this part:
Part
Description
Object
An expression of the Toolkit object.
Example
'CloseOutputFile Example
Set TK = CreateObject("APToolkit.Object")
r = TK.OpenOutputFile("CloseOutputFile.pdf")
aptk4b 21705
Copyright 2005, activePDF, Inc. All Rights Reserved.
<<page#>>Insert
last
'Set the font for the text
Documents you may be interested
Documents you may be interested