Ank
Ank

Reputation: 6270

Converting a password protected web page to pdf

I have to convert my web page to pdf in php. I googled and found several leads.

http://pdfcrowd.com/web-html-to-pdf-php/

How to convert a PHP web page to PDF?

However, my web page is password protected. Is there a way a script can login (of course, the credentials will be provided) and then after successful login, convert the web page to html. Is the above even possible? If yes, can someone give me some suggestions. If not, are there any alternate ways to do it?

Thanks

Upvotes: 1

Views: 7342

Answers (5)

mmthedependable
mmthedependable

Reputation: 1

just put this script one button will be generated for password protected pages use this one.

For Detail link - http://freehtmltopdf.com/

Upvotes: 0

user1914292
user1914292

Reputation: 1556

Our PDFmyURL API allows you to login and convert the page to PDF. We support many different standard ways that your page can be protected, so you don't need to build any new way specifically for our API.

You can find the documentation on accessing content in secure members area at the PDFmyURL.com API documentation page

EDIT: in september 2015 we added functionality that allows you to log in to your members area directly from our own members area. All our tools (the API and also manual conversions) will then be able to access your members area pages without any problems.

Upvotes: 2

tegautham
tegautham

Reputation: 1

Peardoc, the firm I work for, provides a solution to convert static/dynamic HTML to PDF on password protected web applications. This service requires the user, who has signed in, to click a "save as PDF" link.

Demo: http://www.peardoc.com/sap_pro_demo.html

"I have to do it automatically using a script. without user intervention."

Are you looking for, say, an API service, which will handle PDF conversion (post authentication) without user intervention?

Upvotes: 0

enapupe
enapupe

Reputation: 17029

You may retrieve the page (pdf) contents using php curl with basic http auth.

Check How do I make a request using HTTP basic authentication with PHP curl?

Upvotes: 2

Krsto Jevtic
Krsto Jevtic

Reputation: 1218

You can also do a more simple thing.

ctrl + P = Print page Then change destination to pdf file After that choose where on computer to save the page and that's it.

Upvotes: 0

Related Questions