<div dir='auto'><div><br><div class="gmail_extra"><br><div class="gmail_quote">Am 14.12.2018 6:24 nachm. schrieb "Osipov, Michael" <michael.osipov@siemens.com>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
<br>
<br>
Am 2018-12-14 um 18:18 schrieb Arthur Reutenauer:> Michael,
<br>
>
<br>
> On Fri, Dec 14, 2018 at 06:03:01PM +0100, Osipov, Michael wrote:
<br>
>> Especially because the post-processing on the target side is out of
<br>
my hands
<br>
>> at all.
<br>
>
<br>
> This is the information I was missing in your first email. So to
<br>
> reply to your original question: yes, it is virtually impossible to
<br>
> post-process a PDF file with sed, in the general case.
<br></p></blockquote></div></div></div><div dir="auto">To explain this in detail: The main point is how PDF files are saved. </div><div dir="auto"><br></div><div dir="auto">* The byte position and byte length of every pdf object is fixed and written to a global index (xref). So you could principally only make replacements of the same source and target byte length.</div><div dir="auto"><br></div><div dir="auto">* And then the trouble with the new characters and font starts ( unicode map, character vs glyph index, glyph spacing, font features like character substitution, etc)</div><div dir="auto"><br></div><div dir="auto">* BTW: Compression wouldn't be a problem, you could use qpdf --stream-data=uncompress input.pdf uncompress.pdf</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
My hope is that some xdvipdfmx guys says: "Hey, we can do
<br>
\plainmagic{%DOCID%} and this part will be pure text in the PDF".
<br>
<br>
So one has to alter xdvipdfmx, if possible at all.
<br></p></blockquote></div></div></div><div dir="auto">No, that wouldn't help, like I explained before.</div><div dir="auto"><br></div><div dir="auto">Christoph</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
</p>
</blockquote></div><br></div></div></div>