How to change PDF layout ?

Moderator: crythias

Locked
StefanoBoccanera
Znuny newbie
Posts: 76
Joined: 23 Feb 2011, 15:43
Znuny Version: 3.1.5
Real Name: Stefano Boccanera
Company: I.Conseils (self-employee)
Location: Rome (Italy)

How to change PDF layout ?

Post by StefanoBoccanera »

Hi

I'd like to know a deep information how to modified the page layout from PDF.pm module.
I just modified the 'logo' parameter to include the comany's logo but the size of image header as defined into PDF.pm is showing a 'smashed' picture.
I tried to change, from 100 to 200, the height parameter and the picture is good but the hedaer block overlap the information body.

How I can to adjust the page layout, modifing the page sections position (header, footer, and so on) according to my needs?

best regards

stefano
Stefano Boccanera

OTRS : 3.1.5
ITSM : 3.1
S.O : RH
RDBMS : Postgres
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to change PDF layout ?

Post by crythias »

You'll need to take a look at the Agent Ticket Print http://forums.otrs.org/viewtopic.php?f=60&t=5940 <-- This adds a little bit of text on the printout, but also tells you where to update the code that prints.
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
moxa
Znuny newbie
Posts: 5
Joined: 09 Mar 2011, 16:51
Znuny Version: 3.0.5

Re: How to change PDF layout ?

Post by moxa »

hi StefanoBoccanera

plllzzz what 's the procedure to change tho logo
StefanoBoccanera
Znuny newbie
Posts: 76
Joined: 23 Feb 2011, 15:43
Znuny Version: 3.1.5
Real Name: Stefano Boccanera
Company: I.Conseils (self-employee)
Location: Rome (Italy)

Re: How to change PDF layout ?

Post by StefanoBoccanera »

hi moxa

You have to configure in core::PDF a different path to an immage (png, gif, jpg), that will set a new image logo for all PDF reports.

I had seen some problem about my image, because it was 'smashed' and adjusting the defaul value (700 width, 100 height) in PDF.pm induced other output problem. I solved problems, modifying some value about header size, within some .pm used to print informations.

For crythias ... thanks for suggestion (good for further customization) but I solved my problems with litlle modification to module where the layout page was defined (for example agentITSMChangePrint.pm).

By the way more I discover OTRS function and more I appreciate your work, it's sound very good.

stefano
Stefano Boccanera

OTRS : 3.1.5
ITSM : 3.1
S.O : RH
RDBMS : Postgres
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to change PDF layout ?

Post by crythias »

I don't deserve any credit for OTRS (seriously. I'm not an employee of OTRS). I'm just a guy who likes to post a lot.
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
kristaps
Znuny newbie
Posts: 2
Joined: 12 Mar 2011, 23:07
Znuny Version: 3.0.5

Re: How to change PDF layout ?

Post by kristaps »

If I am correct OTRS uses http://www.fpdf.org/ if not for all, that for most PDF generations, so checking out the official manuals, and seeing how it work should be of a great help.
In the same time - my personal experience with FPDF havent been from the most pleasant ones.

Good luck!
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to change PDF layout ?

Post by jojo »

OTRS is using PDF::API2
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
mas
Znuny newbie
Posts: 2
Joined: 09 Nov 2015, 16:29
Znuny Version: 4.0.4

Re: How to change PDF layout ?

Post by mas »

would like to Print the Customer Company Name on the Ticket Output is this possible ?
thanxs for your help
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: How to change PDF layout ?

Post by RStraub »

Please don't reactivate a 4 years old post when you could create a new one :)


PDF print is hardcoded, you can modify it, but you'd have to pass the value in the .pm file and alter the table layout in the .tt (or .dtl) file.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
mas
Znuny newbie
Posts: 2
Joined: 09 Nov 2015, 16:29
Znuny Version: 4.0.4

Re: How to change PDF layout ?

Post by mas »

sorry, i tought since the topic was the same... :-)
I'm not very familiar with does procedure could you give me a little more details on the steps you described ?
cheers
Locked