c# pdfdocument : Add bookmarks to pdf reader Library SDK component .net asp.net web page mvc Common%20Driver%20Interface%203000-part1106

Amyuni DocumentConverter
XPS –PDF –HTML –RTF –Excel®–JPeg–TIFF™ Converters
Version 3.0 Professional
For Windows98, Me, NT4, 2000, XP/2003 32-bits, XP/2003 64-bits, Vista
Developer’s Manual
Updated June2007
AmyuniConsultants –Amyuni Technologies
http://www.amyuni.com
Add bookmarks to pdf reader - add, remove, update PDF bookmarks in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Empower Your C# Project with Rapid PDF Internal Navigation Via Bookmark and Outline
excel print to pdf with bookmarks; create bookmarks pdf files
Add bookmarks to pdf reader - VB.NET PDF bookmark library: add, remove, update PDF bookmarks in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Empower Your VB.NET Project with Rapid PDF Internal Navigation Via Bookmark and Outline
bookmark pdf in preview; bookmarks pdf reader
2
Contents
Legal Information.........................................................................................................................................7
Acknowledgments.........................................................................................................................................7
Introduction..................................................................................................................................................8
Using the developer version of the Document Converter Products...............................................................8
New In Version 3.0......................................................................................................................................10
DLL Interface.............................................................................................................................................11
Printer Installation and Activation......................................................................................................................12
DriverInit Function................................................................................................................................13
PDFDriverInit, HTMLDriverInit, RTFDriverInit, EMFDriverInit Functions..........................................14
DriverEnd Function...............................................................................................................................15
CDISetDefaultPrinter Function..............................................................................................................16
RestoreDefaultPrinter Function..............................................................................................................17
EnablePrinter Function..........................................................................................................................18
GetVersionInformation Function...........................................................................................................20
SetPrinterAttributes, GetPrinterAttributes Functions..............................................................................21
SetPrinterLanguage, GetPrinterLanguage Functions..............................................................................24
Printer Configuration..........................................................................................................................................25
SetDefaultDirectoryFunction................................................................................................................26
SetDefaultFileName Function................................................................................................................27
SetFileNameOptions Function...............................................................................................................28
SetPaperSize, GetPaperSize Functions...................................................................................................30
SetPaperWidth, GetPaperWidth, SetPaperLength, GetPaperLength Functions.......................................31
SetOrientation, GetOrientation Functions..............................................................................................32
SetResolution, GetResolution Functions................................................................................................33
SetJPEGCompression, GetJPEGCompression Functions.......................................................................34
SetJPegLevel, GetJPegLevel Functions.................................................................................................35
SetFontEmbedding, GetFontEmbedding Functions................................................................................36
SetHorizontalMargin, GetHorizontalMargin, SetVerticalMargin, GetVerticalMargin Functions............37
SetColorProfile Method.........................................................................................................................38
SetImageOptions, GetImageOptions......................................................................................................39
SetSimPostscript, GetSimPostscript.......................................................................................................40
SetWatermark Function.........................................................................................................................41
SetPrinterParamStr, GetPrinterParamStr, SetPrinterParamInt, GetPrinterParamInt Functions................43
Disabling Printing from certain Applications.........................................................................................46
SetDefaultConfig, SetDefaultConfigEx Functions.................................................................................47
SetPrinterConfig Method.......................................................................................................................48
Encryption Property...............................................................................................................................49
OwnerPassword Property.......................................................................................................................50
UserPassword Property..........................................................................................................................51
Permissions Property.............................................................................................................................52
C# PDF File Compress Library: Compress reduce PDF size in C#.net
Bookmarks. Comments, forms and multimedia. Flatten visible layers. C#.NET DLLs: Compress PDF Document. Add necessary references: RasterEdge.Imaging.Basic.dll.
bookmark a pdf file; excel pdf bookmarks
VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
document file. Remove bookmarks, annotations, watermark, page labels and article threads from PDF while compressing. Also a preview
convert word pdf bookmarks; export excel to pdf with bookmarks
3
Email Fucntions...................................................................................................................................................53
SetEmailFieldFrom, SetEmailFieldTo, SetEmailFieldCC, SetEmailFieldBCC, SetEmailSubject, 
SetEmailMessage, SetEmailPromptFunctions.......................................................................................54
SetEmailOptions,GetEmailOptions Functions.......................................................................................55
SetSmtpServer, SetSmtpPort Functions.................................................................................................57
SendMail, SendMailW Functions..........................................................................................................58
SendSmtpMail, SendSmtpMailW Functions..........................................................................................59
Print Job Locking Functions...............................................................................................................................60
Lock Function.......................................................................................................................................61
Unlock Function....................................................................................................................................63
TestLock Method..................................................................................................................................64
GLock Method......................................................................................................................................65
GUnLock Method..................................................................................................................................66
SetDocFileProps Function.....................................................................................................................67
PDF File Processing.............................................................................................................................................68
PDF/A Support......................................................................................................................................69
ConcatenateFiles Function.....................................................................................................................70
MergeFiles Function..............................................................................................................................71
SetLicenseKeyA, SetLicenseKeyW Functions.......................................................................................72
GetCompression, SetCompression Functions.........................................................................................73
EncryptPDFDocument, EncryptPDFDocument128 Functions................................................................75
LinearizePDFDocument Function..........................................................................................................77
PrintPDFDocument, PrintPDFDocumentEx Functions...........................................................................78
PDF2RTF Function...............................................................................................................................79
PDF2HTML Function...........................................................................................................................80
PDF2EXCEL Function..........................................................................................................................81
PDF2JPEG Function..............................................................................................................................82
PDF2TIFF Function..............................................................................................................................83
PDF2XPS Function...............................................................................................................................84
General Functions................................................................................................................................................85
CDICreateDC Function.........................................................................................................................86
SetBookmark Function..........................................................................................................................87
SetHyperlink Function...........................................................................................................................88
GetLastErrorMsg Function....................................................................................................................89
BatchConvertEx Function......................................................................................................................90
Printer Driver Message Handling........................................................................................................................91
PDF Driver Event Message....................................................................................................................92
SendMessagesTo Function....................................................................................................................95
GetDocumentTitle Function..................................................................................................................96
GetGeneratedFilename Function............................................................................................................97
VB.NET PDF File Split Library: Split, seperate PDF into multiple
Add necessary references: The following VB.NET codes explain how to split a PDF file into multiple ones by PDF bookmarks or outlines.
bookmarks pdf; bookmarks pdf documents
C# PDF File Split Library: Split, seperate PDF into multiple files
Add necessary references: RasterEdge.Imaging.Basic.dll. The following C# codes explain how to split a PDF file into multiple ones by PDF bookmarks or outlines.
bookmarks pdf file; how to create bookmark in pdf automatically
4
ActiveX Interface........................................................................................................................................98
PrinterInstallation and Activation.....................................................................................................................100
CDIntfEx.DriverInit Method...............................................................................................................101
CDIntfEx.PDFDriverInit, CDIntfEx.HTMLDriverInit, CDIntfEx.RTFDriverInit Methods,  
CDIntfEx.EMFDriverInit.....................................................................................................................102
CDIntfEx.DriverEnd Method...............................................................................................................103
CDIntfEx.SetDefaultPrinter Method....................................................................................................104
CDIntfEx.RestoreDefaultPrinter Method.............................................................................................105
CDIntfEx.EnablePrinter Method..........................................................................................................106
CDIntfEx.GetVersionInformation Method...........................................................................................108
CDIntfEx.PrinterAttributes Property....................................................................................................109
CDIntfEx.PrinterLanguage Property....................................................................................................110
Printer Configuration.........................................................................................................................................111
CDIntfEx.DefaultDirectoryProperty...................................................................................................112
CDintfEx.DefaultFileName Property...................................................................................................113
CDIntfEx.FileNameOptions, CDIntfEx.FileNameOptionsEx Properties..............................................114
CDIntfEx.PaperSize Property..............................................................................................................116
CDIntfEx.PaperWidth, CDIntfEx.PaperLength Properties...................................................................117
CDIntfEx.Orientation Property............................................................................................................118
CDIntfEx.Resolution Property.............................................................................................................119
CDIntfEx.JPEGCompression Property.................................................................................................120
CDIntfEx.JPegLevel Property..............................................................................................................121
CDIntfEx.FontEmbedding Property.....................................................................................................122
CDIntfEx.PageContentCompression Property......................................................................................123
CDIntfEx.HorizontalMargin, CDIntfEx.VerticalMargin Properties......................................................124
CDIntfEx.SetWatermark Method.........................................................................................................125
CDIntfEx.SetColorProfile Method.......................................................................................................127
CDIntfEx.ImageOptions Property........................................................................................................128
CDIntfEx.SimPostscript Property........................................................................................................129
CDIntfEx.PrinterParamStr, CDIntfEx.PrinterParamInt Properties........................................................130
CDIntfEx.SetPrinterParamStr, CDIntfEx.SetPrinterParamInt, CDIntfEx.GetPrinterParamStr, 
CDIntfEx.GetPrinterParamInt Methods...............................................................................................130
Disabling Printing from certain Applications.......................................................................................133
CDIntfEx.SetPrinterConfig Method.....................................................................................................134
CDIntfEx.SetDefaultConfig, CDIntfEx.SetDefaultConfigEx Methods.................................................135
CDIntfEx.Encryption Property.............................................................................................................136
CDIntfEx.OwnerPassword Property....................................................................................................137
CDIntfEx.UserPassword Property........................................................................................................138
CDIntfEx.Permissions Property...........................................................................................................139
.NET PDF SDK | Read & Processing PDF files
provided by this .NET Imaging PDF Reader Add-on Able to convert PDF documents into other formats Include extraction of text, hyperlinks, bookmarks and metadata;
how to bookmark a pdf file; how to add a bookmark in pdf
.NET PDF SDK - Description of All PDF Processing Control Feastures
Full page navigation, zooming & rotation; Outlines, bookmarks, & thumbnail display; PDF Text Write & Extract. Insert and add text to any page of PDF document with
create bookmarks pdf file; how to create bookmarks in pdf file
5
Email Fucntions..................................................................................................................................................140
SetEmailFieldFrom, SetEmailFieldTo, SetEmailFieldCC, SetEmailFieldBCC, SetEmailSubject, 
SetEmailMessage, SetEmailPromptFunctions.....................................................................................141
SetEmailOptions, GetEmailOptions Functions.....................................................................................142
SetDocEmailProps Method..................................................................................................................144
SetDocEmailPropsEx Method.............................................................................................................145
SetSmtpServer, SetSmtpPort Functions...............................................................................................146
SendMail, SendMailW Functions........................................................................................................147
SendSmtpMail, SendSmtpMailW Functions........................................................................................148
Print Job Locking Functions..............................................................................................................................149
CDIntfEx.Lock Method.......................................................................................................................150
CDIntfEx.Unlock Method....................................................................................................................152
CDIntfEx.TestLock Method................................................................................................................153
CDIntfEx.GLock Method....................................................................................................................154
CDIntfEx.GUnLock Method...............................................................................................................155
CDIntfEx.SetDocFileProps Method.....................................................................................................156
PDF File Processing............................................................................................................................................157
PDF/A Support....................................................................................................................................158
Document.Title, Document.Subject, Document.Creator, Document.Author, Document.KeyWords 
Properties............................................................................................................................................159
Document.PageMode Property............................................................................................................160
Document.Rotate Property...................................................................................................................161
Document.PageCount Method.............................................................................................................162
Document.Open, Document.OpenEx Methods.....................................................................................163
Document.Save Method.......................................................................................................................164
Document.SetBookmark Method.........................................................................................................165
Document.SetBookmarkXY Method...................................................................................................166
Document.ClearBookmarks Method....................................................................................................167
Document.AutoBookmarks Method.....................................................................................................168
Document.SearchText Method.............................................................................................................169
Document.SearchTextEx Method........................................................................................................170
Document.Append, Document.AppendEx Methods.............................................................................171
Document.Split Method.......................................................................................................................172
Document.SplitXY Method.................................................................................................................173
Document.Merge, Document.MergeEx Methods.................................................................................174
Document.Encrypt, Document.Encrypt128 Methods............................................................................176
Document.SetHyperlinkURL Method..................................................................................................178
Document.SetHyperlinkInternal Method..............................................................................................179
Document.AutoHyperlinks Method.....................................................................................................180
Document.AutoHyperlinksEx Method.................................................................................................181
Document.SetFlateCompression Method.............................................................................................182
Document.DigitalSignature method.....................................................................................................183
Document.Linearized Property............................................................................................................185
Document.Optimize Method................................................................................................................186
Document.ExportToRTF Method........................................................................................................187
Document.ExportToHTML Method....................................................................................................188
Document.ExportToHTMLEx Method................................................................................................189
XDoc.Word for .NET, Advanced .NET Word Processing Features
page navigation, zooming & rotation; Outlines, bookmarks, & thumbnail Convert Word to PDF; Convert Word to HTML5; Convert Add and insert a blank page or multiple
add bookmarks to pdf file; edit pdf bookmarks
XDoc.PowerPoint for .NET, All Mature Features Introductions
navigation, zooming & rotation; Outlines, bookmarks, & thumbnail Convert PowerPoint to PDF; Convert PowerPoint to HTML5; Add a blank page or multiple pages to
bookmarks pdf files; acrobat split pdf bookmark
6
Document.ExportToEXCEL Method...................................................................................................191
Document.ExportToJPEG Method.......................................................................................................192
Document.ExportToTIFF Method.......................................................................................................193
Document.ExportToXPS Method........................................................................................................194
Document.Print Method.......................................................................................................................195
Document.SetLicenseKey Method.......................................................................................................197
General Functions...............................................................................................................................................198
CDIntfEx.CreateDC Function..............................................................................................................199
CDIntfEx.SetBookmark Method..........................................................................................................200
CDIntfEx.SetHyperlink Method..........................................................................................................201
CDIntfEx.GetLastErrorMsg Method....................................................................................................202
CDIntfEx.BatchConvert Method..........................................................................................................203
Printer Driver Message Handling.......................................................................................................................204
CDIntfEx.StartDocPre, CDIntfEx.StartDocPost, CDIntfEx.EndDocPre, CDIntfEx.EndDocPost, 
CDIntfEx.StartPage, CDIntfEx.EndPage, CDIntfEx.EnabledPre Events..............................................205
CDIntfEx.CaptureEvents Method........................................................................................................207
CDIntfEx.SendMessagesTo Method....................................................................................................208
CDIntfEx.GetDocumentTitle Method..................................................................................................209
CDIntfEx.GetGeneratedFilename Method...........................................................................................210
Intercepting the data streamcoming out fromthe document converter...........................................................211
.NET Managed Code Interface.................................................................................................................214
Technical Support.....................................................................................................................................215
Available Technical Notes:...............................................................................................................215
7
Legal Information
Information in this document is subject to change without notice and does not represent a commitment on the part of AMYUNI 
Technologies. The software described in this document is provided under a license agreement or nondisclosure agreement. The 
software may be used or copied only in accordance with the terms of the agreement. It is against the law to copy the software on 
any medium except as specifically allowed in the license or nondisclosure agreement.
The licensee may make one copy of the software for backup purposes. No part of this manual may be reproduced or transmitted 
in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval 
systems, for any purpose other than the licensee’s personal use, without express written permission of AMYUNI Technologies.
Copyright 2000-2005, AMYUNI Consultants – – AMYUNI Technologies. All rights reserved.
Amyuni and the Amyuni logo are trademarks of Amyuni Technologies Inc.
Adobe, the Adobe logo, Acrobat, the Acrobat logo are trademarks of Adobe Systems Incorporated.
Microsoft, the Microsoft logo, Microsoft Windows, Microsoft Windows NT andtheir logos are trademarks of Microsoft Corporation.
All other trademarks are the property of their respective owners.
Important Note to developers:
The activation code that is provided to you by Amyuni should be kept confidential and not be revealed to end-users, even in this 
case where the developer’s products are sub-licensed to other developers.
Acknowledgments
This software uses the deflate algorithm developed by Jean-loup Gailly (jloup@gzip.org) and Mark Adler 
(madler@alumni.caltech.edu). This software is also based in part on the work of the Independent JPEG Group and on parts of the 
FreeType library.
8
Introduction
This manual is a supplement to the Amyuni Document Converter series of products. These include the PDF, HTML, RTF, Excel, 
TIFFand JPeg Converter products or any combination of these formats. Each of these products ships with a user’s manual that 
describes the overall operation of the product. The developer should be familiar with the operation of the specific product that he 
or she is using before reading the developer’s manual. 
All Amyuni Document Converter products share the same interface DLL named the “Common Driver Interface”. This interface
resides in a DLL named CDINTF300.DLL that should be in the system or system32 directory.
CDINTF300 provides the developer with three e calling conventions. Depending on their development platform and programming 
habits, developers might chose one these two interfaces:
-
A standard DLL interface
-
An ActiveX interface
-
A .NET Managed Code Interface
Using the developer version of the DocumentConverterProducts
The developer version of the Amyuni Document Converter products is a special version of these products that can be distributed 
with the developers’ applications without paying any additional royalties to Amyuni Technologies.
By special version, we mean a version that:
-
does not need to be pre-installed on the client system (although recommended)
-
does not have any properties dialog box
-
does not have any "File Save As" dialog box
All printer configuration, file destination and options settings should be done programmatically by the main application.
Step by step procedure for using the Amyuni Converters, developer version
Step 1– Copy all distributable files to the application’s main directory
The application’s main directory is usually where the executable file is located. The list of distributable files is as follows: 
Windows 98/Me:
acfpdf.drv
Windows NT4:
acfpdf.dll, acfpdfnt.dll
Windows 2000/XP/2003 32-bits:
acfpdfu.dll, acfpdfui.dll
Windows XP/2003 64-bits, AMD 64 based: acfpdfuamd64.dll, acfpdfuiamd64.dll
Windows XP/2003 64-bits, IA 64 based:
acfpdfuia64.dll, acfpdfuiia64.dll
Common to all versions:
cdintf.dll, install.exe, acfpdf.txt
Step 2– Initialize the Document Converter printer on the end-user’s system
This can be done in two different ways:
1. (Recommended) By launching Install.exe when the main application is being installed. Install.exe should be launched 
followed by a printer name specific to the developer’s company or application. It can also be followed by the –s switch 
for silent mode, and by the license and activation code. E.g.: Install -s "My Company Printer" -n"Evaluation Developer 
License" -c "07ABCDA0ABCDABCDABCD012301230123.....".
2. By calling PDFDriverInit at the initialisation of the application. The documentation for PDFDriverInit provides details 
about how to use this function to initialize the printer and activate it.
Step 3– CopyCDIntf to the system directory
CDINTF.DLL should be copied to the system directory and renamed as CDINTF300.DLL. This is done automatically by Install.exe 
and is needed only if the developer has chosen some other method for installing the printer.
Step 4– Register the CDIntf ActiveX
Whenusing the ActiveX interface, the ActiveX X control should be registered in the systemby calling: REGSVR32 CDINTF300.DLL, 
from the system directory. CDIntf can be used through the DLL convention without the need for registering or creating ActiveXs.
9
Step 5– Initialize the printer at start-up of your application
An application needs to initialize the printer when it is launched. To initialize the printer, you need to call DriverInitfollowed by 
the printer name.When using method 2 outlined above to install the printer, DriverInit is replaced with PDFDriverInit. Note that 
all the functions PDFDriverInit, HTMLDriverInit and RTFDriverInit are exactly the same in version 2.1 of the product.
Step 6– Export to the format of your choice by printing from your application
When the user chooses the export function of your application to generate a PDF, HTML, RTF, JPEG, TIFFor Excelfile, you need to 
set up the output file name using SetDefaultFileName, the file generation options SetFileNameOptions( NoPrompt + UseFileName 
+ … ) and print to the "MyCompany Printer"as you would do when printing to any other printer.The developer can be in one of 
three situations:
a. The developer licensed a product that generates only one format, e.g. PDF only or RTF only. In this case, the printer will 
generate the right format without any specific option to set.
b. The developer licensed a product that generates multiple formats including PDF, e.g. PDF and RTF. In this case, to export 
to either RTF, HTML,JPEG, TIFFor Excel, the corresponding option should be set in the call to SetFileNameOptions. The 
PDF file will be generated in all cases and should be deleted by the developer if not needed. Thereis no method to have 
the Converter generate an RTF/HTML/JPEG/TIFF/Excelfile only without generating PDF.
c.
The developer licensed a product that generates multiple formats excluding PDF, e.g. RTF and HTML. In this case, to 
export to either RTF, HTML, the corresponding option should be set in the call toSetFileNameOptions. A temporary file 
will be generated in all cases and will be deleted by the printer when the print job is finished. 
Step 7– Restore the printer to its previous setting
When printing is over, the developerneedsto call SetFileNameOptions(0) to prevent other applications or users from overwriting 
the file that has just been generated from theapplication.
Step 8– Uninitialize the printer before exiting
Before exiting the application, the e DriverEnd function should be called. This function will remove the printer if installed using 
PDFDriverInit, otherwise it will simply disconnect from the printer.
Important Noteto developers:
To avoid confusion with other applications and with the single-user versions of the Document Converter products, developers are 
required to use a printer name specific to their application or company. Using the default printer namesof "Amyuni Document 
Converter"or "Amyuni PDF Converter"is not allowed.
The activation code that is provided to you by Amyunishould be kept confidential and not be revealed to end-users, even in this 
case where the developer’s products are sub-licensed to other developers. 
10
New In Version 3.0
-
Support for the new XPS document format.
-
Improved Unicode andCID font embedding decreases the size of PDF files containing asiatic fonts.
-
Support for creating structured PDF files, also known as tagged PDFs.
-
PDF Converter now supports loading FDF documents that contain data associated with a main PDF document.The user must 
use the Open method to load the main document and then use the Merge method to combine an FDF with the PDF document.
-
XMP metadata generation.
-
Create PDFs that comply with the PDF/A ISO standard.
-
Loading/ saving multiple configurations enables the developer to quickly select the best configuration for a print job.
-
Improved algorithm for handling image caching
-
Support for 2400 dpi resolution. 
-
Plus a wealth of improved features as detailed in this documentation.
Documents you may be interested
Documents you may be interested