We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

By multiple docx file conversion into multiple PDF file streams merge into a PDF file stream failed again

By multiple docx file conversion into multiple PDF file streams merge into a PDF file stream failed again,only doc and docx failed, other file types is possible.

Hi Ting,


Thanks for contacting support.

As per my understanding, you are converting DOC/DOCX files to PDF format using Aspose.Words and then using Aspose.Pdf to concatenate PDF documents. Can you please share the resource PDF files causing this problem, so that we can test the scenario in our environment. We are sorry for this inconvenience.

I use this two docx files to PDF format using Aspose.Words and then using Aspose.Pdf to concatenate PDF documents.Then generate pdf files.
The attachments are the three files.

Hi Ting,


Thanks for sharing source documents. I have tested the scenario with shared documents but getting merged PDF document with zero file size, whereas size of your output file is 23 KB. We will appreciate it if you please share your sample code here as well. So we will address your issue exactly.

We are sorry for the inconvenience caused.

Best Regards,

this is the merge method:

void Merge(List inputStreamList)
{
var docsArray = new Document[inputStreamList.Count];
var index = 0;
foreach (var pdfStream in inputStreamList)
{
var doc = new Document(pdfStream);
var pdfoutline = new OutlineItemCollection(doc.Outlines);
pdfoutline.Action = new GoToAction(doc.Pages[1]);
doc.Outlines.Add(pdfoutline);
docsArray[index++] = doc;
}

var mergerStream = new MemoryStream();
using (var outDocment = new Document())
{
var editor = new PdfFileEditor();
//editor.Concatenate(inputStreamList.ToArray(), mergerStream);
editor.Concatenate(docsArray, outDocment);
outDocment.Save(mergerStream);
}
using (var fileStream = File.Create(@“D:\TestAspose” + DateTime.UtcNow.Ticks + “.pdf”))
{
mergerStream.Seek(0, SeekOrigin.Begin);
mergerStream.CopyTo(fileStream);
}
}

please quikly reply,thank.

Hi Ting,


Thanks for sharing the sample code. I have tested the merging scenario with shared code and noticed the reported issue. So logged a ticket PDFNEWNET-40729 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,