PDF function Library: pdf_translate

Source: Internet
Author: User
Keywords pdf_translate pdf function Library php Chinese function manual
Tags code content example examples file function function library moving

Pdf_translate

Move the Origin point.

Syntax: boolean pdf_translate (int pdfid, double x-koor, double y-koor);

Return Value: Boolean value

Function type: Special file format

Content Description

This function is used to move the origin. Parameter Pdfid to PDF file code. The parameters X-koor and Y-koor are floating point numbers, and the moving distances of x and Y are respectively.

Usage examples

The following example first draws a line from (0,0) to (100, 100), then move the origin to X, Y (100, 100), and then draw a line (0, 0) to (100, 100) to form a line (-100,-100) to (100, 100). The procedure is omitted before and after.

<?php
Pdf_moveto ($pdf, 0, 0);
Pdf_lineto ($pdf, 100, 100);
Pdf_stroke ($pdf);
Pdf_translate ($pdf, 100, 100);
Pdf_moveto ($pdf, 0, 0);
Pdf_lineto ($pdf, 100, 100);
Pdf_stroke ($pdf);
?>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.