Custom print document window

Discuss the development and implementation of Joomla! bots/Plugins here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
rjangles
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Nov 01, 2005 3:50 am

Custom print document window

Post by rjangles » Thu Nov 03, 2005 11:15 pm

I would like edit the window that the print document button opens.  I wold like to put a company logo and some copyright information so that information is included on the printout.  Any suggestions?

Thanks

tijs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 109
Joined: Mon Aug 29, 2005 7:59 pm

Re: Custom print document window

Post by tijs » Fri Sep 01, 2006 12:01 pm

Is there any answer to this question? I'd also like to know how to do this?

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Thu Jan 18, 2007 1:50 pm

Even I have same query. How to display company name, copyright in custom print page /print function? Is there any better way than just including in every content company name and copyright information? I am sure there is a way, but don't know how? I also guess it requires modification of either javascript or php file?
Can any one please help to this long standing demand which I have been looking for around for a while?

User avatar
clievers
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 18, 2007 5:43 pm
Location: Calgary, AB, Canada
Contact:

Re: Custom print document window

Post by clievers » Thu Jan 18, 2007 5:46 pm

Hi there, I'm just beginning to learn Joomla myself, but I did notice one thing. If in your template, you create an "index2.php" file (notice the "2"), this file will be used when Printing (I believe email/pdf too). So you can create custom stuff for printing by adjusting this template file. You can remove menus, lists, etc, even add your custom footer.

For me, right now I'm trying to figure out how to have my own custom print/email buttons/links, because A) I don't like where there are put by default, and B) I want a different look (and possible action) to them.  ???

Anyways, hope this helps. Good luck.
let's all play nice...

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Fri Jan 19, 2007 4:57 am

Thanks for the hint. I will work on it and post here details.

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 563
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: Custom print document window

Post by Kampp » Tue Feb 20, 2007 3:46 pm

Hi, has there been any progress on this point?
http://www.toolmaster.dk - Danish Joomla Services!

tijs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 109
Joined: Mon Aug 29, 2005 7:59 pm

Re: Custom print document window

Post by tijs » Wed Feb 21, 2007 11:37 am

Bump seconded  8)

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Wed Feb 21, 2007 1:41 pm

Hi,
I am sorry but I have not worked yet on it, as currently working on priority assignment.
I will start working on this from 17th March and will post here the solution along with problems, that I may face.

Thanks for reminding and sorry for inconveninence, if any.

dagwud
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 28, 2006 3:38 pm

Re: Custom print document window

Post by dagwud » Wed Feb 28, 2007 8:14 pm

I'm looking forward to a solution for PDF output. In the mean time, I've found a solution that works for us regarding the print pages.

I edited index2.php and added our footer content before the closing body tag . Rather than futzing with the stylesheet, I used inline style settings to format the footer. Now, we get the information that has to be on every page on our "print" pages as well.

But I still need to get the footer on the PDF output before I make the PDF buttons active. So I'd love to find a solution to this.

I can't be the only one who thinks this should be an option in the default installation, can I?

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Fri Apr 20, 2007 9:39 am

My work is on. I though i will just share this. I have learned little bit of joomla templates and now can say I can create one myself (with lot of efforts on CSS).

What I learned there is that for custom print like including copyright message in all pages converted into pdf / print page, I need to look at, may be some core joomla.

Caution! Hey any one relying on me, please note that I am legal professional and out of my love for web and Joomla as CMS, I am doing this for my website and willing to share solution. However how much time it will take is not sure. I hope you can understand that to devote time out of my proefessional work and then learn things and apply to my website. It takes time.

dagwud
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Oct 28, 2006 3:38 pm

Re: Custom print document window

Post by dagwud » Fri Apr 20, 2007 1:44 pm

I'm pretty sure that most of us using Joomla! are doing it as a second calling. I, for one, appreciate any solution you have time to create.

And even if you don't have time, I appreciate that you wish you did.  :laugh:

jbrowdy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 226
Joined: Mon Apr 17, 2006 9:48 pm

Re: Custom print document window

Post by jbrowdy » Sat Apr 28, 2007 4:44 am

How do you make your print button call index2 instead of index?

Falken
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Feb 09, 2006 1:07 am

Re: Custom print document window

Post by Falken » Tue May 15, 2007 10:55 am

jbrowdy wrote: How do you make your print button call index2 instead of index?
I would also like to modify my print pages.
Can anyone give an example of a working index2 , and also answer the question above?

Thank you

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Wed May 16, 2007 11:00 am

jbrowdy wrote: How do you make your print button call index2 instead of index?
Thanks for the hint. However I did not get it properly, but found some intermediate solution.

I inserted in index2.php file in the root directory, the following two lines.
First line inserted after the code and before the code
Line inserted is


The second line inserted after the code else { mosMainBody(); and before } doGzip();
echo "
© 2007 Prakash Pandya, P. K. Pandya & Co., Practising Company Secretary. All rights reserved.
http://www.prakashpandya.com";


The effect is that when the visitor to my website clicks either print button or email button, s/he can see the message "© 2007 Prakash Pandya, P. K. Pandya & Co., Practising Company Secretary. All rights reserved.
http://www.prakashpandya.com" after close window.

Note: On liver webserver, i have changed the name of currently working index2.php so that if modified index2.php do not work, I can easily resport to this. Reader of this post may take appropriate steps before making changes available live.

jbrowdy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 226
Joined: Mon Apr 17, 2006 9:48 pm

Re: Custom print document window

Post by jbrowdy » Wed May 16, 2007 6:49 pm

Here is what I did: 

Made two hacks to content.html.php file
(1) changed the print button so that it links to index3.php
  -- created and index3.php file with custom logo at top
(2) hacked code so that visualrecommend pops up instead of standard joomla email function with following syntax: 
#developers note:  see below hack in order to get visualrecommend to popup. below it is original code.
$link = $mosConfig_live_site .'/index2.php?option=com_visualrecommend& task=showform&id='. $row->id . $_Itemid;
#$link = $mosConfig_live_site .'/index2.php?option=com_content&task=emailform&id='. $row->id . $_Itemid;

Visualrecommend is a much better recommend component than the core email function.

jonfai
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Dec 08, 2005 5:41 pm
Location: zarautz
Contact:

Re: Custom print document window

Post by jonfai » Wed May 16, 2007 9:50 pm

i have solve it using this code in my css template:

body.contentpane { font-size: 11px;
background: #EFF3FC url(http://domain/images/image.jpg) no-repeat;
padding-top: 70px }

User avatar
pkpandya
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 03, 2006 1:14 pm
Location: Mumbai, India
Contact:

Re: Custom print document window

Post by pkpandya » Thu May 17, 2007 3:57 am

Thank you jbrowdy.
I am looking at visualrecommend as you appreciated it.
Thanks again.

jbrowdy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 226
Joined: Mon Apr 17, 2006 9:48 pm

Re: Custom print document window

Post by jbrowdy » Thu May 17, 2007 4:00 am

Developer is responsive.  Component is great.  ;)

alvedon
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Fri Aug 18, 2006 7:50 am
Location: Stockholm, Sweden
Contact:

Re: Custom print document window

Post by alvedon » Sun Jul 29, 2007 3:40 pm

Thanks for the tip you guys!  :D It's really nice to have the company information even on printed pages! Implemented it now to my own page, works flawlessly!

Best regards,
Daniel
Daniel Liliegren, Higher webbutveckling, Stockholm Sweden
http://www.higher.se

User avatar
hal9000_2001
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jun 21, 2006 12:21 am
Location: Melbourne Australia
Contact:

Re: Custom print document window

Post by hal9000_2001 » Tue Nov 16, 2010 12:08 am

Hi,

If you examine the print window source you will find the following css includes;

<link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="/templates/system/css/general.css" type="text/css" />

This is where the print window gets it's styling. If you add the formatting rules to either of these files you can control the print formatting exactly as you want. Not the best solution but it works.

**** NOTE: Any changes to these files by version upgrades WILL OVERWRITE your modification so you need to check if these files are included in any patches.*****
Look Dave, I can see you're really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over.

markroberson
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 03, 2012 6:17 pm
Contact:

Re: Custom print document window

Post by markroberson » Tue Apr 03, 2012 6:31 pm

well printing a custom document window is a great technique and i was just looking to print it from last week and facing errors on each step. Now, i hope i ll be able to print logo with that as well. Thanks again for sharing the nice information.

markroberson
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Apr 03, 2012 6:17 pm
Contact:

Re: Custom print document window

Post by markroberson » Tue Apr 03, 2012 6:32 pm

well printing a custom document window is a great technique and i was just looking to print it from last week and facing errors on each step. Now, i hope i ll be able to print logo with that as well. Thanks again for sharing the nice information.

boiler
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue May 13, 2008 1:41 am
Location: Indonesia
Contact:

Re: Custom print document window

Post by boiler » Wed Jun 06, 2012 8:01 am

thanks for the sharing :)
http://healthcareoasis.com - Healthy Living Source and Health News
http://www.maniakhost.com - Hosting Indonesia


Locked

Return to “Plugins/Mambots”