how to convert website posts to pdf? - php

I have a PHP site in which I have Button Named save as PDF for each post of site.
When I Click this Button I need to save the subject of the post and post contents as PDF and Display it.
I dont use any asp.net code in my site.
Thanks for your help

I like PrintFriendly.com but this might not be what you are looking for.

Did you check wkhtmltopdf ?

Related

How to display(not download) files on a webpage in php?

I am showing a list of files on a webpage. Files may be of any type like pdf,doc,excel,txt etc.
What i want is when some one click on an item of the list then that file should be displayed in another tab. I dont want to download the file. I just want them to be visible so that user can read it.
I try this using php for pdf files i am able to get the plain content of the file but i want a viewer type of thing.
Can i achieve this?
If yes can i achieve this in php?
If yes then how?
Thanks and Regards
Sumit Rathore
downloading or viewing any file in browser depends on browser setting.
for example in firefox in Options - > Applications Tab you can change state of reading a file that can be downloading or viewing.
now, for display a file to visitor best solution is creating a special php or flash app.
Good Luck.
see http://view.samurajdata.se/
<html>
<body>
<embed src="www.dedoimedo.com-apache-web-server-lm.pdf">
</body>
</html>
This code is working in google chrome but not in other browsers.

Save user generated form content as a PDF on server

I have some report that is generated from a form. I need this form to be saved automatically on the server, on submitting. Is there any way to do it?
I tried researching on the subject, but Google just throws up links where the user gotta input the URL and press submit or such method. As this pdf should be generated and saved automatically after every form submission, I guess the preferable method would be to call a service or such to generate the PDF and then save it on the server. Can you plz give me a walk-through.Thanks in Advance.
I'm working in PHP.
Here is the pdf docs from php.net. It's all there for the taking. Good luck!
PDF - Manual
I am about to embark on the same journey as I need to create a script to turn a document into a .pdf file using PHP. I don't know a lot about it yet, but it does seem possible. Try this link for starters...
http://www.sitepoint.com/generate-pdfs-php/

php render text on image with preview

can anyone recommend a tutorial or library that can address the issue
of rendering a text onto a image with a preview option? the idea is to present the user with a picture onto which they can add text of their choosing. after viewing a preview they can submit it.
a know that php's imagettftext can handle this and a have some ajax experience. i was hoping that
a complete or close to complete solution is already in existence.
here a similar app
thanks in advance for any attempt to assist and have a nice day :-)
You might want to take a look at Adding text to images in realtime

Fancybox image gallery with ratings and comments

I have a photo website which gathers images from a folder with PHP, displays their thumbnails on a page and, when clicked, opens a fancybox (fancybox.net) to display the full image. I am pretty satisfied with the result but as users start posting, they start asking for new features, and problems come out since I'm not a programmer. What I would like to do is a photo commenting/rating system (like the one on facebook to get the idea, but obviously not as complex): I've been trying to add a Disqus code to each picture, but it won't get displayed in my fancyboxes...So the question is, can you give me any (easy-to-implement) ideas on how to achieve this? I don't mind using already existing softwares like disqus for comments and polldaddy for ratings, since I guess it would require me to setup a mysql database to do it on my own...
To brief it again:
I have a "thumbs" folder which are gathered on a page.
I have an "originals" folder with the full size images that are called back by the fancybox.
I would like to have comments+rating in the fancybox.
Thanks in advance for any advice you can give me.
For your fancybox implementation I'm assuming that it's just pulling the image into the lightbox, not other content (i.e. a html page). What you'd need to do is set up a page which would grab an image, and output it along with your comments + rating code, then set up your script to use that page as the fancybox URL instead of a direct link to the image.
Without more information to go on I can't really help more than that.
ps for comments the Facebook Comments plugin might be easier for a non programmer to implement than Disqus.

Allow user to save a html/php/css page as a pdf?

I have a "calculator" page that calculates a load of maths based on what the user inputs. The user can then click "get results" to show their full calculations.
I then have a button - "save as pdf" which I want it to allow the user to save a pdf of their results.
It's a combination of html, php, css combined with Wordpress.
How can I (on click) convert the results to a pdf and allow the user to save?
p.s I know this been asked a few times but I can't seem to find the correct answer or a working version... or a tool with good documentation for me to follow!
Check also FPDF
Generally these things are solved on the server. Clicking the link would trigger a redirect to the php page and in general instead of writing output to a webpage, you write output to a pdf stream (still arrives in the browser but the browser knows it as a pdf).
you do this by changing the response headers. you could use this library to write out the pdf file
http://code.google.com/p/wkhtmltopdf/ make sis pretty simple, you could do a curl request to the page, and send it to the library.

Categories