diff --git a/scratch.cs b/scratch.cs new file mode 100644 index 0000000..e0d3df7 --- /dev/null +++ b/scratch.cs @@ -0,0 +1,28 @@ +using System; +using System.IO; +using System.Linq; +using QuestPDF.Fluent; +using QuestPDF.Infrastructure; + +class Program +{ + static void Main(string[] args) + { + // Create a new PDF document + using (var stream = new MemoryStream()) + { + var document = new Document(stream); + + // Add each PDF document to the output document + for (int i = 1; i < args.Length; i++) + { + var inputDocument = new Document(new FileStream(args[i], FileMode.Open)); + document.Append(inputDocument.GetContent()); + } + + // Save the output document + document.Save(); + File.WriteAllBytes("merged.pdf", stream.ToArray()); + } + } +}