Link to home
Create AccountLog in
Avatar of astar666
astar666Flag for United States of America

asked on

html headers for a pdf file

I have some python cgi that emits a pdf file.  I think I need a few lines of html to start it out.  The idea if for the pdf file to appear on the browser.  Please advise.
Avatar of Irwin Santos
Irwin Santos
Flag of United States of America image

<html>
<head>
<title>My PDF</title>
</head>
<body>
<a href="myfile.pdf">My PDF File</a>
</body>
</html>
where myfile.pdf is YOUR pdf filename
ASKER CERTIFIED SOLUTION
Avatar of huji
huji
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Jason C. Levine
Huji has it right.  Depending on how python handles line printing (I assume it handles it the same way as Perl), you will need the newline (\n) in there.  No semi-colon IIRC.
Glad to be of assistance!