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

cfdocument: extra whitespace when converting HTML to PDF

New Here ,
Jul 10, 2006 Jul 10, 2006
Unwanted white-spaces appear when using inline HTML-tags, while converting HTML to PDF:

<cfdocument format="PDF" pagetype="A4" orientation="portrait" overwrite="no" fontembed="yes">
This is a sentence with <i>italics</i>.<br />
And here <b>bold</b> is used.<br />
</cfdocument>

The <i> and <b>-tags (actually: any tag) generates extra whitespaces.
Anyone an idea to solve this problem/bug?
TOPICS
Advanced techniques
2.1K
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
Guest
Jul 10, 2006 Jul 10, 2006
Interesting. Running your code (or mine) I see no extra spaces.
Can you post a link to the PDF or a screen shot?

Do you have whitespace management turned on in the CF Administrator?
What version of CF are you using?
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 ,
Jul 10, 2006 Jul 10, 2006
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
Guest
Jul 11, 2006 Jul 11, 2006
Took that html page and posted it on my test system - making sure the page looked exactly like the one you linked.

Then wrapped the whole thing in a cfdocument. In the resulting PDF (viewed with Adobe reader 6) there are no extra spaces.

However, the pdf generated that way has obvious style differences from the PDF you posted.
SO... How is the pdf stylesheet different from "common.css"?

Can you attach the code for pdf.cfm?

What version of CF are you using?

What version of Adobe?
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
Guest
Jul 11, 2006 Jul 11, 2006
I can confirm this formatting issue on Linux.
I tried it on Windows and Linux (RedHat) with exact the same code but only Linux yields wrong formatting (spaces/tab).
The error is still present in the last updater (7.0.2).

Probably other Unix based ColdFusion servers are affected too.
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
Guest
Jul 11, 2006 Jul 11, 2006
quote:

Originally posted by: Ruben
I can confirm this formatting issue on Linux.
I tried it on Windows and Linux (RedHat) with exact the same code but only Linux yields wrong formatting (spaces/tab).
The error is still present in the last updater (7.0.2).

Probably other Unix based ColdFusion servers are affected too.


I don't see this in the "known issues" list. Did you file a bug report at:
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=7
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 ,
Jul 15, 2006 Jul 15, 2006
Hello H&N
Thanks you post a sample pdf. How about multipages with some images. Are you have a cutoff line height? I was failure to control line height as it cutoff half heght in last and first line.
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 ,
Jul 17, 2006 Jul 17, 2006
quote:

Originally posted by: ad96004
How about multipages with some images. Are you have a cutoff line height? I was failure to control line height as it cutoff half heght in last and first line.


I did not have problems with images and/or mutlipages: just the inline HTML-formatting tags. In the meantime the version that caused the errors are not online anymore: we now use HTMLdoc. But since HTMLdoc doesn't support UTF-8 we had to workaround this workaround

If this is really a specific *Nix problem and everything is ok on the Windows-platform, it's a bummer. The Verity engine in the 6-release also did not work on *Nix but worked fine on Windows. Makes it look like Macomedia/Adobe cares more for Windows (the problem was never solved in the 6-release) and I think that's not good for a server environment advertised as cross platform.
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 ,
Jul 17, 2006 Jul 17, 2006
sorry for the double post
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 ,
Jan 21, 2021 Jan 21, 2021

Did you ever solve this? I'm having the same issue.

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
Community Expert ,
Jan 22, 2021 Jan 22, 2021

@tdaigle_2019 , this thread is ancient. ColdFusion has moved on since 2006. We're now 14 years and 8 ColdFusion generations later, analogous to over 200 years in human terms.

 

You should start a new thread. When you do, mention your ColdFusion version and Update level.

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
Community Expert ,
Jan 22, 2021 Jan 22, 2021

In the meantime, see if the following helps:

<cfdocument format="PDF">
<cfprocessingdirective suppresswhitespace="true">
<!--- Your HTML goes in here. --->
</cfprocessingdirective>
</cfdocument>
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 ,
Mar 13, 2024 Mar 13, 2024
LATEST

Was this issue resolved?

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