next up previous contents index
Next: Miscellaneous Up: cpdflibmanual Previous: Document Metadata   Contents   Index

File Attachments


\begin{framed}
\noindent\textit{Function Summary}\\ [2mm]
\noindent\begin{tabula...
...chedFiles! & Remove all attached files from a document
\end{tabular}\end{framed}

PDF supports adding attachments (files of any kind, including other PDFs) to an existing file. The cpdflib library supports adding and removing top-level attachments -- that is, ones which are associated with the document as a whole rather than with an individual page.

To add an attachment, use AttachFile. Multiple files can be attached by multiple invocations of AttachFile, and will appear in Acrobat's list in the order added.
\begin{framed}
\noindent\textit{Attach the file} \verb!sheet.xls! \textit{to a d...
...hFile(pdf, ''C:\\ sheet.xls'')!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}

To remove all attached files, use RemoveAttachedFiles:


\begin{framed}
\noindent\textit{Remove attached files}
\par
\vspace{2mm}
\noinde...
...dflib.RemoveAttachedFiles(pdf)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}



root 2008-12-01