Which seems weird to me too because docs show exam...
# adobe
s
Which seems weird to me too because docs show examples without that. Hmmm.
b
This still gives an error there os no body or source file. cfhtmltopdf(name="local.pdf") { "<html><head></head><body><h1>This is a test</h1></body></html>"; };
s
I don't know what else to try, so I think we might be in bug/java version weirdness realm.
b
When I edit the source document to be full HTML with html, head and body tags, instead of just a <table>, I still get the same errors.
I guess I revert to cfdocument
a
Can you try:
```cfhtmltopdf(name="local.pdf") { writeoutput("<html><head></head><body><h1>This is a test</h1></body></html>"); };
m
your function version would still need writeOutput around your string. And you said the tag version of cfhtmltopdf was working?
☝️ 1
a
Ha - just beat you to it 🙂
simple smile 1
but yes, I think that's it
b
cfhtmltopdf(name="local.pdf") { writeoutput("<html><head></head><body><h1>This is a test</h1></body></html>"); }; This still gives "Element PDF is undefined in LOCAL." If I try defining local.pdf first, local.pdf = ''; I get an empty string
a
Is this inside a function?
b
Yes
a
So I wonder if it's a nested function under the hood, so
local
has no context
Last grasp at a passing straw...
Copy code
function go() {
  var result = "";
  cfhtmltopdf(name="result") {
    writeoutput("<html><head></head><body><h1>This is a test</h1></body></html>");
  };
  return result;
}
I do hate this horrible sort-of-custom-tag-wrapper for modules in cfscript
b
I'm calling cfhtmltopdf in a function, but using it to store the variable in memory to immediately attach it to an email via cfmail. This works with cfdocument, but is failing with cfhtmltopdf. As I mentioned in the other thread, it looks like the pdf service is offline. So I'm looking into that now
a
Oh, OK. Didn't see the other thread
b
No worries. I need to move on anyway, so I'm reverting to cfdocument for now