Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Printer friendly

 

 


Michael Blake
User

Jul 31, 2008, 1:50 AM

Post #1 of 12 (2101 views)
Shortcut
Printer friendly Can't Post

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


kevbarker
User


Jul 31, 2008, 4:38 AM

Post #2 of 12 (2089 views)
Shortcut
Re: [Michael Blake] Printer friendly [In reply to] Can't Post

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


Michael Blake
User

Jul 31, 2008, 11:50 AM

Post #3 of 12 (2005 views)
Shortcut
Re: [kevbarker] Printer friendly [In reply to] Can't Post

Thanks Kevin,
I'll read up on that.

Mickey


Jake
Staff


Jul 31, 2008, 1:02 PM

Post #4 of 12 (1999 views)
Shortcut
Re: [Michael Blake] Printer friendly [In reply to] Can't Post

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:


Code
<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

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
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 [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


Michael Blake
User

Aug 1, 2008, 2:10 AM

Post #5 of 12 (1983 views)
Shortcut
Re: [Jake] Printer friendly [In reply to] Can't Post

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

Mickey


sidcam
User

Aug 7, 2008, 5:11 PM

Post #6 of 12 (1893 views)
Shortcut
Re: [Jake] Printer friendly [In reply to] Can't Post

THANK YOU FOR THIS!!!!


degreesnorth
User

Aug 31, 2010, 10:40 PM

Post #7 of 12 (1003 views)
Shortcut
Re: [Jake] Printer friendly [In reply to] Can't Post

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


Jason
Staff / Moderator


Sep 1, 2010, 8:59 AM

Post #8 of 12 (987 views)
Shortcut
Re: [degreesnorth] Printer friendly [In reply to] Can't Post

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:

Code
<?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 - Programmer 
interactivetools.com

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


degreesnorth
User

Sep 1, 2010, 4:04 PM

Post #9 of 12 (982 views)
Shortcut
Re: [Jason] Printer friendly [In reply to] Can't Post

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 (47.4 KB)
  printpage.php (25.8 KB)


Jason
Staff / Moderator


Sep 1, 2010, 4:18 PM

Post #10 of 12 (980 views)
Shortcut
Re: [degreesnorth] Printer friendly [In reply to] Can't Post

Hi,

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


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


Try changing it to this:


Code
<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 - Programmer 
interactivetools.com

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


degreesnorth
User

Sep 1, 2010, 4:27 PM

Post #11 of 12 (979 views)
Shortcut
Re: [Jason] Printer friendly [In reply to] Can't Post

Hi Jason
No, st ill no go. The URL page it's displaying is http://www.fordland.com.au/printpage.php20

...should it be doing this?


Chris
Staff


Sep 1, 2010, 4:30 PM

Post #12 of 12 (978 views)
Shortcut
Re: [degreesnorth] Printer friendly [In reply to] Can't Post

Hi degreesnorth,

I think there's a question mark missing. Try changing it to this:


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


I hope this helps. Please let me know if you have any questions.
Chris