Comments (2)
The Pear modification of the FPDF library includes a routine called
writeRotated().
I'm not sure if it will support any angle, but from the looks of it, it should.
I'm working on converting this, but since I haven't done too much with the
source
yet, I'm not exactly sure how it is going to work out. If anyone else would
like to
give it a shot, here's the method:
function writeRotated($x, $y, $text, $text_angle, $font_angle = 0)
{
if ($x < 0) {
$x += $this->w;
}
if ($y < 0) {
$y += $this->h;
}
/* Escape text. */
$text = $this->_escape($text);
$font_angle += 90 + $text_angle;
$text_angle *= M_PI / 180;
$font_angle *= M_PI / 180;
$text_dx = cos($text_angle);
$text_dy = sin($text_angle);
$font_dx = cos($font_angle);
$font_dy = sin($font_angle);
$s= sprintf('BT %.2' . FILE_PDF_FLOAT . ' %.2' . FILE_PDF_FLOAT . ' %.2' .
FILE_PDF_FLOAT . ' %.2' . FILE_PDF_FLOAT . ' %.2' . FILE_PDF_FLOAT . ' %.2' .
FILE_PDF_FLOAT . ' Tm (%s) Tj ET',
$text_dx, $text_dy, $font_dx, $font_dy,
$x * $this->_scale, ($this->h-$y) * $this->_scale, $text);
if ($this->_draw_color) {
$s = 'q ' . $this->_draw_color . ' ' . $s . ' Q';
}
$this->_out($s);
}
Original comment by [email protected]
on 10 Oct 2007 at 1:21
from alivepdf.
Hi bustback,
I have added a rotate method which is accepting a matrix. I will call it
transparently for all the different drawing methodds (addImage, addCell,
addText, etc).
Give me a few days and I'll post an update ;)
Thanks !
Original comment by thibault.imbert
on 10 Oct 2007 at 11:25
from alivepdf.
Related Issues (20)
- ASDoc error
- writeHtmlText + addMulticell
- addBookmark supports only eight colors
- Can't override header or footer method HOT 1
- how can i open Local drive pdf file through AS3?
- Adding multiple image freeze the ui
- Grid problem
- addImage with displayObjects is not working
- AlivePDF does not print content of Flash Pro CS5.5 Stage
- AddImage() problem HOT 1
- Security error #3769 breaks navigateToUrl() while trying to save PDF HOT 5
- savePDF() method HOT 1
- problems with mx cavas scaled on add image
- Chinese characters won't show on iOS
- PNG error "Missing palette in current picture" HOT 1
- Some addGrid bugs HOT 1
- .. HOT 1
- setAutoPageBreak(true) does not restore margin HOT 1
- Problems exporting IPA with AIR SDK 15 & especially 16 in Flash Builder
- AlivePDF Page elements are messed up with AIR SDK 16+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alivepdf.