Printer friendly

12 posts by 7 authors in: Forums > CMS Builder
Last Post: September 1, 2010   (RSS)

Hi,
Sorry for what may be a dumb question but I'm new to CMSB. Will CMSB create a link to a printer friendly page of an article or is this something that I would need AM2 for?

Mickey

Re: [Michael Blake] Printer friendly

By kevbarker - July 31, 2008

I have found the best way to make your website 'Printer Friendly' is to create a CSS stylesheet for printing. This has worked very well for the sites I have designed. You create ONE stylesheet as opposed to TWO versions of EACH web page or document you want to be able to print and worrying about linking to the second 'print version'. You set the elements which you do not want to be printed (say your menu or background, etc.) to 'display:none'

Try a Google search on 'css print styles' and you will find tons of info. A great starting point would be here: http://www.alistapart.com/stories/goingtoprint/

Hope this helps,

Kevin

Re: [kevbarker] Printer friendly

Thanks Kevin,
I'll read up on that.

Mickey

Re: [Michael Blake] Printer friendly

By Jake - July 31, 2008

Hi Mickey,

Another technique to set up a printer-friendly page in CMS Builder would be to create a new viewer page with a scaled-back design to accommodate printing. You can link to this printer-friendly page from your regular page by creating a link like this, so that the page's record number is passed along:

<a href="/path/to/printer_friendly.php<?php echo $record['num'] ?>">Printer-friendly Page</a>

I hope that helps!
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

Re: [Jake] Printer friendly

Thanks Jake,
That's a good idea for me to try,

Mickey

Re: [Jake] Printer friendly

Hi

Our webhosting will not permit the createPDF to run on the server (due to the shell(exec) being open), therefore, I've had to revert back to creating a print-friendly page. I've created another page (printpage.php), and have used the code you have provided <a href="/path/to/printpage.php<?php echo $record['num'] ?>">Printer-friendly Page</a>, however, it's coming back that this page can't be found.

On this subject, is there a way I can

1) launch this from an image jpg/gif?

2) have it write to pdf rather than "just to a printer"

Thanks

Re: [degreesnorth] Printer friendly

By Jason - September 1, 2010

Hi,

Does it come up with an actual 404 page cannot be found, or does it just say that the record can't be found? In order to trouble shoot this, I would need a link to a page I can look at as an example. Also, if you could attach printpage.php, I can take a look to make sure there aren't any issues inside that file.

Yes, you can use an image instead of text for the link. The code would look something like this:
<?php echo $record['num'] ?>"><img src="yourImage.gif" /></a>

I'm not sure what you mean by "write to pdf". If you want to actually write a pdf file, I believe you'd need to use the createPDF plugin. I'm not sure of another way to do with since your hosting provider won't allow the script to run.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Printer friendly

Hi Jason
It indicates that the page cannot be found. If you take a look at http://www.fordland.com.au/lease.php?Unit-4-199-Parramatta-Road-1 (at the bottom there's a link to "print friendly page" - that link doesn't work. So, I attach both the printpage.php and the lease.php files.

Unfortunately, the webhost who provides all the connectivity for this client is not flexible with regards to opening up the shell (exec) to enable createPDF to run. Hence this print option instead.

Thanks in advance for your help.
Attachments:

lease.php 48K

printpage.php 26K

Re: [degreesnorth] Printer friendly

By Jason - September 1, 2010

Hi,

This is the current code you're using on line 740 on lease.php

<a href="/path/to/printpage.php<?php echo $record['num'] ?>">Printer-friendly Page</a>

Try changing it to this:

<a href="printpage.php<?php echo $lease_warehouseRecord['num'] ?>">Printer-friendly Page</a>

Give that a try and let me know if it helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/