Developer Tools
|
Office Productivity Applications
|
Platform-Agnostic APIs
|
Home | Online Demos | Downloads | Buy Now | Support | About Us | News | Working Together | Contact Us
This article is based on a personal experience. No, it's not meant to make you misty-eyed or something. This is just to illustrate how PDFOne .NET can help you accomplish real-life PDF-related tasks. That's it.
Being an hardware enthusiast, I like to read hard copies of ASUS World magazine that our office gets by post. One day, I went to the ASUS website hoping to get a newer copy of the magazine. The site gave me a ZIP download containing not one but several PDF documents!
These PDFs were heavy and opening them individually was not very conducive for casual browsing. I then decided to merge the documents together using one of our PDF tools. Here are the steps for my PDFOne .NET solution.
System.Windows.Forms.OpenFileDialog
) on the form.
private void button1_Click(object sender, EventArgs e) { String[] saFiles; ArrayList alFiles = new ArrayList(); PDFDocument doc; // Show "File Open" dialog openFileDialog1.Filter = "PDF files (*.pdf)|*.pdf"; openFileDialog1.Multiselect = true; openFileDialog1.ShowDialog(); saFiles = openFileDialog1.FileNames; if (saFiles.Length > 1) { // Place selected PDF files in an array list foreach (String sFile in saFiles) { alFiles.Add(sFile); } doc = new PDFDocument("your license key"); doc.OpenAfterCreate = true; // Merge the PDF documents doc.Merge(alFiles); doc.Save("merged.pdf"); doc.Close(); } }
Using
directive for Gnostice.PDFOne
so that the above code compiles.The PDFDocument.Merge()
method accepts an array list containing the pathnames of the PDF documents that need to be merged. Calling this method, merges the document into one file. Here is the output I got. Sweet!
---o0O0o---
Our .NET Developer Tools | |
---|---|
Gnostice Document Studio .NETMulti-format document-processing component suite for .NET developers. |
PDFOne .NETA .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 | |
---|---|
Gnostice Document Studio DelphiMulti-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms. |
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
Our Java developer tools | |
---|---|
Gnostice Document Studio JavaMulti-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 | |
---|---|
StarDocsCloud-hosted and On-Premises REST-based document-processing and document-viewing APIs |
Privacy | Legal | Feedback | Newsletter | Blog | Resellers | © 2002-2024 Gnostice Information Technologies Private Limited. All rights reserved. |