Welcome! Log In Create A New Profile

Advanced

use_print_media being ignored

Posted by vibrant 
use_print_media being ignored
June 13, 2011 03:50PM
For some reason I'm getting the full page of my site in the PDF with use_print_media enabled (via Python API). When I just try to 'print' the original HTML page manually - it prints out right. Is this some general failure of this option? Does it work at all?
Re: use_print_media being ignored
June 13, 2011 04:07PM
Yes, it works. Try out this code:
import pdfcrowd

client = pdfcrowd.Client("*", "*")
client.usePrintMedia(True)
url = 'http://en.wikipedia.org/wiki/Python_(programming_language)'
client.convertURI(url, open("test.pdf", "w"))
Sorry, only registered users may post in this forum.

Click here to login