Skip to content

Commit

Permalink
Fix optional lowQuality
Browse files Browse the repository at this point in the history
  • Loading branch information
lex2193 committed Jan 24, 2024
1 parent 0734680 commit f1496f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Html2Pdf/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
app.MapPost("/", (IGeneratePdf generatePdf, IFormFile file,
[FromQuery] Orientation orientation = Orientation.Portrait,
[FromQuery] Size size = Size.A4,
[FromQuery] bool lowQuality = false) =>
[FromQuery] bool? lowQuality = null) =>
{
generatePdf.SetConvertOptions(new ConvertOptions
{
PageOrientation = orientation,
PageSize = size,
IsLowQuality = lowQuality
IsLowQuality = lowQuality ?? false
});
using var source = file.OpenReadStream();
using var reader = new StreamReader(source);
Expand Down

0 comments on commit f1496f9

Please sign in to comment.