Components for Developers
© 2000-2010, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on 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 create a new PDF document
How to place an image into PDF
How to write text in a PDF document
How to draw simple elements, such as a line, circle, or arc, with different attributes
How to manipulate primitives to clip drawing objects
How to create PDF with ASP.NET on the web server without Visual Studio
How to create PDF with PHP on the web server
How to create PDF with Python on the web server
How to create or edit PDF with Python
How to convert metafile to PDF using C++
How to convert image to PDF using VB.NET
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

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

PDF Library | PDF Rasterizer | Virtual Printers | Converters
Help Creator | Web Form Maker | Design Service

Support | Blog | Forum | Contacts | About
Site map

© 2000-2010, Two Pilots