Forum How do I...?

Need help getting started

natepotato
I'm trying to process a very simple file and it isn't working how I expect. What am I doing wrong?

I'm trying to alter my page size and font, but when I generate the pdf file I don't see my @page settings changing at all. The generated pdf looks the same no matter what size or font settings I specify in @page css.

Command:
prince -v -s css/cards.css --media=screen index.html -o testing2.pdf

cards.css:
@page { size: 20cm 20cm; margin: 2cm 1cm; font: 2px "Trebuchet MS", sans-serif; }


index.html
<html>
<body>

<div class="container">

      <p class="title">Home Page</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<h2>Litasdfordsfsa Socdfdiis</h2>
<p>Morbi et risus. Aliquam nisl.</p>

</div>
</body>
</html>
mikeday
The font property needs to be applied to the <body> element in order to affect the text; applying it to the @page rule will only affect the page margin boxes. Other than that though the size and margin properties should be applying. Is Prince actually loading the CSS file?
natepotato
Ok - I was doing something else wrong when first experimenting with the page size and switched to the font because I thought it would be easier to see immediately.

Using the commands that I listed below I was able to change the page size and also change the font size by using different CSS.