I have stood up a CF2021 in command box and am try...
# cfml-general
d
I have stood up a CF2021 in command box and am trying to test cfdocument PDF creation and it will not show any images or background. I assume this is because it is a developer version of CF. Is there a way to test this without a licensed version?
b
@David Price you can activate an enterprise license on your CommandBox-based ACF server. However, I'm not aware of any limitation in CF that removes images.
Make sure your local computer can access the URL of the images.
d
@bdw429s I do not have a license for 2021 currently. I am just testing cfdocument. The images are there and will show fine if I comment out cfdocument commands. it will just not create PDF's with images. I think it has been this way from the beginning. There used to be a background that said Developers edition.
c
the watermark is the only limitation of the feature i have ever found with the developer edition - possibly you have found a nice new bug?
👍 1
m
This does not sound like a limitation of trial/developer. In those versions you would see a watermark clearly indicating the object was generated in those editions. I am assuming the rest of the PDF such as text shows? It does sound perhaps like a permissions issue. Brad is right on point there. If you install locally w/o CB & use the same code, is it also having the same issue? Wondering if there's a user rights problem creeping in here. Could you share some code David?
👍 1
d
<cfset bgImage = "url('/images/gg_draft.png')">
<!--- <cfdocument format="PDF" bookmark="no" backgroundVisible="yes" localUrl="yes" unit="in" margintop="0.28" marginright="0.2" marginbottom="0.0" marginleft="0.25"> ---> <cfoutput> <html> <div style="height990px;width750px;font-size:9pt;"> <div style="background-image: #bgImage#; background-repeat: no-repeat; float:top; "> <div style="font-family:sans-serif; padding:12px 30px 32px 30px;"> <div style="height:952px; position:relative;"> <div> HDR1<br> HDR2<br> HDR3<br> </div> <div> BODY 1<br> BODY 2<br> BODY 3<br> BODY 4<br> </div> <div style="position:absolute; bottom:0; width:100%; "> FTR1<br> FTR2<br> FTR3<br> </div> </div> </div> </div> </div> </html> </cfoutput> <!--- </cfdocument> --->
This is the image that is in the background.
If you run this code the image shows as I have the cfdocument commented out at the top and bottom. If you remove the comments, the text will remain and the image will not appear. The blue border should show centered in the page and the text inside it.
m
When I use images in cfdocument, I do it this way . That said, I have not tried a watermark using css, only inline images
Copy code
<img src="file:///#expandPath('/image/mst-splash.png')#">
Maybe (just spitballing here)
Copy code
<div style="background-image: file:///#expandPath('/images/gg_draft.png')#; background-repeat: no-repeat; float:top; ">
b
+1 for using absolute paths. I wouldn't assume that just because your browser can find a relative file that the CFDocument tag can find it. I always use absolute HTTP URLs or absolute local paths, though I have found annoying difference in how different PDF engines (at least in Lucee) prefer to have local paths specified
d
Thanks. FYI I am using mappings to get to my images. /images is mapped to a full path C:\folder1\images
@bdw429s another commandbox question. Is there a vesrion of commandBox that does not have log4j-1.2.16 in its server bundle when it starts up? I have a site that does scans and still sees the log4j-1.2.16 and .17. I have loaded the new Lucee 5.3.9.RC 115 to be able to have the newer log4j but the box server that gets installed still has the base. Can I just delete those two jar files?
b
@David Price yes, the 5.5.0 alpha
d
@bdw429s Is that available for download? I did not see it tonight?
b
Yes :)
I'm on my phone, but it's on downloads.ortussolutions.com
d
I found it. Thanks Brad!
👍 1
b
I'm just waiting for Lucee 5.3.9 to release so I can release CommandBox 5.5
d
@bdw429s I have loaded 5.5Alpa and am trying to load 5.3.9 RC115 and it is giving a connection failure. connection timeout
using start cfengine=lucee@5.3.9-RC+115
It created the server in the CommandBox folder. It just did not download the zip file. Can I manually download the file and unzip it into that folder?
nope. That did not work
b
Can you show the full console output? I'm not clear what's happening.
@David Price
d
@bdw429s This is a snipit from my other machine. I hope you can read it
b
What happened when you tried that URL in your browser?
Seems like a networking issue
d
It will download it
b
Hmm, does your network use a proxy?
d
No. I have not any problems loading before.
b
That's odd
Can you run this, but swap the url out?
just run this from the CLI repl 'http url="HTTPS://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/2.15.0/cbsecurity-2.15.0.zip"; echo(serializeJSON(cfhttp));'
I'm on my phone ATM
I'm curious if there's any more info there
d
Hmmm. maybe. I say a message earlier when I first loaded box. Symantec gave me a warning. It may be bloclking the link
b
What was the warning?
It's possible you have anti virus sticking it's nose in
d
It did not like box.exe it thought it might be a virus
b
Either blocking http traffic or SSL snooping
d
I will try again tomorrow. I am not sure. It might be where I placed my home directory
thanks for responding. will let you know
👍 1
@bdw429s Hi Brad! I moved the root of my sites to c:\WebSites\PDFServer from C:\PDFServer. Not sure if this was the issue, but it is working now. I appreciate your availability and input.