http://www.perlmonks.org?node_id=1214606

mickey522 has asked for the wisdom of the Perl Monks concerning the following question:

I am having trouble with a perl script which uses PDF::API2 version 2.021. The problem is in a bit of code which uses the transform method. The code was working on an old machine using a version from around 1999-2000. The bit of code that does not work properly is as follows:

. . . $local_gfx_context->transform( -translate=>[$x_dir_ref,$y_dir_ref], -rotate=>$mid_angle_pdf, -scale=>[1,1], -skew=>[0,0], ); . . .

if the code is commented out following code is processed. If left in following code is ignored (apparently). No output is produced beyond thet controlled by the above code snippet. There are also no error messages. I have tried various things like:
1) Using variables instead of literals as parameters
2) Adding spaces around '>='
to no avail. Any assistance in getting this fixed would be appeciated.

Replies are listed 'Best First'.
Re: Problem using PDF::API2 version 2.021
by poj (Abbot) on May 16, 2018 at 06:01 UTC

    Maybe try making the transformations separately.

    $local_gfx_context->translate($x_dir_ref,$y_dir_ref);
    $local_gfx_context->rotate($mid_angle_pdf);
    
    poj