Questions tagged [cgpdfscanner]
16 questions
5
votes
1 answer
iOS - Differentiate between background text (watermark) and real text in PDF
I have a pdf with watermark at the background of it. When start scanning for highlighting any word with watermark or annotation at background, that gets selected as it is found first in touch area. I am using CGPDFScanner to scan the text. My…

Swaroop
- 501
- 4
- 18
2
votes
0 answers
get pdf text in swift
i try with no success to get the text from a pdf page.
i try :
CGPDFOperatorTableSetCallback(operatorTableRef!, "ET") { (scanner, info) in
var val:UnsafePointer?
let ret=CGPDFScannerPopName(scanner, &val)
print("ET : \(val) (\(ret))…

Olivier
- 25
- 1
- 8
2
votes
1 answer
CGPDFStringGetBytePtr returning incorrect string while scanning pdf
I have one PDF and I am trying to scan PDF using CGPDFScanner.
While scanning the pdf, when the word "file" is encountered, the CGPDFStringGetBytePtr API returns "\x02le". PDF is having Type1 font and no ToUnicodeMapping(CMap). Encoding dictionary…

Swaroop
- 501
- 4
- 18
2
votes
2 answers
iOS: Pdf scanner get coordinates of text
I am using CGPDFScanner to scan the pdf. Should I use Td operator to find positions of text? Can I have an example that how to use this operator to get positions of the text? Current I have used Tj and TJ operator to find the text. Now I would like…

Ayaz Alavi
- 4,825
- 8
- 50
- 68
1
vote
1 answer
Parsing PDF font operator missing
I'm parsing a PDF file and it seems that a Tf operator is missing. I can see, on PDF readers like Acrobat reader or Preview, that the font changes. But during the parse I don't have the Tf operator. I still have the ET operator that marks the ending…

bob
- 382
- 2
- 17
1
vote
1 answer
CGPDFScannerScan doesn't call callback function
I am trying to get strings from a pdfFile sent to my app via open in... menu in from another app.
I wrote a pdfscanner to which I pass a pdfPage and the scanner should fire a callBack "getString"
i am using SWIFT mostly but the scanner code is in…

Vincent
- 11
- 5
1
vote
1 answer
Parsing PDF get same text twice in different page
I have a PDF file which contains 2 pages. When I parse it with my parser, in Ojective-C, I have the following situation.
For the first page everything is Ok, I have text that I should have (that I visually see in pdf readers like Preview, Adobe…

bob
- 382
- 2
- 17
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
1 answer
CGPDFScanner - \x15 character while scanning
I am trying to extract the text of page 5 in pdf.
The pdf have a font YLJAAA+CMSY10 which has no mappings (CMap) or even encodings (default encoding or /Differences). While extracting text, after string "tetex package" CGPDFScanner returns "\x15"…

Swaroop
- 501
- 4
- 18
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
1 answer
Spaces are not detected while scanning PDF - iOS (CGPDFScanner)
I am working on pdf scanning,where I want to extract text from the PDF.
I am using pdf Multithreading.pdf for searching. I am able to extract the text but am not able extract spaces from the text.I am getting only callbacks for Tj operator and not…

Swaroop
- 501
- 4
- 18
0
votes
1 answer
iOS pdf search highlight result
I have found a great post here http://web.archive.org/web/20131122162015/http://blog.random-ideas.net/?p=184 that sow how to use scanner but how to highlight the result?

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
0
votes
1 answer
iOS How to get all words coordinates in PDF page
I have looked through many tutorials and usually stack users trow links to the pdfkitten, but as I've tested it I have not satisfied with result. So the search does not work with multiply word and etc.
So what I am looking for I need to get all…

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
0
votes
1 answer
Reading exact text from the "Tj/TJ" operator of CGPDFDictionaryRef
I am trying to read text from the "Tj/TJ" operator of CGPDFDictionary, but the TJ/Tj operator has the text in (encoded) format for e.g,
Tj = <00><1F><05>. Now i want to get this exact text in NSString i.e NSString should contain "<00><1F><05>".I…

Ash_B
- 393
- 1
- 3
- 8
0
votes
2 answers
Unable to read text from Pdf in ios
I am trying to extract text for pdf document in my iOS application, I am using CGPDFScanner..
I used the reference from these links:
need List search functionality in VFR Reader
Displaying and Searching PDF Content on iPhone
The methods…

ViruMax
- 1,216
- 3
- 16
- 41