Questions tagged [cgpdfdocument]

cgpdfdocument is part of Apple's Core Graphics framework. It specifically refers to a document that contains PDF (Portable Document Format) drawing information used in this framework. Use this tag for questions related to this type of document.

cgpdfdocument is part of Apple's Core Graphics framework. It specifically refers to a document that contains PDF (Portable Document Format) drawing information used in this framework. Use this tag for questions related to this type of document.

104 questions
4
votes
2 answers

Save unlock PDFDocumentsRef to local directory

I am working on pdf in my new iPhone app. I am checking PDF is lock(password protected) or not BOOL bIsUnlock = CGPDFDocumentIsUnlocked(PDFDocument); If pdf is lock then BOOL success = CGPDFDocumentUnlockWithPassword ( PDFDocument, [password…
3
votes
3 answers

swift CGPDFDocument parsing

I'm trying to use Swift to parse the contents of PDF documents, following Apple's programming guide (in which all the examples are ObjC...) let filepath = "/Users/ben/Desktop/Test.pdf" let localUrl = filepath as CFString if let pdfURL =…
benwiggy
  • 1,440
  • 17
  • 35
3
votes
1 answer

Annotation(Image & Text) subviews changes position after saving

I have created a PDF based application. Firstly, I get the PDF from document directory then convert it to Images and then programmatically set all images to vertically by using UIImageView & ScrollView. Then I set different type of annotation like…
Rock
  • 64
  • 5
3
votes
1 answer

How to display two pages in one scrollview page with zooming from PDF?

I want show per page pdf in portait mode and display two pages when rotate to landscape mode on ipad . I had search on internet and can't find any solution. I thought two possible way. 1.Using webview but I don't know how to display two page in…
coolbird
  • 31
  • 3
3
votes
1 answer

How to Recognize Cover Pages in PDF-Document

I would like to implement a PDF-Viewer which shows two pages of the document side by side at a time. Naturally, the document should show the cover page alone if it exists such that those pages belonging together are shown simultaneously. The problem…
Captain Fim
  • 524
  • 2
  • 13
2
votes
1 answer

Create a CGPDFDocument from a byte array

In MonoTouch I am looking to create a CGPDFDocument from a byte array transferred back text encoded from a web service. However MonoTouch does not seem to support creation from anything other than a local file or downloaded from a URL. Anybody know…
2
votes
2 answers

CGContextDrawPDFPage crashing without ever producing a memory warning

I'm trying to render a PDF page with some annotations on it (to email), and most of the time this works fine. However, with this PDF in particular it seems to crash every time on the call to CGContextDrawPDFPage for the first page. I have added…
Philippe Sabourin
  • 8,066
  • 3
  • 31
  • 46
2
votes
1 answer

Get Page Size From PDFDocument iOS

I'm having issues getting the size of a page in a PDFDocument. The following code gets the size (width and height), but the results are inconsistent. It can even be inconsistent from page to page within the same PDFDocument being tested. One…
user2621075
  • 357
  • 4
  • 15
2
votes
0 answers

Parsing pdf for image with iOS sdk for iPhone

I am developing an app which contains pdf book reading. I found how to display pdf file page by page through CGPDF API. What I need to know is, can we somehow parse the pdf and find if a page contains certain image and if we can enable tap/ touch…
WaJiyaz
  • 512
  • 1
  • 8
  • 25
2
votes
1 answer

CGPDFDocument and local data

I have some NSData in Core Data db (it's pdf data) and I would like to print my pdf with CGPDFDocument. I have to use url of the data but I don't know how to make this with a local data (in my Core Data db). Someone has an idea ? :) Thanks !
Pierre
  • 10,593
  • 5
  • 50
  • 80
2
votes
1 answer

How to use documentAttributes of CGPDFDocument

According to Apple's documentation CGPDFDocument has a var called documentAttributes: var documentAttributes: [AnyHashable : Any]? { get set } I'm having trouble seeing how to use this to either get, or set document attributes of a PDF in Swift.…
benwiggy
  • 1,440
  • 17
  • 35
2
votes
2 answers

iPhone/iPad draw pdf like iBooks?

Does anyone know how to use core graphics to draw a pdf like in iBooks. I can already draw a pdf page using core graphics but was curious how iBooks shows a lower quality view of each page so it loads fast and then when you stay on a page longer it…
marchinram
  • 5,698
  • 5
  • 47
  • 59
2
votes
1 answer

Extracting thumbnail image from CGPDFPageRef

I am attempting to create thumbnail images for a CGPDFDocument. In the PDF Document Parsing section of the Quartz Programming Guide, there is the following code: CGPDFDictionaryRef d; CGPDFStreamRef stream; // represents a sequence of bytes d =…
mona
  • 63
  • 2
  • 8
2
votes
0 answers

CGPDFDocument and the trailer/encrypt dictionary

I am trying to get access to the /Encrypt dictionary in the Trailer to check permissions on a PDF. CGPDFDocument only gives access to the Info and Root (top level) dictionaries it…
pchronos
  • 81
  • 3
2
votes
1 answer

Highlight in CGPDFDocument

I'm new in iphone I opened a pdf file using CGPDFDocument. I want to make it when do a long press in a specific line in document, do a highlight. any sample code to do this?? Thanks in advance.
user1553381
  • 415
  • 2
  • 13
  • 30