Copy link to clipboard
Copied
This is my code:
<cfhtmltopdf orientation="landscape">
<h3>Test Landscape Output</h3>
</cfhtmltopdf>
This is my output:
Copy link to clipboard
Copied
Using ColdFusion 2023 Update 4
Copy link to clipboard
Copied
I can confirm the same (and on update 5 as well, or with no updates at all). Thanks for sharing it.
I have filed a bug report for this (saving you the trouble, and adding a bit more info for interested readers):
https://tracker.adobe.com/#/view/CF-4219706
Copy link to clipboard
Copied
Eight months and 3 updates later, the problem still exists.
Copy link to clipboard
Copied
Report a ColdFusion bug. In it, refer to https://tracker.adobe.com/#/view/CF-4219706
Copy link to clipboard
Copied
just installed 2023 update 11 and it's still not working
Copy link to clipboard
Copied
Dwayne, did you clear the felix-cache? The steps are in the update technote, to help with other issues related to the htmltopdf package. It may help with yours. I've confirmed landscape does work after the update, a bug fix it specifically addressed as you may know.
Let us know if it helps or not.
Copy link to clipboard
Copied
I did. After the update, output didn't work at all. Cleared the cache folder and output works, just not landscape.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Already have... had a session with support to review my problem. He took a code snipit from me. He couldn't get his working environment to actually run cfhtmltopodf, so he said he'd get back to me. Haven't heard back.
Ravi Shankar Chagnur ColdFusion case# 133901
Copy link to clipboard
Copied
@dwaynea8754223I'd be happy to look at this for you free of charge if you want to reach out directly through my website: jason@jasonholden.com
Copy link to clipboard
Copied
I did. After the update, output didn't work at all. Cleared the cache folder and output works, just not landscape.
By @dwaynea8754223
Hi @dwaynea8754223 ,
The code
<cfhtmltopdf orientation="landscape">
<h3>Test Landscape Output</h3>
</cfhtmltopdf>
does in fact work on Update 11 of ColdFusion 2023. To get it to work, do the following:
6. Run the above cfhtmltopdf code. Confirm whether or not it now works as expected.
Copy link to clipboard
Copied
And in case what BKBK offered doesn't help, I have another possible explanation for what's going on.
1) First, Jason, that was indeed kind of you to offer that free help to Dwayne.
And BKBK, like you I have shown Dwayne above on Oct 29 that Jason's simple example at the top here DID work for me now, after the update (and clearing of the felix-cache). He responded that it still didn't work (didn't produce landscape). As for the edit of the pf service you propose, that is indeed valuable if no pdf at all is produced (more in a moment).
And it's of course disappointing that the Adobe rep couldn't run any cfhtmltopdf example. Of course, lots of people trip over either not having the add-on service running, or they could have config issues in the CF admin, or they may have restarted the add-on service without retarting the CF service (a bug of its own, resolved by the tip BKBK shared), or they may have failed to clear the felix-cache after this Oct CF update.
2) But since it works for me and BKBK (and if it works for you, Jason), then it may help to hear how Dwayne's setup may differ from ours. I'm running CF on Windows, as a service, but perhaps more important the add-on service I'm using is the one that was installed by CF. What about yours, BKBK, Jason and Dwayne?
3) I ask because a new thought occurred to me: Dwayne, are you by any chance running the CF add-on service as something that you implemented using an installer SEPARATE from CF itself? That's an option, available in the "developer tools" section of the CF downloads page. That's really meant for those who would want to implement this addon service on a machine that was separate from CF, but some run it because they find that whoever installed CF failed to have that installer implement the add-on feature and now they want to use cfhtmltopdf or the Solr integration--both of which rely on this add-on services feature.
3a) And note that this other add-on installer will default to installing this addon feature to a different folder than CF itself. On Windows it would be C:\ColdFusionAdd-onServices, while on Linux it would be /opt/coldfusionaddonservices.
But the CF updater expects to find and update the addon service in the "jetty" folder within the CF folder. So the add-on feature implemented by that other "add-on" installer would NOT be updated by the CF update (at least, not by default). This is a subtle point, easily missed. (Some resources DO suggest one tell that other installer to implement itself in the CF jetty folder, but again it's not the default offered when one runs that other installer.)
And THAT could be why yours doesn't reflect the update, Dwayne (if the update's fixing of the landscape problem was as much about changes it would make to the addon service itself as to the htmltopdf package within CF--again, they are separate proceses).
4) In fact, I just finally did go ahead and do this: I installed the separate addon service (which got implemented as on port 8996, one higher than the 8995 that the "normal" CF2023 addon service uses), and I let it install into that other directory that it defaults to. (Because I already had the normal CF add-on service listed in Windows Services, this other installer did NOT create a new service. I started it with the jetty.exe command in the root of that C:\ColdFusionAdd-onServices folder. On Linux it's called cfjetty.)
Then I changed the CF admin "pdf services" page to point to that instance's 8996. And now my test of that page using the landscape did NOT work (the PDF was produced, but was portrait, like Dwayne seems to be experiencing).
I realize all this may NOT be your issue, Dwayne, but perhaps it will be. Or even if it's not, perhaps this info will help others who find this thread.
Copy link to clipboard
Copied
Extra information, in addition to my previous post:
Copy link to clipboard
Copied
Bkbk, can you please clarify: when you ran that separate add on installer, did you tell it to implement itself in cf's jetty folder? Or did you let it default to the new, separate ColdFusionAdd-onServices folder? As I discussed in my last message (that it seems you're responding to), that's a seeming key factor. Also, what OS are you running the test on?
Dwayne and Jason, I look forward to your responses as well, to help us hopefully resolve Dwayne's challenge.
Copy link to clipboard
Copied
@Charlie Arehart everything is working for me. However, we set everything up using the primary CF installer not the add-on installer.
Copy link to clipboard
Copied
Fair enough, Jason. And to be clear, my first response to Dwayne was also about landscape working with the built-in add on service. Then it failed to show landscape if I used the addon implemented via the separate installer (installed into its default location).
So now we wait to hear what Dwayne's setup is, to understand why it fails to work for him. Or if he reaches out to you directly, please let us know how things settle out.
Copy link to clipboard
Copied
Bkbk, can you please clarify: when you ran that separate add on installer, did you tell it to implement itself in cf's jetty folder? Or did you let it default to the new, separate ColdFusionAdd-onServices folder? As I discussed in my last message (that it seems you're responding to), that's a seeming key factor. Also, what OS are you running the test on?
By @Charlie Arehart
My setup consists of:
I installed the standalone Add-On Service, accepting all the defaults.
Copy link to clipboard
Copied
That's certainly interesting. So @dwaynea8754223 , can you please let us know what you're finding, based on what's been shared over the past few days?
Copy link to clipboard
Copied
Hi - was on vacation for a long weekend.
I do use the Add-on Service installer. I also use the standalone CF installer as the Admin does not work for me. I believe it's because the CF service does not have the privledge to restart the service - I haven't looked into it. In any case, now that we think that may be the issue, how to we resolve it? Are you suggesting the Admin won't install the latest version? Or am I using a different package because it was installed using the add on service installer?
Copy link to clipboard
Copied
Welcome back, @dwaynea8754223 .
Say, you follow the 6 steps in my post of November 13. At step 6, run the code
<cfhtmltopdf orientation="landscape">
<h3>Test Landscape Output</h3>
</cfhtmltopdf>
Do you get a PDF in landscape format?
If not, what do you get, and what do the logs say?
Copy link to clipboard
Copied
I hit edit, then verify, then I got an error stating that the service was unavailable. Now it's gone and I can't seem to add it back. Every time I try, "Error adding PDF Service Manager. Please ensure that you have entered a correct PDF Service hostname and port.
Check logs for more details."
Log has not info.
This service was previously verified.
Copy link to clipboard
Copied
After a server reboot, the PDF Service Manager came back.
Copy link to clipboard
Copied
Thanks for the update. Nice to hear that the PDF Service Manager has come back.
Just to be sure, does the cfhtmltopdf code work at last?
Copy link to clipboard
Copied
cfhtmltopdf has always worked, although it doesn't seem to render on the very first execution after a server reboot.
here is simple test code that most closely resembles my actual code.
<cfhtmltopdf marginBottom = "1" marginLeft = "0.5" marginRight = "0.5" marginTop = "2" orientation = "landscape">
<head>
<title>Test</title>
</head>
<body>
<cfhtmltopdfitem type="header">
<cfoutput>
<div>
<div>
<h1>Header</h1>
</div>
</div>
</cfoutput>
</cfhtmltopdfitem>
<p>This is the body of the document.</p>
<cfhtmltopdfitem type="footer">
<h5>Footer</h5>
</cfhtmltopdfitem>
</body>
</cfhtmltopdf>