CGPDF is an iOS and Mac OS X API for reading and writing PDF documents. CG at the start is an abbreviation of “Core Graphics”.
Questions tagged [cgpdf]
60 questions
0
votes
1 answer
Passing UnsafeMutablePointer to Ref Object in a function in swift 3
I'm developing a pdf parser in swift, so i've stumbled upon the function CGPDFScannerPopString which takes a CGPDFScannerRef and an UnsafeMutablePointer?
The Objective C code looks like this:
CGPDFStringRef…

Michael Schmid
- 15
- 4
0
votes
2 answers
Create Multi-Page PDF from other PDFs
I've previously posted a related question on SO, but to no avail. I then changed my approach and created PDFs which all have the exact same dimensions, etc. All these PDFs also consists of one page only.
Now I would like to combine these single…

Jaco Griesel
- 365
- 4
- 15
0
votes
1 answer
Scroll To Specific Page using CGPDF
I am struck with this past two days i don't find any proper documents relating to CGPDF. I tried every possible way but i failed. Here is what i am trying to do. I have a PDF to display and i am displaying it in a UIWebView. I have created a CORE…

iOSDeveloper
- 461
- 4
- 20
0
votes
1 answer
Add text to PDF Page using CGPDFContext on OS X
I have tried to add text to an exist PDF file, which has 5 pages, by CGPDF and CGPDFContext but failed. I have set the font, DrawingMode, FillColor... Did I miss something in the code?
CGContextRef writeContext = NULL;
CGRect mediaBox;
…

BigStrewBurry
- 13
- 3
0
votes
1 answer
Tiled PDF view is leaking memory (non ARC)
So I work on a very large and very old legacy project that was coded about 5 years ago in non-ARC objective c code. I took over from the previous developers and now have to maintain this beast.
The app allows users to read PDF pages that are…

Nick Kirsten
- 1,187
- 11
- 27
0
votes
0 answers
Reading text from PDF with CGPDFScanner - what is wrong with this PDF file?
I'm trying to extract the text from this file:
https://www.dropbox.com/s/249snnj1nsve5ir/Lebenslauf.pdf?dl=0
using CGPDFScanner. I can detect that the character encoding is WinAnsiEncoding from the included PDF dictionary, but the characters all…

skubo
- 58
- 9
0
votes
2 answers
Simple Pdf Viewer using CGPDF
I need to create a pdf viewer application in iOS .I found using Quartz CGPDF can achieve this I can't found a proper start . I checked apple documentation…

Sat
- 1,616
- 3
- 22
- 40
0
votes
0 answers
iOS CGPdf highlight text using CGrect
I am trying to highlight text using rect but the code below:
CGRect originalSize = CGPDFPageGetBoxRect(pagePDFRef, kCGPDFMediaBox);
return me rect less then I expected or maybe less then I see.
Is there any already made method that highlight text…

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
0
votes
1 answer
CGPDF how to get hyperlink text
I need to get table of context from my PDF and put it in UITableView. To do this I need to retrieve text (Paragraph name) and page number.
as PDF example I use apple documentation PDF
PDF Contents Example
UI Design Basics - 8
Designing for iOS 7 …

Irina Didkovskaya
- 59
- 1
- 2
0
votes
2 answers
CGPDFDictionaryGetString getting dimensions of PDF issues
Building onto this question, I have tried to delve into CGPDF to get PDF size data without loading it into memory.
This part of iOS is very poorly documented, and searching the web only gives me some bad results about writing to pdfs.. Here is what…

Oscar Apeland
- 6,422
- 7
- 44
- 92
0
votes
1 answer
Poor quality of CFGPDF rendered in bitmap context
Is there a way to render a PDF page into bitmap context without losing quality?
Here is my code:
-(UIImage *)imageForPage:(int)pageNumber sized:(CGSize)size{
CGPDFDocumentRef _document = [self CreatePDFDocumentRef:filePath];
CGPDFPageRef…

Janusz Chudzynski
- 2,700
- 3
- 33
- 46
0
votes
2 answers
Drawing geometry (circle or rect) on zoomable CGPDF document using QuartzCore
I am trying to draw on touches (mouse tap) on the pdf document generated by CGContextRef from my resource bundle. I have started from Apple zoomingpdfviewer
where I have a UIScrollView and Pdf is generated by CGContextDrawPDFPage(context,…

Vacca
- 1,219
- 16
- 26
0
votes
1 answer
PDF file is loaded into CGPDFDocumentRef, but it doesn't display in view
I would like to use CGPDF API to show and manipulate the PDF on IPAD, but firstly, I'm trying to just show PDF on my view from the easy way (without screen adjusts). I don't know why PDF doesn't appear im my application, maybe i'm doing sth wrong.…

jbernardo
- 161
- 1
- 4
- 14
0
votes
1 answer
CGPDFScannerPopString returning strange result
I finally got some sort of pdf scanner to work. It reads into the callback functions without a problem, but when I try to NSLog the result from a CGPDFScannerPopString I get a result like this:
ˆ ˛˝ # ˜˜˜ #˜' ˜˜˜ "˜ '˜˜ " ' …

Ron
- 1,047
- 13
- 18
-2
votes
1 answer
Best and easiest way to directly render CGPDFPage
I am looking for an easy, direct and straightforward way to render a CGPDFPage and view it on an iOS device.
The rendered page should fill the view to which it is drawn and be crispy clear.
The less the code used in the method the better. However,…

MhdSamad
- 23
- 6