From ad47b82b8fe35662b7b9ebd5701f806f57b1175c Mon Sep 17 00:00:00 2001 From: MarcinZiabek Date: Sun, 7 May 2023 04:05:39 +0200 Subject: [PATCH] Fixed example generation resolution --- .../QuestPDF.Examples/Engine/SimpleDocument.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/QuestPDF.Examples/Engine/SimpleDocument.cs b/Source/QuestPDF.Examples/Engine/SimpleDocument.cs index f61ce54..fa5f7a6 100644 --- a/Source/QuestPDF.Examples/Engine/SimpleDocument.cs +++ b/Source/QuestPDF.Examples/Engine/SimpleDocument.cs @@ -13,25 +13,22 @@ namespace QuestPDF.Examples.Engine private Action Content { get; } private int MaxPages { get; } - private bool ApplyCaching { get; } - private bool ApplyDebugging { get; } public SimpleDocument(Action content, int maxPages, bool applyCaching, bool applyDebugging) { Content = content; MaxPages = maxPages; - ApplyCaching = applyCaching; - ApplyDebugging = applyDebugging; + + QuestPDF.Settings.EnableCaching = applyCaching; + QuestPDF.Settings.EnableDebugging = applyDebugging; + QuestPDF.Settings.DocumentLayoutExceptionThreshold = MaxPages; } - public DocumentMetadata GetMetadata() + public DocumentSettings GetSettings() { - return new DocumentMetadata() + return new DocumentSettings() { - RasterDpi = PageSizes.PointsPerInch * ImageScalingFactor, - DocumentLayoutExceptionThreshold = MaxPages, - ApplyCaching = ApplyCaching, - ApplyDebugging = ApplyDebugging + RasterDpi = PageSizes.PointsPerInch * ImageScalingFactor }; }