Merge pdf in memory

hi,

im trying to work out a solution with aspose.pdf.I want to find and replace text in a master pdf and merge it to a new one with N times the master in it.I have it working with the sugersted methode, but as it happens on the disk. it will get progressifly slower.

so I tryed multiple ways to replace text and merge it in memory, and write the result to disk.

here is one solution I tryed, but all result that the replaced text turns up as DOTS in the merged pdf file.

any one a bright idea how to speed up the merge? or a example solution?

thnx richard

MemoryStream[] testarray = new MemoryStream[6];

for (int i = 0; i < 6; i++)
{
testarray[i] = new MemoryStream();
fileStream1.WriteTo(testarray[i]);
}

for (int i = 0; i < 6; i++)
{
PdfContentEditor editor2 = new PdfContentEditor();
editor2.BindPdf(testarray[0]);
editor2.ReplaceText("[naam]", "richard Drent:" + i.ToString());
ORGdoc.Pages.Add(editor2.Document.Pages);
}MemoryStream[] testarray = new MemoryStream[6];

for (int i = 0; i < 6; i++)
{
testarray[i] = new MemoryStream();
fileStream1.WriteTo(testarray[i]);
}

for (int i = 0; i < 6; i++)
{
PdfContentEditor editor2 = new PdfContentEditor();
editor2.BindPdf(testarray[0]);
editor2.ReplaceText("[naam]", "richard Drent:" + i.ToString());
ORGdoc.Pages.Add(editor2.Document.Pages);
}

Hi Richard,


Thanks for using our products and sorry for the delayed response.

In order to replace the text in PDF file, can you please try using the approach shared on following links Replace Text in All Pages of a PDF Document

In case the problem still persists, please share the source PDF file in which you are trying to replace the text and also please share the resultant merged PDF file so that we can test the scenario at our end. We are sorry for this inconvenience.