next up previous contents index
Next: File Attachments Up: cpdflibmanual Previous: Other View Settings   Contents   Index

Document Metadata


\begin{framed}
\noindent\textit{Function Summary}\\ [2mm]
\noindent\begin{tabula...
...moveMetadata! & Remove the metadata from a document\\
\end{tabular}\end{framed}
PDF files can contain a piece of arbitrary metadata, often in XML format. This is typically stored in an uncompressed stream, so that other applications can read it without having to decode the whole PDF. To set the metadata from a file:
\begin{framed}
\noindent\textit{Add metadata from a file}
\par
\vspace{2mm}
\noi...
...omFile(pdf, ''C:\\ data.xml'')!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}

To set from a byte array:


\begin{framed}
\noindent\textit{Set Metadata from Byte Array}
\par
\vspace{2mm}
...
...adataFromByteArray(pdf, bytes)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}

Return the metadata as a byte array:


\begin{framed}
\noindent\begin{tabular}{rl}
\small\sffamily\textbf{C\char93 } &
...
... () = Cpdflib.GetMetadata(pdf)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}

To remove any metadata from a file:


\begin{framed}
\noindent\begin{tabular}{rl}
\small\sffamily\textbf{C\char93 } &
...
...rb!Cpdflib.RemoveMetadata(pdf)!
\end{minipage}\\ [5mm]
\end{tabular}\end{framed}



root 2008-12-01