Forum Bugs

changing dpi resolution for whole pdf

zambadu
Hi,
maybe this question is answered already here in the forum or in the users guide, but i havn't found an answer.

Which dpi resolution is used by default and how to change it?

For me it seems to be 72 dpi? Or will prince transform 72 dpi webview into 300dpi automatically?

I use prince for converting HTML to PDF via PHP. And I couldn't find a configuration to change the resolution. Or is this a point of the free Demo Version?
mikeday
PDF files are resolution-independent, so text in the PDF will be rendered at whatever resolution your screen or printer has. Do you have some 300dpi images that you wish to embed in your PDF files?
zambadu
Well I have seen, that images can be placed with the style -resolution attribute. So this will be no problem.
In my project I have created a workspace with 1:1 pixel resolution for A4 in 300 dpi, which means 2550 x 3578 px. At the end there should be a printable PDF with 300dpi. For the images as well as for the text and colored backgrounds and so on.

The reason for 1:1 is, that the user can change the layout of the document, therefore it makes sence to me. But the created PDF is so much greater than A4 now. m)

Is there a way to downscale, or must I change my working space, or be I on the totally wrong path?
mikeday
Are you using CSS or SVG? It may be easier to use physical units, eg. mm or pt, instead of pixel units.
tsk
Hi,

I have almost the same case, i am creating a script to publish a specific number of cards ready to print, in each card design some images will be uploaded + a serial number and bar-code on top of each one, so the system will generate an HTML code for each card and then send it to the converter to be converted to PDF.

The question is, is it possible to make the PDF file 300 DPI and ready for print? and is there any specific time for each conversion? because i will make thousands of Consecutive calls ...

thank you
mikeday
As mentioned earlier, PDF files themselves don't have a resolution. If you want a 300dpi PDF file then you need to ensure that the images that get uploaded are already 300dpi, or SVG which is also resolution independent.
tsk
Ok, Great , so if the html page contains images with 300 DPI they will remains the same ?!

and what about the call response time and the number of consecutive calls? is there any limitations ?

10x
mikeday
By default, Prince will embed images in the PDF file without changing them at all.

You will need to run some tests with your sample documents to check performance. You can run multiple instances of Prince in parallel, limited only by the speed of your machine and available RAM.
tsk
OK, can i get a demo link and an idea about the price for 1 server licence with unlimited calls ?

10x
mikeday
http://www.princexml.com/download/

http://www.princexml.com/purchase/

Please note that Prince is not a SaaS product, you install the software on your own server. For a SaaS option, take a look at http://docraptor.com
tsk
Great, i am testing it and everything seems OK , 1 last question, how can i make a convert call from a web page ?
mikeday
There are server wrappers available that make it easier to run Prince from Java, PHP, or .NET:

http://www.princexml.com/download/wrappers/

These require some understanding of how your server is generating HTML, though. Note that Prince does not run in the browser itself, it runs on the server and can then create PDF files that will be downloaded by the browser.
tsk
if i want to use it in one PC as single user but from the Web Application on this PC, can i purchase the Desktop License ?
mikeday
Use with a web application typically requires a Server License, can you email me (mikeday@yeslogic.com) a description of your application and use case.
daneren2005
I am pretty sure that PDFs do have an inherent resolution. ie if you use ImageMagick's identify tool:

```
Geometry: 630x810+0+0
Resolution: 72x72
Print size: 8.75x11.25
```

As you stated viewers are going to ignore that, but I am running into a case of a printer taking that number as the gospel truth and making 300 DPI images look like crap. Is there any plans to control the listed PDF resolution?
wangp
The "Resolution" value printed by the identify tool comes from the default value of the -density option. It does not come from the PDF.