cfdocument: extra whitespace when converting HTML to PDF
Copy link to clipboard
Copied
<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?

Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
http://databases.tanap.net/cgh/main.cfm?artikelid=20819&zoekwoord=C%2E%202
Here's the link to the PDF version:
http://databases.tanap.net/cgh/pdf.cfm?artikelid=20819

Copy link to clipboard
Copied
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?

Copy link to clipboard
Copied

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.


Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Did you ever solve this? I'm having the same issue.
Copy link to clipboard
Copied
@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.
Copy link to clipboard
Copied
In the meantime, see if the following helps:
<cfdocument format="PDF">
<cfprocessingdirective suppresswhitespace="true">
<!--- Your HTML goes in here. --->
</cfprocessingdirective>
</cfdocument>
Copy link to clipboard
Copied
Was this issue resolved?

