pdfview

Create PDF with multiple pages

梦想的初衷 提交于 2019-11-26 14:52:57
问题 I need to implement a functionality of creating pdf with multiple pages of a text. class PDFCreator { func prepareData() -> Data { //1 let pdfMetaData = [ kCGPDFContextCreator: "PDF Creator", kCGPDFContextAuthor: "Pratik Sodha", kCGPDFContextTitle: "My PDF" ] //2 let format = UIGraphicsPDFRendererFormat() format.documentInfo = pdfMetaData as [String: Any] //3 let pageWidth = 8.5 * 72.0 let pageHeight = 11 * 72.0 let pageRect = CGRect(x: 0, y: 0, width: pageWidth, height: pageHeight) //4 let

Viewing PDF in Windows forms using C# [closed]

主宰稳场 提交于 2019-11-26 08:18:09
问题 Is there any way to view PDF files in a Winforms tool? I\'ve seen solutions such as converting the pdf file into images and showing them in an picture box. However, I am asking whether i can view the file as PDF. Is there any tool from adobe or from Microsoft that supports this? 回答1: 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