PDA

View Full Version : Printing from WebObject


RobbyH
02-18-2003, 07:03 PM
I am using the print web object action to print text from my project. How can I insert text in a variable into an existing html template? I have thought of putting a comment into the html file, and doing a text search and replace action starting after the comment, but that seems a bit extreme. Is there an easy way to insert text from a variable into html at runtime?

kpsmith
02-18-2003, 07:45 PM
You could build the whole page at runtime use a text file write command.

You would just write a text file with the HTML code with the %Variable% in the code in the appropriate locations. Just name the file File.htm instead of File.txt

I currently write to the %Temp% directory since that should exist on everyones machine.

RobbyH
02-19-2003, 09:39 AM
Cool thanks!
Sounds just like what I need.
So I could just design the background template, and the page in front page express, copy the code, and have it write that code with the variable to a htm file.
I wanted to have five different styles to choose from, which I was going to do by overlapping web objects. I dont think when you print a web page it prints the background. Will AMS print the background of the web page, if not, is there a way I can do this? I don't have a printer to test.

kpsmith
02-19-2003, 03:37 PM
Exactly,

Glad it came across all right it was a bit hard to explain. Yep, I'd create the page in Front page to get it to look the way you want and then swap out the items within the webpage you want to be dynamic with variables. %image%.jpg, %link%.htm etc.

As far as the backgrounds go I'm not sure on that one. Maybe if you make it a layer instead of a background?

RobbyH
02-19-2003, 10:26 PM
What do you mean by "a layer"?

Lorne
02-20-2003, 09:59 AM
Note: whether the background is printed depends on a setting in Internet Explorer.

As for changing the background image, you can easily do that by changing the HTML, or by using different CSS style sheets, or using one style sheet and modifying it, etc.