mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
Fix PDF generation – reset stream position (#40072)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This is an additional fix that extends the work done in https://github.com/microsoft/PowerToys/pull/40023 fix #39851
This commit is contained in:
@@ -228,6 +228,8 @@ namespace Microsoft.PowerToys.PreviewHandler.Pdf
|
||||
DestinationWidth = (uint)this.ClientSize.Width,
|
||||
}).GetAwaiter().GetResult();
|
||||
|
||||
stream.Seek(0); // Reset the stream position to the beginning before reading.
|
||||
|
||||
imageOfPage = Image.FromStream(stream.AsStream());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user