Discussion:
PDF creation without pics on CF8
(too old to reply)
tinu88
2009-03-29 16:13:43 UTC
Permalink
Hi there

CF7 was able to create PDFs from html with this code

---
<cfsavecontent variable="klicket">

<cfoutput>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>

<head>
<meta http-equiv="expires" content="0">
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<style>
<cfif db.DESIGN_STYLESHEET gt "">
<!--- Bug in CF8, as opposed to CF7. CF8 does not recognizse the <link>
tag any more
workaround: create the <style> and include the CSS
<link rel="stylesheet" type="text/css"
href="/klicket/#db.DESIGN_STYLESHEET#" --->
<cfinclude template="/klicket/#db.DESIGN_STYLESHEET#">
<cfelse>
<cfinclude template="/klicket.css">
</cfif>
</style>
</head>
...
</cfsavecontent>

<cfif IsDefined ("url.pdf")>

<cfdocument format="PDF"
pagetype="A4"
unit="cm"
fontembed="yes"
backgroundvisible="yes"
<cfoutput>
#klicket#
</cfoutput>
</cfdocument>

<cfelse>
<cfoutput>
#klicket#
</cfoutput>

</cfif>
---

CF8 does no longer understand <link type="stylesheet" ...> and if also does
not include images ... as you can see, we save the entire output and then
either simply output it or we surround it by <cfdocument>. In CF 7, this works
like a charm, in CF8 and even CF9 it shows NO IMAGES in all available browsers
...

Why is this so? Not even the simplest cfm like the following works on either
CF8 nor CF9.

---
<cfdocument format="pdf"
pagetype="A4"
unit="cm"
localURL = "no"
fontembed="yes"
backgroundvisible="no">

klicket
<img src="/inc/bci.cfm?text=1234567890123456789" alt="" border="0" />
<img src="/pix/klicket_provision.gif" border="0" />
<img src="/inc/datamatrix.cfm?klicket=klicket ist das geilste, was es gibt
h?h?" width="150" alt="klicket" />
<br />

</cfdocument>
---

Neither the static pic nor the dynamic pics appear, just red crosses.

Can anybody shed some light on this problem?

Again: In CF 7, everything works, but CF8.0.1 and CF9 beta don't show images

Desperate ... cause we cannot leave CF7 although we want to for CF8 ...

Thanks

Martin
tinu8805
2009-03-31 21:11:01 UTC
Permalink
Noone? Any hint, help, settings greatly appreciated

Loading...