Skip to content

Commit a18aed2

Browse files
committed
995158-1: Added performance matrics input document.
1 parent d683969 commit a18aed2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using Syncfusion.Pdf;
22

3-
//Creates a new PDF document
3+
//Creates a PDF document.
44
using (PdfDocument document = new PdfDocument())
55
{
6-
//Creates a string array of source files to be merged
7-
string[] source = { Path.GetFullPath(@"Data/file1.pdf"), Path.GetFullPath(@"Data/file2.pdf") };
8-
//Merge PDF documents
9-
PdfDocument.Merge(document, source);
10-
//Saves the PDF document
6+
using FileStream stream1 = new FileStream(Path.GetFullPath(@"Data/file1.pdf"), FileMode.Open, FileAccess.Read);
7+
using FileStream stream2 = new FileStream(Path.GetFullPath(@"Data/file2.pdf"), FileMode.Open, FileAccess.Read);
8+
//Creates a PDF stream for merging.
9+
Stream[] streams = { stream1, stream2 };
10+
//Merges PDFDocument.
11+
PdfDocumentBase.Merge(document, streams);
12+
//Save the merged document
1113
document.Save(Path.GetFullPath(@"Output/Output.pdf"));
1214
}
10.1 MB
Binary file not shown.
4.17 MB
Binary file not shown.

0 commit comments

Comments
 (0)