I'm trialling Prince currently - good working on being the only PDF converter that respects CSS Paged Media!
If I run the command line, everything looks perfect:
The PDF is created using the web page, with all the styles from the stylesheet included and all the awesome paged media stuff working.
When I try to recreate this using the .NET library:
The PDF is rendered, but it seems to be missing all the default browser styles.
Do I have to explicitly point it to the default "browser" stylesheet (this is my current workaround) or can I tell Prince to use default styles using a setting?
If I run the command line, everything looks perfect:
"C:\...\prince.exe" http://localhost/Test/ -o C:\Pdf\prince.pdf
The PDF is created using the web page, with all the styles from the stylesheet included and all the awesome paged media stuff working.
When I try to recreate this using the .NET library:
Prince prn = new Prince(runnerLocation);
prn.SetLog("C:\\Pdf\\log.txt");
prn.Convert("http://localhost/Test/", "C:\Pdf\prince.pdf");
The PDF is rendered, but it seems to be missing all the default browser styles.
Do I have to explicitly point it to the default "browser" stylesheet (this is my current workaround) or can I tell Prince to use default styles using a setting?
prn.AddStyleSheet(GetDefaultCssUrl());