[tex-live] Making texts externally replaceable in PDFs, e.g. with sed(1)

Philip Taylor P.Taylor at Rhul.Ac.Uk
Fri Dec 14 18:18:16 CET 2018


Fair enough — if it has to be accomplished using "sed" or similar, then emulating Adobe Acrobat Pro DC is clearly a non-starter.
** Phil.
--------
Osipov, Michael wrote:
> thanks for your quick reply, but neither of will work and suffers from conceptual misunderstanding.
>
> Look closely at the Test.pdf, it is compressed. Cannot be processed with sed(1). Even if you decompress it, it contains a Type 1 font which has no /Encoding or /Ording. /FontFile3 references 10 0 obj which contains the entire font. This does not resemble my Unicode case at all.
> The content is in 5 0 obj:
>>  q 1 0 0 1 72 769.89 cm BT /F1 9.9626 Tf 19.925 -9.963 Td[(No)27(w)-332(is)-333(the)-334(time)-333(%DOCID%)-333(for)-334(all)-333(go)-28(o)-28(d)-333(men)-333(to)-334(come)-333(to)-333(the)-334(aid)-333(of)-333(the)-334(part)27(y)83(.)]TJ 211.584 -654.747 Td[(1)]TJ ET Q
>
> As for Adobe Acrobat Pro DC: It is a fully-fledged PDF suite which knows the format best and operates on an abstract memory representation of the PDF while sed(1) does operate on pure bytes.
>
> The operations this suite performing doing can only be achieved with a library like iText of PDFBox [1]. this isn't a route I really want to go. Especially because the post-processing on the target side is out of my hands at all.
>
> Regards,
>
> Michael
>
>
> [1] https://stackoverflow.com/q/52027733/696632

-- 
<Signature>
Philip Taylor


More information about the tex-live mailing list