Forum How do I...?

I have several questions...

NoMoreNicksLeft
First: Obviously you can set the page size for the resulting pdf's to something other than 8x11. I imagine it's just a set of stylesheet rules... but where do those go exactly if my documents are SVG files? Should they go in a separate stylesheet file which is referred to in the command line? In <style> tags somewhere in the SVG file?

Second: I have a set of eight SVG documents to convert, which will eventually become a single eight page pdf. Can Prince do this itself, or will I need to convert them to eight pdf files, and use another tool to compile them into a single pdf?

Third: In another thread, Mike has said that Prince has some support for gradients. Does anyone know the specifics for this? My simple linear gradients all convert as black.

Thanks in advance.
jim_albright
Yes you need to put the page size info in a Cascading Style Sheet.

@page {
marks: crop cross ;
size: 5in 8in portrait;
font: 10pt Gentium, Georgia, serif;
line-height: 13;


The documentation says you can have multiple inputs with one output.


Sorry I can't say anything about gradients.

Jim Albright
Wycliffe Bible Translators

mikeday
Can you email me (mikeday@yeslogic.com) an SVG file with the gradient that doesn't work?
NoMoreNicksLeft
Seems Prince (and Opera) dislike seeing the gradient specified in a style attrib (which is the default for Inkscape, and even Firefox will revert svg to that if you do "save as").

If they're put in a fill attribute, all is good.
mikeday
Thanks for the test document. It seems that Prince and Opera do not support the optional color value following the gradient reference in the fill property, as seen here:
fill: url(#linearGradient22321) rgb(0, 0, 0);

When the rgb(0, 0, 0) is deleted, the gradients appear fine in Prince and Opera as well. Is the same behaviour you have experienced?

Checking the code, Prince is not handling this fallback color value correctly, causing it to ignore the gradient value. I'll add this to the roadmap and it should be simple to fix this in the next release.

Thanks again for letting us know about the issue! :D
mikeday
Today we've released Prince 7.0, with support for fallback colors in SVG. This should solve the problem.