English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm working on a templating system and would like to generate an html document, and show a preview of the document as an image (so the customer cannot copy the HTML from a preview). How would I go about doing this in php?

2007-02-13 08:18:45 · 5 answers · asked by whattheflp 2 in Computers & Internet Programming & Design

This needs to be a dynamic preview: the user inputs data to be formed into the template, and then a preview of the template (with their data visible) is shown as a scaled jpg or png.

A screenshot from my computer would not work, as it would not contain their data.

2007-02-13 10:35:37 · update #1

5 answers

I'm unsure how to do this in PHP, if you find an answer email me at dan@is-hot.net

However, another solution would be have an Iframe, with a transparent image on top, making copying of text, etc, not possible. The easiest way to create previews of a page would be simply to use Print Screen, then upload

Hope I helped!

Danltn - Daniel Neville - Contact me at dan@is-hot.net

2007-02-13 08:24:10 · answer #1 · answered by Danltn 4 · 0 0

I wouldn't use a jpg. This should be so much easier if done with a PDF. You can have the code generate a PDF and deliver it to the user without the HTML ever being sent to the browser. Additionally, you still have the HTML to save in a DB for purchase or whatever.

Check http://sourceforge.net/projects/pdf-php for PHP PDF creation, though there are other ways to do it as well.

Joe Tech
http://www.JoeTech.com

2007-02-13 11:35:31 · answer #2 · answered by JoeTech.com 2 · 0 0

Why not just take a screen shot and use that? Then they would see an image and be able to see any html. Plus it would be a whole lot easier than using php for this.

2007-02-13 10:13:31 · answer #3 · answered by Anonymous · 0 0

You may want to try a gimp plugin to do that.

or look at the example here

http://www.php.net/manual/en/ref.image.php

RJ

2007-02-13 08:38:12 · answer #4 · answered by Anonymous · 0 0

Use alot of code and some other ko0l programs and dlls and ocxs and it's done, hope this was helpful.

2007-02-13 08:23:00 · answer #5 · answered by Say Bye 1 · 0 2

fedest.com, questions and answers