Forum How do I...?

Which convert method should I use if i want the response to be downloaded for the client ?

mohammad
Hi,

I am using princexml with .Net. I am just wondering which convert method for the prince object will help me to

let the browser download the PDF converted ?

Thanks.
mikeday
Call the Convert() method and pass the HTTP Response OutputStream as the second argument. Make sure you set the Content-Type header to application/pdf first.
mohammad
thanks for your reply, this will let the browser open the the pdf in new tab.
Is there any method that help me get the buffer of the converted file ?

Thanks.
mikeday
On the server, or the browser? What exactly are you trying to do?
mohammad
Actually I want to know if the library can help me generate PDF for higher resolution printing, let us say 300dpi. Can i give an exact width and height from my generated PDF as parameters , so that it will look good for high resolutions printers? or that will depend on my html?

Thanks.
mikeday
PDF files don't have a resolution, just a physical paper size, eg. "A4" or "US-Letter". You only need to think about DPI values if you are embedding bitmap images (PNG, JPEG) inside the PDF file.