Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying a pdf from within perl not via hyperlink

Status
Not open for further replies.

linctus

Technical User
Jul 14, 2003
14
AU
Thanks very much for answering may cry for help paulteg with the possible solution below to my earlier question regarding this topic. I should have been more specific. I know that now but that was my first thread post. Sorry :(

Anyway the line of code paul gave me works fine but...
I want to have a menu item link that once clicked on by the user fires a perl script that does a couple of things.
1. uses the user logon to extract a specific pdf file. (I can do that)
2. Then displayes that pdf in the web browser without any further prompt from the user. (I can't do that)

If I use the line of code below to do part two of my script it requires the user to click again. This time on the link >Your PDF<.

print &quot;<a href=\&quot;pdfs/user0001.pdf&quot;>Your PDF</a>\n&quot;;

Does that make sense??

 
You could output a meta refresh header, or a redirect

print &quot;Content-Type: text/html\n\n&quot;;
print &quot;<html><head><meta http-equiv=&quot;REFRESH&quot; content=&quot;0;
The location and redirect syntax I'm not sure of, sorry

Also, as you get more comfortable with Perl look up CGI.pm, as it will generate compliant headers
Regards
--Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top