Steaming PDF from Python Script to IE
Nathan Treloar
ntreloar at avaquest.com
Sun Jun 22 20:23:00 EDT 2003
Thanks to everyone who responded with all this great information.
It turns out that the automatic line endings were the problem. So:
out = open("test.pdf", "rb").read()
print 'Content-type: application/pdf\n\n'
print out
doesn't work, but:
out = open("test.pdf", "rb").read()
print 'Content-type: application/pdf\n\n',
print out,
and
out = open("test.pdf", "rb").read()
sys.stdout.write('Content-type: application/pdf\n\n')
sys.stdout.write(out)
work.
More information about the Python-list
mailing list