XtremeDocumentStudio .NET
Next-generation multi-format document-processing component suite for .NET developers
Compatibility
Visual Studio 2010/2012/2013/2015

How to create a PDF portfolio in .NET

Learn to create PDF portfolios using XtremeDocumentStudio .NET.
By Mohamed Safan

We had recently introduced the PDF portfolio-creation functionality in the Java version of XtremeDocumentStudio. Now, it is the turn of the .NET avatar.

A PDF portfolio has the familiar .PDF extenstion but it is a special PDF container for multiple files, not just PDF. PDF viewer applications such as Adobe Reader will display included PDFs and simple formats such as text or images natively. For files in other formats, Adobe Reader will allow the end-user to double-click and launch the files in their default programs. In the latest version of XtremeDocumentStudio .NET, we have introduced PDF portfolio creation capability. We have also added support for Visual Studio 2015 in this release.

To create a PDF portfolio, create WinForms application, add reference to XtremeDocumentStudio DLLs, add a button, double-click it and set this event handler. Then, replace the names of the input files with some PDFs and other files from your computer. Press F5 and you have a PDF portfolio in the debug folder.

// Specify which pages need to be converted in the input documents
ConverterParams cp = new ConverterParams();
cp.PageRange = PageRange.All;

// Specify PDF conversion settings
PDFEncoderParams pep = new PDFEncoderParams();
// Specify when a portfolio needs to be created
pep.PDFPortfolioSettings.PortfolioCreationMode 
	= PortfolioCreationMode.Always;
// Specify how viewer applications (such as Adobe Reader) 
// should display the portfolio
pep.PDFPortfolioSettings.PortfolioLayoutMode 
	= PortfolioLayoutMode.Tile;

// Create a document converter instance
DocumentConverter dc = new DocumentConverter();

// Load input documents and files in a list
List alInputFiles = new List();
alInputFiles.Add("CoverPage.pdf");
alInputFiles.Add("intel-adrenaline.pdf");
alInputFiles.Add("SampleLetterToYourSenator.docx");
alInputFiles.Add("Blue hills.jpg");
alInputFiles.Add("hebrew-rtl-test.txt");

// Create a PDF portfolio from the list
dc.ConvertToFile(
	alInputFiles,   // input documents
	"pdf",          // file extension
	".",            // output folder
	"MyPortFolio",  // output filename prefix
		        // first file as cover page, rest as attachments
	ConversionMode.ConvertFirstFileAndAttachRestAsOriginal, 
	cp,             // conversion settings
	pep,            // PDF creation settings
	"");            // password (none)

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2017 Gnostice Information Technologies Private Limited. All rights reserved.