略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: PDF_translate

2024-11-15

PDF_translate

(PHP 4, PECL pdflib >= 1.0.0)

PDF_translateSet origin of coordinate system

说明

PDF_translate ( resource $p , float $tx , float $ty ) : bool

Translates the origin of the coordinate system.

add a note add a note

User Contributed Notes 3 notes

up
0
php at mijav dot dk
14 years ago
Note that this function does NOT eliminate the need for reverse-thinking when designing PDFs.

Origin 0, 0 is the lower left corner. This function only MOVES this origin (0,0) - it does not reverse the Y-axis as some people might belive and want (including myself).
up
0
david at mubo dot nl
17 years ago
Not only this function is useful if you are tired of using the lowerleft side of the page, but it is also great if you need to rotate your page..

I have a project in which I need to rotate the page 180 due to calibration problems.. With this function I could reset the origin and the rest of the PDF worked just fine..

I also think that this function primarly has been mode for situations like these...

This function can also be used as a calibration feature, though I dont do it myself, I can think that it will work very nice if your whole document is out of calibration for lets say 1 mm..
up
0
hazelnutlatte at hotmail dot com
18 years ago
This function is useful if you're tired of trying to deal with an axis that has a point of origin in the lower left-hand corner of the page.  Enjoy.

官方地址:https://www.php.net/manual/en/function.pdf-translate.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3