Is there a way to convert a byte array pdf with multiple pages into a ceTe.DynamicPDF.Document object ?
Thanks
Is there a way to convert a byte array pdf with multiple pages into a ceTe.DynamicPDF.Document object ?
Thanks
On
I recommend using a MergeDocument instead of a Document. A PdfDocument can be created from a byte array. It retains all the pages of the PDF. The PdfDocument can be appended to a mergeDocument.
PdfDocument myPdfDoc = new PdfDocument(myByteArray);
myMergeDoc.Append(myPdfDoc);
If you specifically need a ceTe.DynamicPDF.Document you can make a MergeDocument, add the PdfDocument to it, then iterate through the pages in the MergeDocument and save them to a Document. Admittedly, that is a messy solution.
foreach (Page page in myMergeDoc.Pages)
{
myDocument.Pages.Add(page);
}
Create a new
Documentinstance, then use MergeDocument passing your byte array.Example here.