Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

iText & VerticalText

New Here ,
Jun 20, 2007 Jun 20, 2007
Vertical Text in PDF using <CFDOCUMENT>

--------------------------------------------------------------------------------

I am using font tag in a CSS file to layout a table header using vertical text.
In HTML, the vertical text looks fine. However, when I convert the table to a
pdf using <cfdocument>, the vertical text is displayed as horizintal text and
does not follow the css specified font family, color or size.

I'm trying to use the iTEXT class VerticalText to create the text, but i'm having trouble understanding how to call the method.

I have created the object using myObj.vertText = createObject("java","com.lowagie.text.pdf.VerticalText");

Does anyone have ideas on how to use iText and call its functions?

Thanks.
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jun 21, 2007 Jun 21, 2007
Just use cfloop and mid()



Translate
Advocate ,
Jun 20, 2007 Jun 20, 2007
This seems like a thread for Adobe's PaulH. Hopefully, he jumps on with some useful code. In the meantime, how comfortable are you with converting Java logic to CF? the iText site has the following code example for creating vertical text:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2007 Jun 21, 2007
To be honest i'm not too hot at this side of CF programming. I've only just started using object orientated code (i know, we're a bit behind the times in my workplace!!)

Can you give me a bit of a start as to how how I would convert this stuff? Is it best to use CFCs?

Thanks again for your help, Ally
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 20, 2007 Jun 20, 2007
> I am using font tag in a CSS file to layout a table header using vertical text.
Cfdocument is supposed to support CSS2, but is vertical text part of the CSS2 spec? I thought it was CSS3.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 21, 2007 Jun 21, 2007
AllyBongo,

Are you going to convert the whole thing to iText? Just wondering if its worth it for just vertical text.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2007 Jun 21, 2007
Hey, Its probably not worth it but I don't really know how else to go about it.

MY users have a form matrix which they enter text into fields and mark checkboxes against items. Some of the items are displayed vertically so it all fits on to one page and then they produce a PDF from it ..... probably doesn't explain it very well actually!!

Do you know how else I could get round this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 21, 2007 Jun 21, 2007
A matrix is one case where it might be worth converting to iText.

There's the old html <br> hack to create vertical text. You manualy (or with cfloop) put a <br> after each letter. Its super kludgey but it sorta' gets the job done

...
V<br>
E<br>
R<br>
T<br>
I<br>
C<br>
A<br>
L<br>
...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2007 Jun 21, 2007
Any advice on how to do it with a cfloop?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 21, 2007 Jun 21, 2007
Just use cfloop and mid()



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2007 Jun 21, 2007
LATEST
Great Thanks, works a treat!!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources