Free Support Forum - aspose.com

Multiple Pages with Dynamic Content- Content is Hidden When Concatenated Using PdfFileEditor.Concatenate

When concatenating multiple documents with dynamically generated content fields the resulting document is not displaying but is displaying in the preview when you scroll through the document. The last document does display it content correctly.

I have attached a .NET project to illustrate the issue and attached a screenshot of what the preview looks like.

The content shows when you click and drag the scroll bar on the right through the pdf document.

this has been tested with and w/o using our license. We have also tested this with streams and documents written to disk with the same result.

var slides = new List();

//// this is simulating returning pdfs from aws s3
for (var i = 1; i <= 23; i++)
{
slides.Add(new WorkingPdf { Url = string.Format("{0}.pdf", i.ToString(“000”)), InputStream = EmbededResources.GetEmbeddedFile(“FMG.AsposePdfDemo”, “FMG.AsposePdfDemo.EmbeddedResources.001.pdf”, false).ToMemoryStream() });
}

//// image would be coming from AWS S3 storage
using (var logoImage = EmbededResources.GetEmbeddedFile(“FMG.AsposePdfDemo”, “FMG.AsposePdfDemo.EmbeddedResources.logo.png”, false).ToMemoryStream())
{
//// fields are generated from the database
using (var xmlFields = EmbededResources.GetEmbeddedFile(“FMG.AsposePdfDemo”, “FMG.AsposePdfDemo.EmbeddedResources.fields.xml”, false).ToMemoryStream())
{
xmlFields.Seek(0, SeekOrigin.Begin);

//// image is being saved to disk due to issue: PDFKITNET-27777
DirectoryInfo tempDirectoryInfo;
var tempFileName = WriteImageToDiskGetTempFileName(logoImage, out tempDirectoryInfo);

//// Add content to pdfs
slides.ForEach(slide => ImportPdfContent(xmlFields, slide, tempFileName));

//// write pdf to disk so we can inspect the files have been updated correctly
//// pdf documents ar output to the project bin directory
slides.ForEach(WritePdfToDisk);

//// concatenate the slides to a single document
var editor = new PdfFileEditor();
editor.Concatenate(slides.Select(slide => slide.Url).ToArray(), “result.pdf”); //// result pdf document outputs to the project bin directory

tempDirectoryInfo.Delete(true);
}
}

slides.ForEach(slide => { slide.InputStream.Close(); slide.InputStream.Dispose(); });
slides.ForEach(slide => { slide.OutputStream.Close(); slide.OutputStream.Dispose(); });
}

Hi Richard,

I have reproduced this problem at my end and logged it as PDFKITNET-27980 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Hi Richard,

I have increased the priority of the four issues you mentioned lately and asked our development team to share the ETA. You’ll be updated as soon as the response is received. However, I would request you to spare us some time for initial investigation.

We’re sorry for the inconvenience and appreciate your patience.
Regards,

Hi Richard,

Our team had looked into the issue logged as PDFKITNET-27980 and I would like to share with you that the fix for this issue will be available at the end of June or early July 2011. You’ll be notified via this forum thread as soon as it is resolved.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,

The issues you have found earlier (filed as 27980) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.