[Solved] Using TCPDF class for generating PDF custom docs

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
surfandfun
New Member
New Member
Posts: 4
Joined: Mon Aug 04, 2008 4:38 pm

Re: [Solved] Using TCPDF class for generating PDF custom docs

Post by surfandfun »

I have tried there too Jeremy.
Thank you very much for your answer though.
JeremyBASS

Re: [Solved] Using TCPDF class for generating PDF custom docs

Post by JeremyBASS »

have you tried this?
http://www.tecnick.com/pagefiles/tcpdf/ ... TCPDF.html - methodwriteHTML
surfandfun
New Member
New Member
Posts: 4
Joined: Mon Aug 04, 2008 4:38 pm

Re: [Solved] Using TCPDF class for generating PDF custom docs

Post by surfandfun »

hi jeremy,

with Rect() function they write the following;

void Rect( float $x, float $y, float $w, float $h, [string $style = ''], [array $border_style = array()], [array $fill_color = array()])

    * D or empty string: Draw (default).
    * F: Fill.
    * DF or FD: Draw and fill.
    * CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
    * CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).

I just assume writing Rect(0,0,50,50,'CNZ')

would clip my picture which is placed at (x=0,y=0,width=200,height=200)

I just expect to see the 0,0,50,50 part of my picture.

which actually also functions if I take a starpolygon (what they call) instead of Rectangle. It either is a bug or I do something stupid  with the syntax  But I really reduced it down to simplest to make sure that I can avoid syntax mistakes.
JeremyBASS

Re: [Solved] Using TCPDF class for generating PDF custom docs

Post by JeremyBASS »

Based on this...
http://www.tecnick.com/pagefiles/tcpdf/ ... larPolygon

I'd think that this is your best bet...
RegularPolygon(0,0,50,50,'CNZ')

not sure as I don't crop images via TCPDF... it uses server time and I'll just pre crop it...

that's my2Cents.. hope it helps...
jeremyBass
surfandfun
New Member
New Member
Posts: 4
Joined: Mon Aug 04, 2008 4:38 pm

Re: [Solved] Using TCPDF class for generating PDF custom docs

Post by surfandfun »

you are right jeremy, first crop it with GD then place it.I am allready working on it.
Thank you very much.
Locked

Return to “Tips and Tricks”