Add scratch file.

This commit is contained in:
20xd6 2024-07-31 15:47:23 -04:00
parent 1b386c0eca
commit 3337dc4ea6

28
scratch.cs Normal file
View File

@ -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());
}
}
}