I'm running CF2021 U5 on CommandBox and trying to ...
# box-products
b
I'm running CF2021 U5 on CommandBox and trying to generate a PDF document using cfdocument. I notice that if I try to include an image using the full URL (e.g.

https://example.com/images/logo.jpg

), the PDF generation will time out, saying "The content of this document process takes more than 60000 milliseconds to process". However, when I switch to a relative URL (e.g. images/logo.jpg) and set
localurl="true"
on the cfdocument tag, generation works very quickly as expected. I'm wondering where I would start debugging why having a remote URL that points back to the CommandBox server would cause it to time out.
When I use remote URLs back to the CommandBox server, I don't see any requests to those URLs in the access log (I have access logging enabled). It's not timing out now, but it's also not retrieving the assets I have in the file. A request to a different server entirely will retrieve the image file correctly and stuff it in the PDF.
b
@bockensm So far as I know the CFDocument tag works in CommandBox the same as any other installation of Adobe CF. I'd ask this in the #adobe channel as a general ACF question.
Generally, the million dollar question is whether the URL
<https://example.com/images/logo.jpg>
is resolvable by the server. I.e., if you opened up a browser on the actual server, does it know how to resolve that URL?
b
Thanks for the advice. Yes, the URLs work, because if I output the HTML inside the cfdocument tag, the images appear as expected. I will ask in the correct channel.
b
@bockensm Just to be clear, do the full URLs work or not? Your original message said no, but your last message seems to imply they do work.
b
It seems hit or miss, and also seems to depend on whether there's a header/footer in use with cfdocument.
I have one PDF that is pretty much just HTML with full URLs and it works fine, but when I head over to another PDF that uses header & footer, that one times out. Other times, the full URL doesn't work with an image. It's kind of all over the board.
So really I have two separate problems: 1. PDFs that contain
cfdocumentitem type="header"
will cause a timeout 2. images/CSS files using a fully qualified URL will fail to load
on the second, if I replace the URL of my dev site with the URL on the live site, the stylesheet will load and work correctly. It just doesn't work when in development
When I say replace, I mean replace the href value in the <link> tag for the HTML inside the PDF
b
Interesting. I've had these sorts of issues before and troubleshooting can be a pain since the Java stack never shows you what specific asset is being requested and there is usually no way to enforce a timeout on the underlying HTTP libraries
b
That's where I'm stuck. I don't see anything in the CommandBox access log for the assets I'm trying to include and I wasn't sure where else to look.
b
You may have to use a packet sniffer to see what the requests are going to
b
And that would be something like Wireshark or Fiddler, yea?
b
yeah, wireshark more likely