We are planning to add direct support for PDF packages in ToXod conversion soon. In the meantime you could do something like the following to extract the embedded files. Each extracted file could be converted individually, or you could create a new PDF document that simply concatenates the portfolio's component documents into a single PDF and convert it.
PDFDoc doc = new
PDFDoc("package.pdf");
doc.InitSecurityHandler();
pdftron.SDF.NameTree files =
NameTree.Find(doc, "EmbeddedFiles");
if(files.IsValid())
{
// Traverse the
list of embedded
files.
NameTreeIterator
i =
files.GetIterator();
for (int counter
= 0; i.HasNext();
i.Next(), ++counter)
{
string entry_name =
i.Key().GetAsPDFText();
Console.WriteLine("Part:
{0}", entry_name);
FileSpec file_spec = new
FileSpec(i.Value());
Filter stm =
file_spec.GetFileData();
if (stm!=null)
{
FilterReader reader
= new FilterReader(stm);
string fname =
output_path + "extract_" + counter.ToString();
StdFile f = new
StdFile(fname, StdFile.OpenMode.e_write_mode);
FilterWriter writer
= new FilterWriter(f);
writer.WriteFilter(reader);
writer.Flush();
f.Close();
}
}
}