Hello, I'm trying to concatenate some PDFs generated by SQL Server Reporting Service, but inthe output file the pages are added empty, I've added some other PDFs to the end of the concatenated file just for test pourposes, and these PDF's are added well.
The only diference between these PDF Files are the Fonts, Can you help me with this?
In the PDF generated by Reporting Services, the fonts doesn't seem to be inscrusted.
Thank you in advance
My Code is:
outputFile = v10Functions.MakeUniqueFile(v10DataMod.DataDict.Startup.TempDir, "", "PDF").ToUpper(); PdfDocument document = new PdfDocument();
List<string> fileNames = new List<string>(); fileNames.Add(coverOutputFile); fileNames.Add(mainOutputFile); fileNames.Add(remitOutputFile); fileNames.Add(envelopeOutputFile); fileNames.Add(@"D:\Mis Documentos\Downloads\PDFSharp-MigraDocFoundation-1_31\PDFsharp\samples\PDFs\fw4.pdf"); fileNames.Add(@"D:\Mis Documentos\Downloads\PDFSharp-MigraDocFoundation-1_31\PDFsharp\samples\PDFs\HelloWorld.pdf"); fileNames.Add(@"D:\Mis Documentos\Downloads\PDFSharp-MigraDocFoundation-1_31\PDFsharp\samples\PDFs\Portable Document Format.pdf"); fileNames.Add(@"D:\Mis Documentos\Downloads\PDFSharp-MigraDocFoundation-1_31\PDFsharp\samples\PDFs\SomeLayout.pdf"); foreach (string file in fileNames) { if (file != string.Empty) { PdfDocument inputDocument = PdfReader.Open(file, PdfDocumentOpenMode.Import); int count = inputDocument.PageCount; for (int idx = 0; idx < count; idx++) { PdfPage page = inputDocument.Pages[idx]; document.AddPage(page); } } } document.Save(outputFile);
|