cgpdfdocument

What is the equivalent of CGPDFDocumentGetCatalog in Monotouch?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 04:58:17
问题 I'm trying to get the catalog of a PDF document but I cannot find CGPDFDocumentGetCatalog . Is it unbound or am I just blind? 回答1: MonoTouch.CoreGraphics.CGPDFDocument::GetCatalog() is the binding of CGPDFDocumentGetCatalog, see github. However I only added this recently so you'll need MonoTouch 4.1 (or more recent) or add p/invoke directly into your code. 来源: https://stackoverflow.com/questions/7257268/what-is-the-equivalent-of-cgpdfdocumentgetcatalog-in-monotouch

Zoom support while page curling effect present in pdf reader app

自闭症网瘾萝莉.ら 提交于 2019-12-10 11:43:43
问题 Hi I am developing an ipad Magazine app where I need to display pdf files.I am using leaves project for page curl effect.This works great. But in landscape page fits to height(768px) and it becomes difficult to read the font. Thats why I want to support zoom in/out on this view. I am a newbie to Core Graphics.I think in leaves project they parse pdf to show image of each page.But I dont know why zoom is not supported if it is an image. There are some more branches of leaves project for

PDF colours weird via web view and CGPDFDocumentCreate, yet not in preview

落爺英雄遲暮 提交于 2019-12-08 04:48:16
问题 I've been using a couple of methods in an iPad app for over a year now, largely based on apple code available here to display PDF pages nicely - it's worked fine for dozens of different PDFs until now. I just got a bunch of PDFs that appear to be having their colours warped in some way. What Preview/Adobe shows: And here's what I'm seeing, both in Layer based CGPDFDrawPDFPage() and in an iPad UIWebView (pointing to the file), using simulator: I am wondering if somehow the PDF is in some weird

How to display CGPDFDocument in swift?

倖福魔咒の 提交于 2019-12-05 07:36:30
问题 Hi I have a CGPDFDocument object. I want to open this document by either showing it in my app or using an external application. Here is the code I have so far. in SWIFT let cfData = CFDataCreate(kCFAllocatorDefault, UnsafePointer<UInt8>(data.File.bytes), data.File.length) let cgDataProvider = CGDataProviderCreateWithCFData(cfData) let cgPDFDocument = CGPDFDocumentCreateWithProvider(cgDataProvider) 回答1: with help from this answer in objective-c, here is a working example in swift: override

How to digitally sign a PDF using X.509 certificate data from iOS application

假装没事ソ 提交于 2019-12-04 11:08:04
问题 I am generating PDF's in my app. I want to give the best security to these pdf's generated through my app. I have added the default security options provided by Apple, like Owner password, allow copying, allow printing etc... But I would like to add my certificate information or call it as Digitally sign the pdf's using the custom certificate(X.509 certificate) files. Does security framework help in any way ? or How can this be achieved? 回答1: Unfortunately, iOS doesn't seem to provide this

How to attach CGPDFDocument/CGPDFPage to MFMailComposeViewController

倾然丶 夕夏残阳落幕 提交于 2019-12-03 23:01:39
问题 I have a muti page pdf document stored on local storage. I want to extract any page out of that pdf doc and convert it into NSData to attach it with 'MFMailComposeViewController'. With the following lines of code, I can easily retrive the required page... CGPDFDocumentRef pdfDoc=CGPDFDocumentCreateWithURL(pdfURL); CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfDoc, pageNumber); But I am unable to find a way to convert pdfPage into NSData so that I can attach it with mail. NOTE: The

How to display CGPDFDocument in swift?

ε祈祈猫儿з 提交于 2019-12-03 21:55:40
Hi I have a CGPDFDocument object. I want to open this document by either showing it in my app or using an external application. Here is the code I have so far. in SWIFT let cfData = CFDataCreate(kCFAllocatorDefault, UnsafePointer<UInt8>(data.File.bytes), data.File.length) let cgDataProvider = CGDataProviderCreateWithCFData(cfData) let cgPDFDocument = CGPDFDocumentCreateWithProvider(cgDataProvider) Nilo0f4r with help from this answer in objective-c, here is a working example in swift: override func draw(_ rect: CGRect) { super.draw(rect) let context: CGContext = UIGraphicsGetCurrentContext()!

Get CGPDFDocumentRef name of document

落花浮王杯 提交于 2019-12-03 15:45:48
Is it possible to retrieve the name of a document from a CGPDFDocumentRef By "name of a document", do you mean the document filename or title? If the document "title" is included in the metadata it can be retrieved like this: char *titleKey = "Title"; CGPDFStringRef titleStringRef; CGPDFDictionaryRef info = CGPDFDocumentGetInfo(myDocumentRef); CGPDFDictionaryGetString(info, titleKey, &titleStringRef); const unsigned char *titleCstring = CGPDFStringGetBytePtr(titleStringRef); printf("title: %s", titleCstring); The other keys are listed in section 10.2 of the PDF 1.7 specification: Adobe PDF

How to digitally sign a PDF using X.509 certificate data from iOS application

大憨熊 提交于 2019-12-03 07:00:19
I am generating PDF's in my app. I want to give the best security to these pdf's generated through my app. I have added the default security options provided by Apple, like Owner password, allow copying, allow printing etc... But I would like to add my certificate information or call it as Digitally sign the pdf's using the custom certificate(X.509 certificate) files. Does security framework help in any way ? or How can this be achieved? Unfortunately, iOS doesn't seem to provide this feature natively . Searching for a library that will apply a digital signature to a PDF is difficult, as many

How to access hyperlinks in PDF documents (iPhone)?

放肆的年华 提交于 2019-11-30 13:24:07
Is it possible to get access to "internal" links in PDF documents using CGPDFDocument , or other means? I'm building a simple reader app and would like to deliver my content in PDF form, but if I can't support links between pages in the doc this probably isn't going to work. This question is similar, but does not address the issue of how to support hyperlinks. jbm See my answer here . Basically, you'll need to get familiar with PDF link annotations. see this sample code...pdf hyperlinks works in this https://github.com/vfr/Reader If you're using Quartz to open and view a PDF , then yes, it