A related question here: (TJ and Td offset difference) has an answer which explains how to do the opposite (turn Tjs and Tds into an equivalent TJ). From this I can deduce fairly trivially how to do it the other way round, but this naive approach has the problem that other (seemingly unrelated) bits of text also get shifted when I do this (in a manner I don’t exactly understand).
A caveat in the answer the the question linked above points out that “even then the two forms are not identical because the text line matrix at the end differs” which is probably the cause of these seemingly random jumps in seemingly unrelated places.
I’m a PDF noob and not entirely sure what exactly a “text line” (or text line matrix) is.
I’m using PDFBox, in particular PdfContentStreamEditor (here) so an answer using that toolset would be especially great, but a good general “how to” would certainly get me a long way towards it.
Thanks in advance.