PDF TJ Operator

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

PDF TJ Operator

Post by Benjamin »

Anyone know anything about rendering numbers in a PDF document using the TJ operator?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PDF TJ Operator

Post by Weirdan »

I'm pretty sure all you need is to put them into parenthesis, like this:

Code: Select all

[(-12.23)] TJ
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PDF TJ Operator

Post by Benjamin »

It appears the character sets are not mapped literally. So the character 3 might actually be NULL.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PDF TJ Operator

Post by Benjamin »

I've built a system that locates place holders in a PDF file and replaces them with customized text. This is used to provide custom PDF documents.

There appears to be multiple font streams per font. If the wrong stream is used arbitrary characters will not render correctly. They either display as if the encoding is wrong or they have a width of 0. I'm wondering if anyone has any experience with this and if there are any workarounds.

Would it be better to use a PDF form and then flatten it?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PDF TJ Operator

Post by Weirdan »

They either display as if the encoding is wrong or they have a width of 0.
Most pdf editors / printers would not include a character into the font stream if it's not used anywhere in the document - in other words they strip unused characters from the font. Sounds very similar to your issue.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: PDF TJ Operator

Post by josh »

I don't know anything about this but since you PMd me figured I'd throw this link out here http://framework.zend.com/manual/en/zend.pdf.html
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PDF TJ Operator

Post by Benjamin »

Thanks, I think Weirdan might be onto something. I'll do some more research on this.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PDF TJ Operator

Post by Benjamin »

@Weirdan, you were 100% correct. Embedding every character into the PDF document solved the problem. Thanks alot.
Post Reply