Viewing PDF in Windows forms using C# [closed]

you can use System.Diagnostics.Process.Start as well as WIN32 ShellExecute function by means of interop, for opening PDF files using the default viewer: System.Diagnostics.Process.Start(“SOMEAPP.EXE”,”Path/SomeFile.Ext”); [System.Runtime.InteropServices.DllImport(“shell32. dll”)] private static extern long ShellExecute(Int32 hWnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, long nShowCmd); Another approach is to place a WebBrowser Control into your Form and then use … Read more

Create PDF with multiple pages

Output Fixed using CTFramesetterCreateFrame and CFAttributedStringGetLength class PDFCreator { lazy var pageWidth : CGFloat = { return 8.5 * 72.0 }() lazy var pageHeight : CGFloat = { return 11 * 72.0 }() lazy var pageRect : CGRect = { CGRect(x: 0, y: 0, width: pageWidth, height: pageHeight) }() lazy var marginPoint : CGPoint = … Read more