开发者

Open and Print PDF using php or javascript

I want to write a function that takes a url as an argument and then it goes and prints the pdf... how can i do that?

should i open the file using php a开发者_开发知识库nd then print it using javascript?

Thanks for the help


You can use PHP header() function.

Try look here:

http://www.w3schools.com/php/func_http_header.asp

http://php.net/manual/en/function.header.php


and prints the pdf

PHP and javascript are usually used for generating web pages - there is no direct link to printing on either the server nor the client. Even in contexts where this would make sense, there is no printing API in either language so you'd need to use the facilities within the OS or another tool - and you've provided no details about this either.

Where is the PHP running? Where is the Javascript running? Where do you want the PDF printed (client/server)? What OS is running at the end where printing should happen?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜