[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1295
  • Last Modified:

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

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
ArtKel
Asked:
ArtKel
1 Solution
 
Karl Heinz KremerCommented:
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
 
ArtKelAuthor Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now