It is a bit difficult to find examples of or possible solutions for PDF source code - but I am hoping to find out if it is possible to automatically wrap text in PDF source code?
For instance I have the following stream:
stream
BT
/F1 10 Tf
100 692 Td
( Hello world! I want to... ) Tj
0 -15 Td
( Hola mundo! Quiero... ) Tj
ET
endstream
For brevity I have added in the ...
to the text above but it can be assumed that they intend to carry on for many, many lines. As far as I understand from the few examples I can find all you can do is try and split up the text into lines and wrap them each in their own ( ... ) Tj
.
I am wondering though if there is an easier way to ensure text wrapping automatically occurs? I am also hoping for a method that doesn't require too much overhead where possible - my goal is small file sizes.