escaping characters for substitution into a PDF

后端 未结 2 2063
我寻月下人不归
我寻月下人不归 2021-02-11 04:57

Can anyone tell me the set of control characters for a PDF file, and how to escape them? I have a (non-deflated (inflated?)) PDF document that I would like to edit the text in,

2条回答
  •  日久生厌
    2021-02-11 05:57

    Okay, I think I found it. On page 15 of the PDF 1.7 spec (PDF link), it appears that the only characters I need to worry about are the parentheses and the backslash.

    Sequence | Meaning
    ---------------------------------------------
    \n       | LINE FEED (0Ah) (LF)
    \r       | CARRIAGE RETURN (0Dh) (CR) 
    \t       | HORIZONTAL TAB (09h) (HT)
    \b       | BACKSPACE (08h) (BS)
    \f       | FORM FEED (FF)
    \(       | LEFT PARENTHESIS (28h)
    \)       | RIGHT PARENTHESIS (29h)
    \\       | REVERSE SOLIDUS (5Ch) (Backslash)
    \ffffd     | Character code ffffd (octal)
    

    Hopefully this was helpful to someone.

提交回复
热议问题