[SOLVED]Get rid of grey background PDF
Moderator: crythias
[SOLVED]Get rid of grey background PDF
I would like to get rid of the grey background in PDFs. I read the solution offered in viewtopic.php?f=62&t=9686 but it doesn't quite satisfy me.
I generally prefer not to change the code directly. In case of .dtl files, I copy them into /opt/otrs/Kernel/Output/HTML/<MyFolder> and make the required changes there. How can I do the same for Modules?
I created a directory /opt/otrs/Custom/Kernel/Modules, copied the AgentTicketPrint.pm file there and removed Color => '#666666' from the module.
Following the README in /opt/otrs/Custom/ I also copied Kernel/System/Service.pm to Custom/Kernel/System/Service.pm. The README also mentions that the Service.pm must be changed. I don't quite follow, which changes are needed so that the customized module, instead of standard module, is used.
I generally prefer not to change the code directly. In case of .dtl files, I copy them into /opt/otrs/Kernel/Output/HTML/<MyFolder> and make the required changes there. How can I do the same for Modules?
I created a directory /opt/otrs/Custom/Kernel/Modules, copied the AgentTicketPrint.pm file there and removed Color => '#666666' from the module.
Following the README in /opt/otrs/Custom/ I also copied Kernel/System/Service.pm to Custom/Kernel/System/Service.pm. The README also mentions that the Service.pm must be changed. I don't quite follow, which changes are needed so that the customized module, instead of standard module, is used.
Last edited by aph on 08 May 2015, 16:47, edited 1 time in total.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Get rid of grey background PDF
What you saw in the Readme is an example. It even says so:
They are explaining an use-case. This is nothing you have to do for every customization.
What you did is exactly right. Copy the file you want to modify to the same path below Custom/ and make your changes there.
Ignore everything you read about Service.pm
Code: Select all
Example:
You need to modify Kernel/System/Service.pm to add an customization [..]
What you did is exactly right. Copy the file you want to modify to the same path below Custom/ and make your changes there.
Ignore everything you read about Service.pm

Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Get rid of grey background PDF
After making the changes the grey background is still visible. I rebuild the config, deleted cache, set permissions again, cleared browser cache. I get the following error:
Hence I renamed ZZZAAuto.pm to ZZZAAuto.pm.bak and let it be created afresh. Yet the problem persists.
Any idea how to resolve the problem?
Code: Select all
[Wed Mar 4 16:08:16 2015] ZZZAAuto.pm: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 7.
Any idea how to resolve the problem?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Re: Get rid of grey background PDF
At the time I wrote this I didn't know about the Custom folder.aph wrote:I would like to get rid of the grey background in PDFs. I read the solution offered in viewtopic.php?f=62&t=9686 but it doesn't quite satisfy me.
I generally prefer not to change the code directly. In case of .dtl files, I copy them into /opt/otrs/Kernel/Output/HTML/<MyFolder> and make the required changes there. How can I do the same for Modules?
I created a directory /opt/otrs/Custom/Kernel/Modules, copied the AgentTicketPrint.pm file there and removed Color => '#666666' from the module.
What you did is the right thing: copy the code file you want to change into Custom folder, with the same sub-folder tree structure Inside.
Note it works for .dtl files as well! Juste create /opt/otrs/Custom/Kernel/Output/HTML...
But... the principle of the Custom folder is that its content overwrites OTRS standard.
So I would advise not to remove Color => '#666666', but to modify it to Color => '#FFFFFF' - or whatever you like.
Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Re: Get rid of grey background PDF
I changed the colour instead of removing it. Yet I get the following errors:
Can't really fathom why this error occurs
Code: Select all
ERROR: Permission denied: /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm
[Wed Mar 4 17:22:55 2015] ZZZAAuto.pm: Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 7.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Get rid of grey background PDF
Permission denied:
Run a "chmod otrs:www-data" (or whatever your user / group is) on ZZZAAuto.pm
The "Subroutine Load redefined" is not an error, but rather an info for you. Most of the times you can ignore those lines.
Run a "chmod otrs:www-data" (or whatever your user / group is) on ZZZAAuto.pm
The "Subroutine Load redefined" is not an error, but rather an info for you. Most of the times you can ignore those lines.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Get rid of grey background PDF
Thanks for the reply
When running setPermissions.pl I use the following settings
The ls -l on ZZZAAuto.pm returns
So the user/group already have the rw permissions
I can't quite get you with the chmod thing. How do I run this command, which mode is required?RStraub wrote:Permission denied:
Run a "chmod otrs:www-data" (or whatever your user / group is) on ZZZAAuto.pm
When running setPermissions.pl I use the following settings
Code: Select all
--otrs-user=otrs
--web-user=apache
--otrs-group=apache
--web-group=apache
Code: Select all
-rw-rw----. 1 otrs apache 188316
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Get rid of grey background PDF
chmod is (very simply put) what the setPermissions.pl does , but for a single file.
In your case you'd cd to ~otrs/Kernel/Files/ and use:
But as you've shown with the ls -l comman, the file has correct permissions. Do you still get the permission denied error?
If so, please run:
Just to make sure the user your apache runs under is called apache.
In your case you'd cd to ~otrs/Kernel/Files/ and use:
Code: Select all
chmod otrs:apache ZZZAAuto.pm
If so, please run:
Code: Select all
ps aux | egrep '(apache|httpd)'
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Get rid of grey background PDF
ps aux | egrep '(apache|httpd)' returns
So as far as I see the user is running under apache.
chmod otrs:apache ZZZAAuto.pm returns
Code: Select all
root 1655 0.0 1.9 319192 74768 ? Ss 09:42 0:02 /usr/sbin/httpd
apache 1688 0.0 2.5 386244 100224 ? S 09:42 0:00 /usr/sbin/httpd
apache 1689 0.0 2.5 385928 100020 ? S 09:42 0:00 /usr/sbin/httpd
apache 1690 0.0 2.6 397600 105488 ? S 09:42 0:01 /usr/sbin/httpd
apache 1691 0.0 2.5 386136 100004 ? S 09:42 0:00 /usr/sbin/httpd
apache 1692 0.0 3.6 433728 143852 ? S 09:42 0:02 /usr/sbin/httpd
apache 1693 0.0 2.4 381476 97824 ? S 09:42 0:00 /usr/sbin/httpd
apache 1694 0.0 2.4 378724 94836 ? S 09:42 0:00 /usr/sbin/httpd
apache 1695 0.0 2.6 397148 104948 ? S 09:42 0:00 /usr/sbin/httpd
root 3215 0.0 0.0 103084 920 pts/1 S+ 13:41 0:00 egrep (apache|httpd)
chmod otrs:apache ZZZAAuto.pm returns
Code: Select all
chmod: Ungültiger Modus: „otrs:apache“
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Znuny guru
- Posts: 2210
- Joined: 13 Mar 2014, 09:16
- Znuny Version: 6.0.14
- Real Name: Rolf Straub
Re: Get rid of grey background PDF
Sorry, mein Fehler. Der Befehl ist "chown" nicht "chmod" 
Aber du hattest ja mit dem ls -l eh schon gezeigt das es passt - kannst du nochmal im Apache Log schauen ob du weiterhin permission denied fehler bekommst?

Aber du hattest ja mit dem ls -l eh schon gezeigt das es passt - kannst du nochmal im Apache Log schauen ob du weiterhin permission denied fehler bekommst?
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Re: Get rid of grey background PDF
I realized that in addition to #666666 there is a Hexcode #DDDDDD for grey. After replacing it with #FFFFFF the grey background was gone
Last edited by aph on 05 Mar 2015, 18:07, edited 1 time in total.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Re: Get rid of grey background PDF
Replacing #666666 with #FFFFFF leads to the fact that title (Customer infos, Articles etc.) are not visible, since the background and font colour are the same. So in order to get rid off grey backgrounds replace #DDDDDD only.
The page is however confusing as background is now missing (obviously!) Would it be possible to underline the titles (customer infos, articles etc.)? What would be the correct value for Font? At the moment it is ProportionalBoldItalic. Using the value ProportionalBoldItalicUnderline I get apache errors
The page is however confusing as background is now missing (obviously!) Would it be possible to underline the titles (customer infos, articles etc.)? What would be the correct value for Font? At the moment it is ProportionalBoldItalic. Using the value ProportionalBoldItalicUnderline I get apache errors
Last edited by aph on 05 Mar 2015, 18:05, edited 1 time in total.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Get rid of grey background PDF
Hey all :) This is the English forum. Please let me know if you'd like to move this thread to the German Language forum or kindly translate to English.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Get rid of grey background PDF
Underline is not a property of a character (unlike 'bold' or 'italic').
You have to change Kernel::System::PDF::Text() to accept an option for underlining the text and pass that to the text method of PDF::API2... And you have to change the Kernel::Modules::* module to pass the underline option when the text should be underlined...
You have to change Kernel::System::PDF::Text() to accept an option for underlining the text and pass that to the text method of PDF::API2... And you have to change the Kernel::Modules::* module to pass the underline option when the text should be underlined...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Get rid of grey background PDF
Thank you for the explanation
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache