Components for Developers
© 2000-2017, Two Pilots

PDF Library   EMF2PDF SDK Pilot   Virtual Printers   HTML2PDF-X Pilot   Converters   PDF Mosaic  
Home Download Features Manual Tutorials FAQ Pricing History In the Lab

 

How to place a Attachments into PDF document

 

You can attach PDFs and other types of files to a PDF. If you move the PDF to a new location, the attachments move with it. Attachments may include links to or from the parent document or links to other attachments.

For the file attachments, you have an option of opening or saving the file. Opening the file starts the application that handles the file format of the attachment. (You must have that application to open the attachment.)

Note: Acrobat does not open EXE, VBS, and ZIP file formats because these formats are associated with malicious programs, macros, and viruses that can damage your computer.

To make the attachment viewable in Acrobat, do one of the following:

  1. Click the Attachments button in the navigation pane, and select Show Attachments By Default from the Options menu (selected by default).
  2. Choose File -> Properties, click the Initial View tab, choose the Attachments Panel And Page from the Show menu, and click OK.

PDF Creator Pilot has methods for creating and managing file attachments. To add a file attachment to a PDF, use the "AddUnicodeFileAttachmentAnnotation" method. There are five parameters in the method. See the parameters below:

  1. x - X coordinate of the top-left corner of the bounding rectangle
  2. y - Y coordinate of the top-left corner of the bounding rectangle
  3. title - Unicode title of the annotation
  4. contents - Unicode contents of the annotation
  5. filePath - Path to the file to embed in the PDF file

 

Download Sample PDF with Attachments

PDFWithFileAttachmentAnnotation.pdf (103Kb)

 

Download Sample Code for PDF Creator Pilot

File Attachments in a PDF for C++ (167Kb)

File Attachments in a PDF for C# (166Kb)

File Attachments in a PDF for VB.Net (171Kb)

 

See also

How to Add and Delete PDF Pages
How to Change Character Spacing
How to Change Metadata of a PDF Document
How to Change Text Rise
How to Create a Button
How to Create a CheckBox
How to Create a ComboBox
How to Create a ListBox
How to create a new PDF document
How to create a Sound (Audio) Annotations in PDF document
How to Create Dash Pattern
How to Create Edit Boxes
How to Create Fillable PDF Forms
How to Create Graphics in PDF Document Using Patterns
How to Create Gray Color Space in PDF and Draw Graphics Elements
How to Create Layers (Optional Contrent Groups) in PDF
How to Create RGB Color Space in PDF and Draw Rectangles
How to draw simple elements, such as a line and cubic Bezier curves
How to draw simple elements, such as a rectangle and ellipses
How to Increase Or Decrease The Size Of a Text Line Using Horizontal Scaling
How to Insert an Image into a PDF
How to manipulate primitives to clip drawing objects
How to Open a Existing PDF Document
How to place a Attachments into PDF document
How to Protect Your PDF Document With a Password
How to Save And Restore Graphics State
How to Scale and Translate Coordinates
How to Specify Text Rendering Mode
How to Submit and Reset Form Actions
How to Use Blend Modes
How to Use Fonts
How to Write Text in a PDF Document
How to extract text from PDF documents
How to place a Attachments into PDF document
How to create a Sound Annotations in PDF document
How to print a PDF document

Home Download Features Manual Tutorials FAQ Pricing History In the Lab

 

PDF Library | EMF2PDF SDK Pilot | Virtual Printers
HTML2PDF-X Pilot | Converters | PDF Mosaic

Support | Blog
Contact | About | Site map

© 2000-2017, Two Pilots