Change PDF text using Apple PDFKit structure

I know at Apple PDFKit . I can get a string that returns an NSString object representing the text on the page. https://developer.apple.com/documentation/pdfkit/pdfpage?language=objc

Is there a way to change the text in a PDF? If not, how would you recommend me to start figuring out how to edit text in a PDF file? Thank!

+4
source share
1 answer

To understand your real problem, you need to learn more about how PDF works. Firstly, PDF is more like a container of instructions (drawing, rendering) than a container of content.

PDF. . Tagged PDF PDF- + , , .

HTML, , , , ..

, ,

50, 50
Arial
0, grayshades
"H"
60, 50
'e'

, , . . . .

, . . , " 456".

, . , . XREF.

Xref
152 42
0000000016 00000 n
0000001240 00000 n
0000002133 00000 n
0000002296 00000 n
0000002344 00000 n
0000002380 00000 n
0000002551 00000 n

. , "" "".

:

  • , "" 4 , "" 3 .
  • , .
  • , .

?

, PDF, . , , , .. .

, , script ( ). (, , , , .)

.

+5

Source: https://habr.com/ru/post/1692151/


All Articles