Issue with Changes (?) to CFDocument and a background image.

119 views
Skip to first unread message

hofar...@houseoffusion.com

unread,
Feb 19, 2015, 12:26:47 PM2/19/15
to ColdFusion Technical Talk

Afternoon,

Have an older application that's using cfdocument to push a pdf to the
user. Last time I checked the app, it was working great, but it's been
awhile and since then the server has been upgraded to CF 10.

The pdf is basically a collection of business cards. A card consist of a
pdfCARD.gif "card" background image with text layered on top.

So when it was working, the pdfCARD.gif was showing behind all the text
properly and you ended up with a page that looked exactly like rows or
business cards.

Since the upgrade, the image is still being called, but you only see
JUST a few pixels of it to the right and bottom of the "cards".
It's like everything layered on top of the backgroup is opaque. Setting
transparencty doesn't work, screwing with the z-index of everything
doesn't work. Duh ... three hours later and I'm still scratching my head.

I'd like to be able to fix this instead of having to completely rewrite
the app to use cfpdf (which eventually I will do, but I want to be able
to bill for it and not have it counted as a "bug" fix!)!!!!

Ideas?

"Card" div with the background image is like:
#PDFCARD {
width: 136px;
height: 170px;
margin: 0;
float: left;
background: url("img/pdfCARD.gif") left top no-repeat;
text-align: left; }

Using cfdocument is thus:
<cfdocument format="pdf" backgroundvisible="yes" fontembed="yes" >

One card is basically:
<div id="PDFCARD">
<p id="cardTOP"><cfif makePDF.deal_type EQ "Initial Public
Offering">IPO</cfif></p>
<div class="masterBOX prv8FONT">
<p class="infoSPAN">#makePDF.cardNAME#&nbsp;</p>
<p class="infoSPAN">#makePDF.cardMISC#&nbsp;</p>
<p class="infoSPAN2">#makePDF.cardDESC#&nbsp;</p>
</div>
<p class="prvINDUS">#makePDF.dsp_industry#</p>
<p class="prvDATE"><cfif makePDF.pending EQ "pending">Pending<cfelse>
<cfif IsDefined("makePDF.cardMONTH") AND #makePDF.cardMONTH# NEQ
"0">#MonthAsString(makePDF.cardMONTH)#</cfif>
<cfif IsDefined("makePDF.cardMONTH") AND #makePDF.cardMONTH# NEQ "0" and
IsDefined("makePDF.cardDAY") AND #makePDF.cardDAY# NEQ
"0">#makePDF.cardDAY#, </cfif>
<cfif IsDefined("makePDF.cardYEAR") AND #makePDF.cardYEAR# NEQ
"0">#makePDF.cardYEAR#</cfif></cfif>
</p>
</div>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360138

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 4:19:32 PM2/20/15
to ColdFusion Technical Talk

I've created two test documents that can be viewed publicly so everybody can see what I'm talking about.

1st, a Coldfusion only version of the file:
http://www.internationalhelpers.co.gg/test/coldfusion.cfm
The styling will be just a little off, because the CSS is specific for the PDF doc. The "card" background image is showing as it should be here.

2nd, here's the cfdocument version. It's the exact same file as Coldfusion, just with the cfdocument tag added back in to give me a PDF:
http://www.internationalhelpers.co.gg/test/pdf.cfm

NOTHING I've tried - setting transparency on everything, screwing with z-index ... This is the exact code that was working great prior to the upgrade to CF10. I'm at a loss as to how to get it to show the darned background images again.

Help!?!?!



>Since the upgrade, the image is still being called, but you only see
>JUST a few pixels of it to the right and bottom of the "cards".
>It's like everything layered on top of the backgroup is opaque.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360139

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 5:22:21 PM2/20/15
to ColdFusion Technical Talk

Your background image uses a relative URL:

background: url("img/pdfCARD.gif") left top no-repeat;
Have you tried it with an absolute URL? or, alternately, using CSS box shadow:

.PDFCARD{
box-shadow: 3px 3px 2px #333333;
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360140

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 5:45:54 PM2/20/15
to ColdFusion Technical Talk

On 2/20/2015 5:21 PM, Jon Clausen wrote:
> Your background image uses a relative URL:
>
> background: url("img/pdfCARD.gif") left top no-repeat;
> Have you tried it with an absolute URL? or, alternately, using CSS box shadow:
>
> .PDFCARD{
> box-shadow: 3px 3px 2px #333333;
> }
>

Switched to the following in the CSS for both files:

background:
url("http://www.internationalhelpers.co.gg/test/img/pdfCARD.gif") left
top no-repeat;

PDF version - no difference.
http://www.internationalhelpers.co.gg/test/pdf.cfm

I have the background attribute enabled in my cfdocument tag as well:
<cfdocument format="pdf" backgroundvisible="yes">

I'd LOVE to be able to do this with just CSS and without the background
image, but the designer/project manager will settle for nothing else
than the background image. His theory ..."it WAS working, there's no
reason you can't get it to work exactly as it was before again".

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360141

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 6:42:27 PM2/20/15
to ColdFusion Technical Talk

Ah! It’s the image type.  Apparently CF11 doesn’t support .GIF images.  If you convert the image to a JPEG it will work.  Just tested it locally and it went through with a JPG, but not with a GIF.

Jon
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360143

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 6:55:36 PM2/20/15
to ColdFusion Technical Talk

Wow - I've spent almost 2 full days trying to figure this out and have
never found one thing anywhere saying .gif files were no longer
supported! Thanks Adobe!!
Wonder why the heck not??? Bet I'm not the only one with a legacy
application that this change broke!!
Swapped it out for a .png and all is well.
Thanks very much Jon!

> Ah! It’s the image type. Â Apparently CF11 doesn’t support .GIF images. Â If you convert the image to a JPEG it will work. Â Just tested it locally and it went through with a JPG, but not with a GIF.
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360144

hofar...@houseoffusion.com

unread,
Feb 20, 2015, 6:57:25 PM2/20/15
to ColdFusion Technical Talk

My pleasure.  Glad I could help.
On February 20, 2015 at 6:55:29 PM, Les Mizzell (les...@bellsouth.net) wrote:


Wow - I've spent almost 2 full days trying to figure this out and have
never found one thing anywhere saying .gif files were no longer
supported! Thanks Adobe!!
Wonder why the heck not??? Bet I'm not the only one with a legacy
application that this change broke!!
Swapped it out for a .png and all is well.

PDF version - no difference.
http://www.internationalhelpers.co.gg/test/pdf.cfm


Thanks very much Jon!

> Ah! It’s the image type. Â Apparently CF11 doesn’t support .GIF images. Â If you convert the image to a JPEG it will work. Â Just tested it locally and it went through with a JPG, but not with a GIF.
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360145

hofar...@houseoffusion.com

unread,
Feb 21, 2015, 11:02:15 AM2/21/15
to ColdFusion Technical Talk

Hi Les

Since CF11 is run on Tomcat, even for the Windows version, file includes such as
background-image: url(../images/bluefade.jpg);

have become case sensitive. That wasted a couple of days as well...

Rob

On 20 Feb 2015 at 18:55, Les Mizzell wrote:

>
> Wow - I've spent almost 2 full days trying to figure this out and
> have
> never found one thing anywhere saying .gif files were no longer
> supported! Thanks Adobe!!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360146
Reply all
Reply to author
Forward
0 new messages