PDF .NET Library Documentation - PDF Technologies, Inc.
Assembly: PDFTechLib (in PDFTechLib.dll) Version: 1.0.0.0 (1.7.9.0)
The function to use if you wish to attach a document to an existing pDF file.
Namespace:
PDFTechAssembly: PDFTechLib (in PDFTechLib.dll) Version: 1.0.0.0 (1.7.9.0)
Syntax
C# |
---|
public PDFAttachment AddAttachment( string fileName ) |
Visual Basic (Declaration) |
---|
Public Function AddAttachment ( _ fileName As String _ ) As PDFAttachment |
Visual C++ |
---|
public: PDFAttachment^ AddAttachment( String^ fileName ) |
Parameters
- fileName
- Type: System..::.String
Location of the attachment file
Return Value
PdfAttachment represent the embedded pDF document.Remarks
Any type of document may be embedded into a PDF document.
Examples
The sample code below demonstrates how to attach a file into a PDF document.
CopyC#
PDFDocument doc = new PDFDocument("sample.pdf"); doc.AddAttachment("C:\\sample.doc"); ... doc.Save();