diff --git a/Paperless.TestSupport/TestPdf.cs b/Paperless.TestSupport/TestPdf.cs
index 9a2b559..f611ddc 100644
--- a/Paperless.TestSupport/TestPdf.cs
+++ b/Paperless.TestSupport/TestPdf.cs
@@ -3,28 +3,14 @@
namespace Paperless.TestSupport;
///
-/// Builds a single-line test PDF from a line of text using CreatePdf.NET's fluent builder and
-/// returns its bytes, shared by both integration suites. CreatePdf.NET's public output is disk-only
-/// (SaveAsync writes under the project's output/ dir and returns the real path), so this
-/// saves with a unique name, reads the returned path, then deletes it — neither suite duplicates the
-/// round-trip or leaks PDFs. The root fix is an in-memory output on the library itself
-/// (e.g. ToBytesAsync/SaveAsync(Stream)), after which this collapses to a single call.
+/// Renders a single-line test PDF from a line of text via CreatePdf.NET's fluent builder and returns
+/// its bytes in memory — shared by both integration suites so neither duplicates PDF creation.
+/// Uses (CreatePdf.NET 3.0.5+), which renders straight to a
+/// byte array with no disk round-trip, so there is nothing to clean up or leak.
///
public static class TestPdf
{
/// Renders (black text on white) to a PDF and returns its bytes.
- public static async Task BytesAsync(string content)
- {
- // SaveAsync routes through FileOperations.GetOutputPath (project output dir + a sanitized name),
- // so the file rarely lands where a caller-supplied path would suggest — always read the RETURN.
- var path = await Pdf.Create(Dye.White).AddText(content).SaveAsync($"paperless-test-{Guid.NewGuid():N}.pdf");
- try
- {
- return await File.ReadAllBytesAsync(path);
- }
- finally
- {
- File.Delete(path);
- }
- }
+ public static Task BytesAsync(string content) =>
+ Pdf.Create(Dye.White).AddText(content).ToBytesAsync();
}
diff --git a/Version.props b/Version.props
index a251d5c..e81c272 100644
--- a/Version.props
+++ b/Version.props
@@ -38,7 +38,7 @@
4.11.0
- 3.0.4
+ 3.0.5
3.2.0
9.4.0
5.3.0