in Deutsh
in French
in Polish

You Are At Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

cpdf_rect

(PHP 3 >= 3.0.8, PHP 4, PHP 5 <= 5.0.4)

cpdf_rect -- Draw a rectangle

Description

bool cpdf_rect ( int pdf_document, float x_coor, float y_coor, float width, float height [, int mode] )

Draws a rectangle.

Parameters

pdf_document

The document handle, returned by cpdf_open().

x_coor

The x-coordinate of the lower left corner

y_coor

The y-coordinate of the lower left corner

width

The rectangle width

height

The rectangle height

mode

The optional parameter mode determines the unit length. If it is 0 or omitted the default unit as specified for the page is used. Otherwise the coordinates are measured in postscript points disregarding the current unit.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example 1. Drawing a rectangle

<?php

$cpdf
= cpdf_open(0);
cpdf_page_init($cpdf, 1, 0, 595, 842, 1.0);

// set the fill color to red
cpdf_setrgbcolor($cpdf, 1, 0, 0);

// draw a (180 * 100) rectangle
cpdf_rect($cpdf, 645, 400, 180, 100);

// fill the rectangle
cpdf_fill($cpdf);

cpdf_finalize($cpdf);
Header("Content-type: application/pdf");
cpdf_output_buffer($cpdf);
cpdf_close($cpdf);

?>

klimatyzacje lg warszawa
uroda
Koszulki Smoke Story Koszulki Smoke Story
Electro lista serwisów

Another Useful functions:


function.cpdf-translate | function.cpdf-text | function.cpdf-stroke | function.cpdf-stringwidth | function.cpdf-show | function.cpdf-show-xy | function.cpdf-setrgbcolor | function.cpdf-setrgbcolor-stroke | function.cpdf-setrgbcolor-fill | function.cpdf-setmiterlimit | function.cpdf-setlinewidth | function.cpdf-setlinejoin | function.cpdf-setlinecap | function.cpdf-setgray | function.cpdf-setgray-stroke | function.cpdf-setgray-fill | function.cpdf-setflat | function.cpdf-setdash | function.cpdf-set-word-spacing | function.cpdf-set-viewer-preferences | function.cpdf-set-title | function.cpdf-set-text-rise | function.cpdf-set-text-rendering | function.cpdf-set-text-pos | function.cpdf-set-text-matrix | function.cpdf-set-subject | function.cpdf-set-page-animation | function.cpdf-set-leading | function.cpdf-set-keywords | function.cpdf-set-horiz-scaling | function.cpdf-set-font | function.cpdf-set-font-map-file | function.cpdf-set-font-directories | function.cpdf-set-current-page | function.cpdf-set-creator | function.cpdf-set-char-spacing | function.cpdf-set-action-url | function.cpdf-scale | function.cpdf-save | function.cpdf-save-to-file | function.cpdf-rotate | function.cpdf-rotate-text | function.cpdf-rmoveto | function.cpdf-rlineto | function.cpdf-restore | function.cpdf-rect | function.cpdf-place-inline-image | function.cpdf-page-init | function.cpdf-output-buffer | function.cpdf-open | function.cpdf-newpath | function.cpdf-moveto | function.cpdf-lineto | function.cpdf-import-jpeg | function.cpdf-global-set-document-limits | function.cpdf-finalize | function.cpdf-finalize-page | function.cpdf-fill | function.cpdf-fill-stroke | function.cpdf-end-text | function.cpdf-curveto | function.cpdf-continue-text | function.cpdf-closepath | function.cpdf-closepath-stroke | function.cpdf-closepath-fill-stroke | function.cpdf-close | function.cpdf-clip | function.cpdf-circle | function.cpdf-begin-text | function.cpdf-arc | function.cpdf-add-outline | function.cpdf-add-annotation |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.