Added support for image DPI scaling

This commit is contained in:
MarcinZiabek
2023-04-30 11:26:55 +02:00
parent dc0a21b8e7
commit 41ba1ac1ce
6 changed files with 106 additions and 77 deletions
@@ -1,22 +0,0 @@
using System;
using System.Diagnostics;
using System.IO;
using QuestPDF.Fluent;
using QuestPDF.Infrastructure;
namespace QuestPDF.Examples.Engine
{
public static class Helpers
{
public static void GeneratePdfAndOpen(this Document document, string? fileName = null)
{
fileName ??= $"{Guid.NewGuid():D}.pdf";
var filePath = Path.GetTempPath() + fileName;
var documentData = document.GeneratePdf();
File.WriteAllBytes(filePath, documentData);
Process.Start("explorer", filePath);
}
}
}