[css-d] Using CSS to control PDF for print

2008-02-01 Thread Chang Huang
Hi all,

I've been reading about how to use CSS to control the layout of a web for
print, I wonder is there's a optimum way to style a web-generated PDF for
print. I've been googling it for a while but with no success. Can anyone
point me to the right direction please?

Thanks
Chang Huang
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread Phil Turner
I think the full version of Acrobat Professional will give you  
options on web based settings
and saving files for print as far as I know - then you just create a  
downloadable pdf  file

same dessert - different tent


Phil Turner
FREELANCE DESIGNER
TEL: 0161 439 1669
Graphic Designer BA Hons
[EMAIL PROTECTED]
http://www.philturner-uk.com

NEW BOOK - YOUR PLANET NEEDS YOU
http://www.yourplanetneedsyou.org

Please consider the environment before printing this email.



__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread Lord Armitage
On 01/02/2008, Chang Huang <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've been reading about how to use CSS to control the layout of a web for
> print, I wonder is there's a optimum way to style a web-generated PDF for
> print. I've been googling it for a while but with no success. Can anyone
> point me to the right direction please?

Hy Chang,

if you're in control of the server environment you can produce great
results with CSS2XSL-FO  which produces
an xsl-fo file from your css and html (featuring great css suport,
including running headers, footnotes etc.) this xsl-fo file can be
sent to an xsl-fo processor to generate the desired PDF. Have a look
at the documentation for more information.

--
cheers
Milan Zoufal

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread Jukka K. Korpela
Chang Huang wrote:

> I've been reading about how to use CSS to control the layout of a web
> for print, I wonder is there's a optimum way to style a web-generated
> PDF for print. I've been googling it for a while but with no success.
> Can anyone point me to the right direction please?

I'm not sure I understand your question correctly, but I have 
successfully created PDF versions of web pages, with CSS-enhanced 
presentation, using just the free PDFCreator software and a web 
browser - specifically, Firefox, since it supports alternate style 
sheets, so that I can use



and just select that style sheet from the browser's menu, so that I'll 
first see(roughly) on screen the effects of the foo.css style sheet. 
Then I just use the Print command in the browser and select the virtual 
printer corresponding to PDFCreator.

There are many other programs as well that can be used for making it 
possible to generate PDF files from a browser, but I haven't seen any 
comparison from the viewpoint how well CSS rules are applied. Maybe you 
could just try some alternative and see whether it fits. In simple 
cases, probably almost any such software will do.

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread D A
> I've been reading about how to use CSS to control the layout of a web for
> print, I wonder is there's a optimum way to style a web-generated PDF for
> print. I've been googling it for a while but with no success. Can anyone
> point me to the right direction please?

I have NO idea if this is related, but Prince is an application that's
designed to create PDF files for print using CSS:

http://www.princexml.com/

There was recent discussion of it on Typophile:

http://www.typophile.com/node/40332

(Not affiliated, just found it to be an intriguing product)

-Darrel
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread Sébastien FICHOT
Hi Chang,

Stylising web rendered PDF is as feature included in the PDF  
proprietary format.
You have 3 entry point for this, depending on how you generate your PDF.

1 : you can set a custom CSS class for any element of the PDF when you  
create it with Adobe Acrobat Pro 8, or, if you dynamically regenerate  
your PDF excracting each element, you can set a CSS class for each  
type or named element.

2 : you can join a custom CSS file to be applied on your PDF  
programmaticaly. This depend on the component you use for rendering  
PDF to HTML. This could be (ASP.net) objMyPDFDocument.customCssFile or  
objMyPDFWriter.RenderingRules (this one would allow XSLT too, using a  
RulesFactory I guess). If ou details your methods I can help you more  
on this.

3 : For printing, you can use the @media clause in order to give  
correct CSS classes to print only.
@media screen {
   /* Specific Screen rules */
}
@media print {
   /* Specific Print rules */
}
@media all {
   /* Non-specific rules */
}


Nevertheless, the better way to make stylised PDF document is ... to  
render them in XML format and then use XSLT, or render them in HTML  
and use standard CSS. Components exists on the web, but they ae very  
expensive.


Cheers,

Sébastien
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-01 Thread Michael Adams
On Fri, 01 Feb 2008 18:46:35 +1100
Chang Huang wrote:

> Hi all,
> 
> I've been reading about how to use CSS to control the layout of a web
> for print, I wonder is there's a optimum way to style a web-generated
> PDF for print. I've been googling it for a while but with no success.
> Can anyone point me to the right direction please?
> 

Also one thing that is so glaring that you probably have not failed to
notice. PDFs created on the fly on the server are dependent on the fonts
on the server, if it isn't on the server it can't get embedded. Web
pages created in HTML are dependent on the fonts at the client.

-- 
Michael

All shall be well, and all shall be well, and all manner of things shall
be well

 - Julian of Norwich 1342 - 1416
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Using CSS to control PDF for print

2008-02-03 Thread Chang Huang
Hi, thanks for your responses.

Here's the problem:
I have a well styled page, table, links, italics, bold, etc, everything
looks good. But after I convert it into PDF (using Coldfusion), the table
(which was styled with single border), now has the ugly double borders; some
text formatted in italic or bold has bad spacing issue, they seem to be
overprinting or otherwise leaving big gap between them.

Could this be a CSS problem or CF problem?

Thanks.

On Sat, Feb 2, 2008 at 9:12 AM, Michael Adams <[EMAIL PROTECTED]>
wrote:

> On Fri, 01 Feb 2008 18:46:35 +1100
> Chang Huang wrote:
>
> > Hi all,
> >
> > I've been reading about how to use CSS to control the layout of a web
> > for print, I wonder is there's a optimum way to style a web-generated
> > PDF for print. I've been googling it for a while but with no success.
> > Can anyone point me to the right direction please?
> >
>
> Also one thing that is so glaring that you probably have not failed to
> notice. PDFs created on the fly on the server are dependent on the fonts
> on the server, if it isn't on the server it can't get embedded. Web
> pages created in HTML are dependent on the fonts at the client.
>
> --
> Michael
>
> All shall be well, and all shall be well, and all manner of things shall
> be well
>
>  - Julian of Norwich 1342 - 1416
> __
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>



-- 
Chang Huang
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/