We have to view PDFs before generating the PDF file. We have tried adding the below-mentioned code but it's not working for us in WinForm and our application gets freezed.
using QuestPDF.Fluent;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
// code in your main method
var document = Document.Create(container =>
{
container.Page(page =>
{
// page content
});
});
// instead of the standard way of generating a PDF file
document.GeneratePdf("hello.pdf");
// use the following invocation
document.ShowInPreviewer();
// optionally, you can specify an HTTP port to communicate with the previewer host (default is 12500)
document.ShowInPreviewer(12345);
Is it possible for QuestPDF to view PDF before generating the file?