Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

API for merging PDFs

Posted on 2012-04-02
3
Medium Priority
?
508 Views
Last Modified: 2012-04-04
I need to create a single PDF and merge in other child-PDFs.   I will also be using bookmarks, and I need a bookmark to the page(s) where the child-PDFs are inserted.   I need a product with an API.  I will be using .NET (VB.NET)

I need a clean, straight forward of creating a single PDF, which will include text and other PDF's, and I need the ability to add a bookmark whose target is anywhere in the PDF, including the child PDFs that are inserted.

Any suggestions?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
binaryevo earned 750 total points
ID: 37797077
Try iTextSharp its open source and adopted from the java library.
0
 
LVL 9

Assisted Solution

by:wasiftoor
wasiftoor earned 750 total points
ID: 37797155
PDFSharp www.pdfsharp.net is one of the most widely used PDF processing libararies for .NET.

It has both the merging and bookmarking features that you are looking for.

For Bookmarking, the following sample code can be helpful:

----------------------------------------------------------------------------------------------------

// Create a new PDF document
PdfDocument document = new PdfDocument();
 
// Create a font
XFont font = new XFont("Verdana", 16);
 
// Create first page
PdfPage page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
gfx.DrawString("Page 1", font, XBrushes.Black, 20, 50, XStringFormats.Default);
 
// Create the root <B class=searchkeyword>bookmark</B>. You can set the style and the color.
PdfOutline outline = document.Outlines.Add("Root", page, true, PdfOutlineStyle.Bold, XColors.Red);
 
// Create some more pages
for (int idx = 2; idx <= 5; idx++)
{
  page = document.AddPage();
  gfx = XGraphics.FromPdfPage(page);
 
  string text = "Page " + idx;
  gfx.DrawString(text, font, XBrushes.Black, 20, 50, XStringFormats.Default);
 
  // Create a sub <B class=searchkeyword>bookmark</B>
  outline.Outlines.Add(text, page, true);
}
 
// Save the document...
const string filename = "<B class=searchkeyword>Bookmark</B>s_tempfile.pdf";
document.Save(filename);
// ...and start a viewer.
Process.Start(filename);


----------------------------------------------------------------------------------------------------

Good Luck.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 37809379
Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…
Simple Linear Regression
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question