in reply to Problem using PDF::API2 version 2.021
Maybe try making the transformations separately.
$local_gfx_context->translate($x_dir_ref,$y_dir_ref); $local_gfx_context->rotate($mid_angle_pdf);