Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
CaseIsHere #1
Img tags in cfdocument
I am using cfdocument format='pdf', and the HTML img tags that I am using
within the cfdocumentsection are getting distorted. Sometime they show up
large and sometimes they show up small, like they are supposed to. There is no
rhyme or reason to this mess. Please help!
CaseIsHere Guest
-
How to treat template tags as comment tags?
Hi all, I am using DW MX to edit templates for a FreeMarker application. The template tag fromat is like so: <ul> <#list birds as bird>... -
CFDocument
Hi, I used database to store file name and path to the image file then made a page with cfdocument tag to display them. What I found out is, if... -
cfdocument on OS X
I have been trying the following in MX7... <cfdocument format="pdf"> Hello World!!! <cfdocumentitem type="pagebreak"/> <cfdocumentitem... -
CFDOCUMENT dpi?
Is there any way to get CFDOCUMENT to print out higher res images? My source files are very high-res (600dpi), but when printed, they have 'jaggies'. -
Using ParseChildren attribute to load child tags - VS removes tags
I am building a poll control, nested in the tag I have child tags to setup the poll options. Everything works fine, but when I edit a property in... -
jdeline #2
Re: Img tags in cfdocument
Are you using the HEIGHT and WIDTH attributes in your <IMG> tags? Could you post some code?
jdeline Guest
-
CaseIsHere #3
Re: Img tags in cfdocument
Yes, I am. I have alot of code, really dont' want to post it all, here's my
image tag: <img width='200' height='71'
src='http://www.rehmann.com/images/#Contact.txtSubsidiary#BioLogo.jpg'> The
cfdocument code looks like this: <cfdocument format='pdf' fontembed='yes'
pagetype='letter' scale='70' orientation='portrait'> <cfdocumentsection>
<cfinclude template='cftemplates/bioDesign.cfm'> </cfdocumentsection>
</cfdocument> The img tag is part of a bunch of other HTML code in
bioDesign.cfm. Thanks
CaseIsHere Guest
-
Ryno1134 #4
Re: Img tags in cfdocument
I am having the same issue with images saved from cfchart. They images are very
clear when viewing the source, but when they are embedded in the pdf, they look
distorted. There has to be some kind of image degredation going on perhaps
because a lower dpi is used.
Ryno1134 Guest
-
nbhealthpro #5
Re: Img tags in cfdocument
We are also having the same problem, and it is a HUGE problem. When creating
PDF files with JPG images created by CFChart, sometimes the images are fine,
other times the images are HUGE, blown out of proportion and distorted. This
is a MEGA bug, and Macromedia has not even ACKNOWLEDGED it, as far as I know.
I have posted multiple forum posts about this myself, and have not even gotten
so much as a, "Yes, we're aware of this" from ANYONE at Macromedia.
Gotta be thrilled that you moved to CF7, huh? I know MY boss is! (Note the
sarcasm)
nbhealthpro Guest
-
anderegg #6
Re: Img tags in cfdocument
Same here as well. I found a workaround for the problem. I save the Image in a
higher resolution, and reduce the width and height attribute in the html code
by factor 3 or 4. If I'm lucky, I get what I wanted. But have to try for each
Image in the PDF. Sometimes reduce by factor 3; sometimes even by factor 10(!)
which is not so good, because it also blows up the size of the PDF.
Maybe, it has something to do with the Java Engine behind? I tried to update
to the latest version of iText (that's what CF is using for generating PDFs)
but ended up with an error message. I also tried the product cfxpdf
([url]www.easel2.com[/url]) hoping it has a better image output. but the same here. Image
sizes are mostyl too large on the pdf, and are a bit unsharp.
I really hope that MM can go into this - otherwise I have to generate PDFs
like I did before MX7 - with LaTEX which is quite time consuming...
anderegg Guest
-
Zamboni1138 #7
Re: Img tags in cfdocument
I believe that part of the problem with images also lies in the transition from
web to print. When making a page on a website, we hard code the width and
height attributes as part of the IMG tag so that the temporary box is the right
size while the image downloads. These width and height are in pixels, and
usually match the size of the image (unless you are resizing at the browser end
for some reason (1x1 spacer gifs, which are strechted to the size needed, for
example)).
When we translate that IMG tag over to PDF format, how does the converter know
what DPI (dots per inch) I want the image rendered at in the PDF? For example,
say I have a 300 pixel wide by 100 pixel heigh image that I want to use as the
logo at the top of my PDF. When I code my IMG tag I use WIDTH="300"
HEIGHT="100" as attributes, but when the final PDF is generated, the image is
set to a random size within the PDF, from what I can see based on the amount of
text content. I should be able to tell the PDF what DPI I want that image at.
If I said DPI=300, my image would render (and hopefully print) at a size of one
inch wide by one-third of an inch heigh. If I said DPI=100, my image would
render/print at three inches wide by one inch heigh.
As it is right now, the DPI seems to be random.
I'm also having serious issues with FONT FACE="", TD ALIGN=LEFT|RIGHT, HR, B,
I, and just about every other HTML tag and CSS code. None of them seem to
render well in either PDF or FlashPaper format. I can't control the font used,
the size. How come when I use TD ALIGN=LEFT it prints text about 65-75% of the
way across the page and then wraps for no reason? Why doesn't it go the entire
100%?
I was going to use the CFDOCUMENT tag in a project I'm working on right now,
but until MM/Adobe come up with a patch to fix CFDOCUMENT I'm having to scrap
that code. Also having to hold off on purchasing CFMX 7 upgrade for all my
production servers.
Zamboni1138 Guest
-
anderegg #8
Re: Img tags in cfdocument
concerning the css-problem: If you're working with external style sheets, make
sure that you include that style sheet WITHIN the cfdocument-tag; otherwise all
the styles won't be found. shouldn't use the font-tag at all. If you define the
styles within the cf-template; you also have to define them within the
cfdocument tag.
td-strangeness: does it render right on a html-page when you remove the
cfdocument-tags?
anderegg Guest
-
nbhealthpro #9
Re: Img tags in cfdocument
The beautiful thing about this is this: this is a MAJOR problem. This is not
something small, like the font color is screwy, or maybe the date in the header
is formatted incorrectly. You can't use ANY images in PDF documents, because
you cannot reliably anticipate how the image will look in the finished product.
ANY MACROMEDIA (or is it AdobeMedia now?) CANNOT EVEN BOTHER TO POST A "Hey,
guys, we're working on it"! NOTHING. They tell us that the forums are
monitored, that they keep their ear to the ground so that the dev team can stay
on top of bugs. This is not just a "bug", this makes a MAJOR peice of
functionality almost totally unusable. Any they cannot even bother to respond
to their core customer base.
THAT is simply......beautiful. Makes me feel special - all warm and fuzzy
inside.
Makes me wonder why I am not developing things in .NET or .PHP.
nbhealthpro Guest
-
jkgiven #10
Re: Img tags in cfdocument
Same problem here - awaiting some feedback from Adobe/Macromedia
jkgiven Guest
-
Ronsweb #11
Re: Img tags in cfdocument
I have had the same problems. I had to convert all the CSS tags to Font tags.
The CSS will not work properly and it is brought in within the <cfdocument>
tag. The images are not showing up clearly and some images will not show up at
all. It is taking a tremendous amount of time just trying to get the PDF to
render properly. The cfdocument tag needs alot of improvement and needs all
the bugs worked out. The tag should have been thoroughly tested before the
release of CF 7.
Ronsweb Guest
-
rupeshk #12
Re: Img tags in cfdocument
Hi,
We have noted some of the issues that have been reported regarding
cfdocument. Most notably, image isssues and css issues. We are working on it
and these should be fixed in updater 1 that is coming up. If you have any
other issues, could you post the code snippet so that we can reproduce the bug
and fix it.
Thanks,
Rupesh.
rupeshk Guest
-
jkgiven #13
Re: Img tags in cfdocument
I would like to see the ability to bring in a swf file into the cfdocument fixed as well
jkgiven Guest
-
cfoster #14
Re: Img tags in cfdocument
And just to add my two cents ... I'm running into another apparent limitation
with images. I'm trying to run a report with CFDOCUMENT that includes multiple
images, all of them JPEG and averaging about 400k each. Up to five images I'm
fine, but as soon as I include a sixth image I get an Adobe Acrobat message
that "The file is damaged and could not be repaired." I don't have control over
the size or number of images, they're uploaded by the client. Is there an easy
solution that I'm overlooking? Thanks.
cfoster Guest
-
Sat #15
Re: Img tags in cfdocument
I am attaching two images to the PDF using CFdocument. First image display correctly but the second image display is completely weird.
Cold Fusion version: 9
First Image properties
Image Size : 60 K
height: 1632 pixels
width: 1280 pixels
Second Image Properties
Image Size : 260 K
height: 3256 pixels
width: 2560 pixelsSat Guest



Reply With Quote

