Re: images not respecting clear in cfdocument PDF

2007-02-01 Thread Zoe Gillenwater
Ok, I know it's been months since I started this thread, but I had to put this 
project on hold for quite awhile, and also wait for my IT guy to install the 
latest update to CF on the server to make sure that wasn't the cause of the 
problem.

The problem is still happening. Since it's been so long, let me repeat what it 
is:

A site I am working on uses the cfdocument tag to create PDFs of pages. The 
pages that are being converted are very image-heavy, and all of the images are 
floated, using CSS. They also have CSS clears on them to ensure that if one 
image wants to start before the previous one has ended they don't get "hung up" 
on one another. This works great in the HTML, but sometimes -- not always -- 
the clears are not respected in the PDFs that cfdocument outputs. I see no 
pattern in which images get caught on previous images.

Here's a PDF that exhibits the problem: 

 
(Second image doesn't clear at all, other images on pages 3 and 4 almost clear 
but get hung up)

Here's the page that the PDF was created from: 


Here's the style sheet that styles the PDFs: 
http://www.saferoutesinfo.org/guide/css/pdf.css

Jon Clausen had this suggestion:

>Also, I've personally found that I sometimes need to "brute force"  
>the CSS for cfdocument PDF's.   By that, I mean calling all your  
>selectors as specifically as possible and using "!important" more  
>liberally than you might on an HTML page to override any default  
>styling.   An example using your CSS:
>
>
>div#content img.right {
>   /*display: inline;*/
>   clear: right!important;
>   float: right!important;
>   margin: 0 0 .8em 1em;
>   margin: .2em 0 1em 1.4em;
>}
>
>instead of
>
>.right {
>   /*display: inline;*/
>   clear: right;
>   float: right;
>   margin: 0 0 .8em 1em;
>   margin: .2em 0 1em 1.4em;
>}

Unfortunately, using !important on my clear declaration, as well as changing it 
to clear: both, has not made any difference.

I'm thinking at this point that there is nothing else I can do -- cfdocument is 
just too buggy. But I wanted to follow up on this thread once more just to make 
sure no one else had any ideas.

Thanks,
Zoe

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268320
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: images not respecting clear in cfdocument PDF

2006-10-27 Thread Zoe Gillenwater
>Zoe,
>
>I'm looking at your source code for the page that the PDF is based on  
>along with the PDF and, this is just a guess, but I think the PDF  
>image styling may be choking on the designated list ()  
>elements in your XHTML.
>
>At least that seems to coincide with the clearing issues.  The pdf's  
>generated by  handle generic HTML and CSS well, but  
>sometimes have problems with tags that aren't as common.

It has nothing to do with definition lists. It happens on pages without them. 
Most of the pages have very simple HTML: paragraphs, headings, and lists, plus 
the floated image divs.


>
>Also, I've personally found that I sometimes need to "brute force"  
>the CSS for cfdocument PDF's.   By that, I mean calling all your  
>selectors as specifically as possible and using "!important" more  
>liberally than you might on an HTML page to override any default  
>styling.   An example using your CSS:
>
>
>div#content img.right {
>   /*display: inline;*/
>   clear: right!important;
>   float: right!important;
>   margin: 0 0 .8em 1em;
>   margin: .2em 0 1em 1.4em;
>}

I'll try this and let you know. Thanks.

Zoe

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258240
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: images not respecting clear in cfdocument PDF

2006-10-26 Thread Jon Clausen
Zoe,

I'm looking at your source code for the page that the PDF is based on  
along with the PDF and, this is just a guess, but I think the PDF  
image styling may be choking on the designated list ()  
elements in your XHTML.

At least that seems to coincide with the clearing issues.  The pdf's  
generated by  handle generic HTML and CSS well, but  
sometimes have problems with tags that aren't as common.

Also, I've personally found that I sometimes need to "brute force"  
the CSS for cfdocument PDF's.   By that, I mean calling all your  
selectors as specifically as possible and using "!important" more  
liberally than you might on an HTML page to override any default  
styling.   An example using your CSS:


div#content img.right {
/*display: inline;*/
clear: right!important;
float: right!important;
margin: 0 0 .8em 1em;
margin: .2em 0 1em 1.4em;
}

instead of

..right {
/*display: inline;*/
clear: right;
float: right;
margin: 0 0 .8em 1em;
margin: .2em 0 1em 1.4em;
}

Here's a great tutorial on the hierarchy of CSS selectors:   http:// 
www.stuffandnonsense.co.uk/archives/css_specificity_wars.html

Also, remember you are dealing with a print medium instead of a  
screen medium. Using "px" and "pt"  for dimensions and text sizes  
gives you much more control in this medium than in the variable-width  
screen where "em" is preferrable.

Hope that helps.

Jon

On Oct 26, 2006, at 3:53 PM, Zoe Gillenwater wrote:

> First things first: I'm not a CF developer. I'm a designer/XHTML/ 
> CSS person, who works with a CF developer. So please spell things  
> out for me, and forgive my ignorance.
>
> A site I am working on uses the cfdocument tag to create PDFs of  
> pages. The pages that are being converted are very image-heavy, and  
> all of the images are floated, using CSS. They also have CSS clears  
> on them to ensure that if one image wants to start before the  
> previous one has ended they don't get "hung up" on one another.  
> This works great in the HTML, but sometimes -- not always -- the  
> clears are not respected in the PDFs that cfdocument outputs. I see  
> no pattern in which images get caught on previous images.
>
> Here's a PDF that exhibits the problem (second image gets hung up on
> first one, but third image is fine):
>  ITEM=Page&CHAPTER_ID=C353&Page=guiding_principles_for_applying_srts_en 
> gineering_solutions.cfm&PageTitle=Guiding%20Principles%20for% 
> 20Applying%20SRTS%20Engineering%20Solutions>
>
> Here's the page that the PDF was created from:
>  guiding_principles_for_applying_srts_engineering_solutions.cfm>
>
> Here's the style sheet that styles the PDFs:
> http://www.saferoutesinfo.org/guide/css/pdf.css
>
> Does anyone know if this is a known issue in cfdocument? Is there a
> workaround (other than not floating the images, which I can't do)?
>
> Thanks,
> Zoe
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258173
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


images not respecting clear in cfdocument PDF

2006-10-26 Thread Zoe Gillenwater
First things first: I'm not a CF developer. I'm a designer/XHTML/CSS person, 
who works with a CF developer. So please spell things out for me, and forgive 
my ignorance.

A site I am working on uses the cfdocument tag to create PDFs of pages. The 
pages that are being converted are very image-heavy, and all of the images are 
floated, using CSS. They also have CSS clears on them to ensure that if one 
image wants to start before the previous one has ended they don't get "hung up" 
on one another. This works great in the HTML, but sometimes -- not always -- 
the clears are not respected in the PDFs that cfdocument outputs. I see no 
pattern in which images get caught on previous images.

Here's a PDF that exhibits the problem (second image gets hung up on
first one, but third image is fine):


Here's the page that the PDF was created from:


Here's the style sheet that styles the PDFs:
http://www.saferoutesinfo.org/guide/css/pdf.css

Does anyone know if this is a known issue in cfdocument? Is there a
workaround (other than not floating the images, which I can't do)?

Thanks,
Zoe

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258166
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4