How to show pdf in windows form and add annotation.
Hi Jason,
To view PDF in Windows Forms application, you could convert its pages to images and display them using PictureBox
control. See the conversion example:
Or you could use WPF controls inside your Windows Forms application.
Here is how to display PDF file using DocumentViewer
control and using Image
control:
Both of these approaches are also showcased in our printing examples as a way to create a print preview:
I hope this helps.
Regards,
Mario
hi I am getting an error: the type initializer for gembox.Pdf.Objects.pdfDictionary threw an exemption
Hi Jason,
It seems like you’re missing some dependencies, I’m guessing HarfBuzzSharp or HarfBuzzSharp.NativeAssets.Win32.
Please try installing the GemBox.Pdf NuGet package:
https://www.nuget.org/packages/GemBox.Pdf
Does this solve your issue?
Regards,
Mario