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

CFDocument, pdf and justify, oh my!

New Here ,
Oct 16, 2008 Oct 16, 2008

Copy link to clipboard

Copied

I can't get justified text in my PDF. I read around the internet that this was a known problem in version 7 all releases, but was supposed to be fixed in version 8. Here is an example of my code:

<cfdocument format="pdf" filename="c:\TestPDF.pdf" overwrite="yes">

<DIV align="justify">Text of paragraph 1.</DIV>

<p align="justify">Text of paragraph 2.</p>

<p style="text-align:justify">Text of paragraph 3.</p>

<p style="text-align: justify"> Text of paragraph 4.</p>

<table><tr align="justify"> <td align="justify">Text of paragraph 5</td></tr></table>

<table> <tr align="justify"><td>Text of paragraph 6.</td></tr></table>

<table> <tr> <td align="justify">Text of paragraph 7.</td></tr></table>

</cfdocument>

All paragraphs in the pdf are left aligned. If I changed "Justify" to any other option, Right, Left or Centered, the paragraphs do correspond. Below is the full version of my code so you can see I am in fact using enough text for it to be "justified". What do I need to do to make this happen?

<cfdocument format="pdf" filename="c:\TestPDF.pdf" overwrite="yes">
<DIV align="justify">1. This is the first paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. This is the first paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. This is the first paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. This is the first paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</DIV>

<p align="justify">2. This is the Second paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 2. This is the Second paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 2. This is the Second paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 2. This is the Second paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</p>

<p style="text-align:justify">3. This is the Third paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 3. This is the Third paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 3. This is the Third paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 3. This is the Third paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</p>

<p style="text-align: justify"> 4. This is the Forth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 4. This is the Forth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 4. This is the Forth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 4. This is the Forth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</p>

<table><tr align="justify"> <td align="justify">5. This is the Fifth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 5. This is the Fifth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 5. This is the Fifth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 5. This is the Fifth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</td></tr></table>

<table> <tr align="justify"><td>6. This is the Sixth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 6. This is the Sixth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 6. This is the Sixth paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</td></tr></table>

<table> <tr> <td align="justify">7. This is the Seventh paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 7. This is the Seventh paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines. 7. This is the Seventh paragraph. This is an amount of text equal to about a paragraph. This is for testing purposes only. I need enough text to fill four or five lines.</td></tr></table>

</cfdocument>
TOPICS
Advanced techniques

Views

2.6K

Translate

Translate

Report

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 ,
Oct 16, 2008 Oct 16, 2008

Copy link to clipboard

Copied

Here is a random webpage that named this "Bug 60590 - to be fixed in CF8"
http://list.cfdeveloper.co.uk/pipermail/dev/msg04010.html
(please note, I am using CF version 8,0,1,195765)

Votes

Translate

Translate

Report

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
Contributor ,
Oct 18, 2008 Oct 18, 2008

Copy link to clipboard

Copied

I reported it 2 or 3 years ago :-(. Adobe have neglected this bug thinking that no one cares if PDFs aren't justified. Given that Adobe invented the PDF format you'd think they'd (a) understand typography and the need for basic text formatting and (b) have the ability to fix it.

All we can do is hope it's fixed in CF9 and they repent by offering a hotfix for CF8 customers. I don't see why anyone should pay $$$ or $$$$ to upgrade just to get a really annoying bug fixed. To put it into perspective, we spent a 6 figure sum on developing a web app, a 5 figure sum on servers and nearly as much on CF licenses to create a highly professional solution, but something as crazy as unjustified text - which looks messy and unprofessional - really lets us down. "What do you mean you can't justify the text?" people say in amazement.

Votes

Translate

Translate

Report

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 ,
Oct 23, 2008 Oct 23, 2008

Copy link to clipboard

Copied

Is there anywhere to see that Adobe has recognized this bug, or a place to submit it as a bug?

Votes

Translate

Translate

Report

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 ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

LATEST
Hi,

I just ran into this trap.
My customer requests text aligned justified and I am realy stuck with my application now.

We are using ColdFusion Standard 8.01

Is there any workaround?

Regards

Martin

Votes

Translate

Translate

Report

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
Documentation