[ic] Printer friendly pages ala content_editor help

Sam Batschelet sam at westbranchresort.com
Sat Oct 29 11:23:55 EDT 2005

Per Mike H. I am using the UserTag which he posted which uses htmldoc to
create PDF docs of the current page.

First for the board I have put together a short howto in more details:

1.)  The most important part about the UserTag is that you must install the
program htmldoc.  It looks like there is an open source version of this but
I could only get the code to work when I signed up for the free 21day
Run #htmldoc
Then enter license or it won't work

2.)  Now I also installed the perl module HTML::HTMLDoc which seems to be
buggy I had to do my own cleaning on testhtmldoc.PL to get it to install.
Complained that htmldoc wasn't installed.

3.)  Install the UserTag provided by Mike H. and use his directions for


Ok so at that point you should be able to create pdf of any page just by
calling whatever.html?pdf=1.  You will also see that the code has no control
for what content to take so it takes it all.  This can cause some ugly pdf
with sidebars etc. So to fix this I have created a quick if else to add to
the page which hides the template when pdf=1.  My question is how can I hard
code this so that content editor adds the code for each new page.  I have
looked at Content*.pm and the coretags but since I am not a great perl
programmer I was wondering if anyone could point me in the right direction
to where the code template for new pages is located in mikes demo.  Not to
be confused with the templates ex.)foundation but the code that is used to
create every page in catalog/pages. (hope that's clear)

Instead of dropping in the normal line which adds the name of the template
to each html page created by interchange I would like to have it add my
adjusted template which is printer friendly.  The only way I have been able
to do this is manually change each page. In the catalog/pages folder.



Would become

[if cgi pdf]

Which adjusts the page so that if cgi pdf=1 the template will change before
it turns into pdf.


More information about the interchange-users mailing list