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
0
votes
1 answer

CGPDFDocumentCreateWithURL memory usage

Hi every one i am here to clarify my doubt it might be silly for most of them but i need it for my app.my question is while writing the below line CGPDFDocumentRef myDocumentRef= CGPDFDocumentCreateWithURL(pdfUrl); how much memory will it take…
ajay
  • 3,245
  • 4
  • 31
  • 59
0
votes
1 answer

How to change the background color of CGPDFPageRef, and how to remove the page's shadow

I'm trying to draw content in a UIWebView instead of a UIView, because I like UIWebView's ability to zoom in and out by pinching. Here's my code: // setup environment CGRect outputRect = myWebView.bounds; CFMutableDataRef data =…
DTs
  • 1,196
  • 1
  • 11
  • 28
0
votes
0 answers

UIGraphicsImageRenderer does not see some content on PDFPage

I use code from huckingwithswift.com as it is: private func imageFromPDF(page: CGPDFPage) -> UIImage { let pageRect = page.getBoxRect(.mediaBox) let renderer = UIGraphicsImageRenderer(size: pageRect.size) let image = renderer.image { ctx…
Konstantin.Efimenko
  • 1,242
  • 1
  • 14
  • 38
0
votes
1 answer

how to change the font properties(size, color,style) of the pdf document in UIWebView CGPDFDocumentRef

i am doing one eBook reader app for iphone in objective c ,i have tried 2 methods of loading pdf document using UIWebView and CGPDFDocumentRef but i am not getting how to change the font properties(size, color,style) of the pdf document in either of…
Ravi
  • 1,759
  • 5
  • 20
  • 38
0
votes
0 answers

Add Completion Handler for when PDF has been downloaded

UPDATE: At a suggestion, I tried implementing a NSURLSession to download and then draw the file. I have this now in my code, and it mostly works, but I've found if it is more than 1MB, it simply won't draw. I've also found if there are multiple…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
0 answers

Skip Pages of a PDF on tvOS

In my TV app, I am able to load a PDF, draw it in a scroll view, and when the down button is pressed, it navigates to the next page. What I'd like to do, is be able to skip pages. This will correspond with a database where it loads a PDF, and the…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
1 answer

CGPDFScannerCallback -- what does the info parameter point to?

Apple's CGPDFOperatorTable Reference says a PDFOperatorCallback should look like this: void MyCGPDFOperatorCallback ( CGPDFScannerRef scanner, void *info ); Parameters scanner A CGPDFScanner object. Quartz passes the scanner to your callback…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
0
votes
2 answers

Loading PDF in iPad

I am using CGContextDrawPDFPage class to render PDF in my app without any trouble. But, the amount of time taken to load the book is a bit more and the time taken to render the page is proportional to the number of pages in the PDF. In my case,…
A for Alpha
  • 2,904
  • 8
  • 42
  • 76
0
votes
1 answer

iOS application update problem with files in documents directory

Oddest issue, thought I would see if anyone had run into this before. We have an iPad application that stores PDF files in the documents directory. All goes great, we can open the PDF's with CGPDFDocumentCreateWithURL all day long. Then, we…
Rob Bonner
  • 9,276
  • 8
  • 35
  • 55
0
votes
1 answer

Determine rendered height in a PDF document for drawing dynamic-sized page footers, on macOS

Assuming I print a small amount of text into a PDF document, I like to know how much of the page is actually used by the text. For example, if I render a short text paragraph into a PDF document, I like to learn the content height of only that text,…
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
0
votes
2 answers

CGPDFDocumentCreateWithURL will download the file in to documents directory or not

I am accessing the PDF files available in my PHP server using my iPhone with the help of passing file url to CGPDFDocumentCreateWithURL. My question whenever i access the files it will downloaded to my iphone documents directory or not? Because if…
Vignesh Babu
  • 670
  • 13
  • 30
0
votes
1 answer

CGPDFViewController and multipage PDF (zomming)

I am trying to create a basic PDF viewer for iOS, and I am pretty much stuck. I only want it to be able to view PDFs and jump to a specific page. Here is what I have done so far: #import "SFPDFViewerController.h" #import…
csotiriou
  • 5,653
  • 5
  • 36
  • 45
0
votes
1 answer

Search for a word in a PDF on iPad

I use CGPDFDocumentRef control to view pdf file in iPad. I want to add search capability and highlight the results. Any suggestions on how I can do so? In addition, I would like to know if there there a way to zoom in and out using a multi-touch?
Nidal Saed
  • 33
  • 2
  • 5
0
votes
2 answers

Rotate CGPDFDocument/Page

I'm loading a CGPDFDocument, adding that as a sublayer to a UIView (myContentView), and then adding myContentView to a UIScrollView. That works fine. Now I want to allow the user to rotate the PDF if they choose to. It's easy to get the PDF to…
Steve N
  • 2,667
  • 3
  • 30
  • 37
0
votes
1 answer

CGPDFDocument can't draw jpeg2000?

HI,guys. I'm using this code to draw pdf,but i've compress the pdf's image to jpeg2000.so the cgpdfdocument can't decode the jpeg2000,just show noting but blank.how can i make it to decode the jpeg2000? thanks.any advice will be…
zhouxiang
  • 153
  • 3
  • 12