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
Solved

How to programmatically save off all PDF files from PDF Package?

Posted on 2008-09-30
2
1,283 Views
Last Modified: 2013-12-14
How do I programmatically (C# or C++) extract all PDF files from PDF Package and save them off to a folder? Also, some PDF files might have other PDF attachments that have to be moved to the same folder.
Please, need your expert help.
0
Comment
Question by:ArtKel
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 22613414
PDF Packages (or Portfolios) are just fancy file attachments - you can use the same routines that you would use to extract a file attachment from a PDF file.

Take a look at iTextSharp (http://itextsharp.sourceforge.net/). For sample code about how to actually process attachments, take a look at the source of pdftk (http://www.accesspdf.com/pdftk/). You can also look at the iTextToolbox, which also contains a code to extract attachments: https://sourceforge.net/project/showfiles.php?group_id=194031

To recursively process attachments, you just need to call your extract method again on every extracted file until you can no longer find attachments.
0
 

Author Closing Comment

by:ArtKel
ID: 31501847
I was looking at those solutions before but I guess not close enough. After your sugestion I looked more closely and found exactly what I was looking for. Thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

860 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