Howto add some text to the PDF

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Howto add some text to the PDF

Post by crythias »

I wish there was a better way, but this is what I have, now.
Let's say you're printing these tickets for Agents that don't have computers/access to OTRS. You'd like for them to "Sign Off" on a ticket before handing it back in.

So...
near the bottom of sub _PDFOutputArticles in Kernel/Modules/AgentTicketPrint.pm you might put this code snippet (last few lines are for position purposes.)

Code: Select all

            # output random text
            my %randomTableParam;
               $randomTableParam{CellData}[0][0]{Content} = "Line ONE: _________________
Line TWO: _________________
Line THREE: _________________";
               $randomTableParam{CellData}[0][0]{Font} = 'Proportional';
            $Self->{PDFObject}->Table( %randomTableParam, );
    return 1;
}

sub _HTMLMask {
This should print immediately after the last Article is printed. It's not a *clean* answer, as once in a while it may not fit on the page you expect, but at least it provides an opportunity to add something there.
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
Post Reply