feat(pdf): add optional output stream parameter to FromMemory overload
- Updated Pdf.FromMemory(MemoryStream) to accept an optional outputStream parameter - Ensures flexibility when reusing existing MemoryStreams for output - Added conditional nullability support for .NET builds
This commit is contained in:
@@ -18,9 +18,13 @@ namespace EnvelopeGenerator.PdfEditor
|
|||||||
return new Pdf<MemoryStream, MemoryStream>(new MemoryStream(documentBytes), new MemoryStream());
|
return new Pdf<MemoryStream, MemoryStream>(new MemoryStream(documentBytes), new MemoryStream());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pdf<MemoryStream, MemoryStream> FromMemory(MemoryStream stream)
|
public static Pdf<MemoryStream, MemoryStream> FromMemory(MemoryStream stream, MemoryStream
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
outputStream = null)
|
||||||
{
|
{
|
||||||
return new Pdf<MemoryStream, MemoryStream>(stream, new MemoryStream(), disposeInputStream: false);
|
return new Pdf<MemoryStream, MemoryStream>(stream, outputStream ?? new MemoryStream(), disposeInputStream: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user