Pack(Stream) Method (PdfDocument)
Packs and saves PDF document to specified stream and switches to the specified stream.
This methods copies content of this PDF document to specified stream, removes unused objects from the specified stream and switches to specified stream.
Source PDF document is not affected. All further changes will affect the specified stream only.
Method writes document at the beginning of and truncates according to written data.
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5