Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: transformation matrix
Conf: (P-PDF) Developers, Msg: 69953
From: elviejokike
Date: 8/6/2002 06:15 PM

Hi.. At this moment i am working in a Clipping PDF project.. It's working almost fine. But i have some small problems with transformation matrix.
Ok, i am using Windows 2000, Acrobat Plugin SDK and so.
I have one pdf file. Then, from another component i receive coordinates to clip. Then, i use this information to clip the coordinates from my original pdf file, get the content inside of this coordinates and create a new pdf with this content and scaling all the elements with the scale factor specified. it sounds nice and is working almost fine. But, to scale and move the content (element by element) i use the transformation matrix, but how can i exactly specified translation matrix and scale matrix keeping the rotation matrix of the original element. In my code you can see how i am moving and scaling the element (just for image as example)

translationMatrix.a = fixedOne; // x scale = 1
translationMatrix.b = fixedZero;// no rotate & skew
translationMatrix.c = fixedZero;// no rotate & skew
translationMatrix.d = fixedOne;// y scale = 1
translationMatrix.h = FloatToFixed(xPos);
translationMatrix.v = FloatToFixed(yPos);

scaleMatrix.a = newWidth;// x scale = 1
scaleMatrix.b = fixedZero;// no rotate & skew
scaleMatrix.c = fixedZero;// no rotate & skew
scaleMatrix.d = newHeight; // y scale = 1
scaleMatrix.h = fixedZero;// x translation
scaleMatrix.v = fixedZero;// y translation


PDEElementSetMatrix(pdeElement, &matrix);

It's according to specification, but using this code i am losing the rotation of the image (when the image is rotated).

Any suggestions..
Thanks very much.
E. Sanjuanelo

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.