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 in PDF
Conf: (P-PDF) Developers, Msg: 69809
From: elviejokike
Date: 8/2/2002 08:21 PM

Hi.. At this moment i am working in a Clipping PDF project.. It's working almonst file. 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 and scale factor. 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

ASFixedMatrixConcat(&matrix,&translationMatrix,&scaleMatrix);

PDEElementSetMatrix(pdeElement, &matrix);

It's according to specification, but using this code i am loosing 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

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
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.

Features

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.