Home
We need your feedback!

Bytescout.PDF for .NET


Subscribe to Our Bi-Monthly Newsletter (tips, new releases, specials):
 Subscribe in a reader
 PRODUCTS  |  DOWNLOAD  |  PURCHASE  |  SUPPORT  |  TESTIMONIALS   |  NEWS  | 

Bytescout.PDF library for .NET

Download Free Trial Buy Now More Information
For HTML2PDF and XML2PDF solution check our PDFDoc Scout ActiveX library instead

How to embedded add file attachment into PDF document using Bytescout.PDF library for .NET

This example uses Bytescout.PDF library to add file attachment (embedded file attachment) from file to the generated PDF document (using Visual C#)

Download example source code: bytescoutpdf_add_file_attachment_from_file.zip (4 KB)

screenshot of PDF document with file attachment embedded into PDF document using Bytescout.PDF library

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using Bytescout.PDF;

namespace DemoProject
{
class Program
{
static void Main(string[] args)
{
// Create main PDF Doc Engine
PDFDocEngine engine = new PDFDocEngine("demo", "demo");
// Add new document
Document document = engine.AddDocument();
// Append new page to the document
Page page = document.AddPage(PageSizeType.A3, PageOrientationType.LandScape);
document.AddAttachedFile("HelloWorld.pdf", "HelloWorld.pdf", "HelloWorld", false);
// Save document
document.Save("AddAttachedFile.pdf");
}
}
}

Download example source code: bytescoutpdf_add_file_attachment_from_file.zip (4 KB)

Download Free Trial Buy Now More Information
For HTML2PDF and XML2PDF solution check our PDFDoc Scout ActiveX library instead

"Hello, World!" quick start step-by-step tutorials:

Advanced Examples:

"Hello, World!" quick start step-by-step tutorials:

Advanced Examples:

HOME  |  CONTACT US

Copyright © ByteScout, 2003-2010. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks.