Monday, January 25, 2010

How to Add/Change Reflow property for PDF files


Reflow option need to be enabled if you want to read PDF files on small screens (smartphones, PDA-s, eBook readers etc). In most cases downloaded PDFs don't have setted this option, and you can't easy set that.
I found only one method:

First you need program FineReader. In that program than open your PDF file. Than you need to call Read all pages (this is procedure where FineReader goes through all pages and prepare texts and paragraphs):


When "reading" is finished, you can save your PDF. In save dialog pick pdf:


and in format setings check "enable tagged PDF".


And that's all. Wait some time and your new reflowed document is ready.

Tuesday, January 12, 2010

How to change 3D perspective (camera POV) in Actionscript 3

In Actionscript 3 for Flash CS4 (Flex SDK 3.2 or newer) Adobe added some new features for simple 3D DisplayObject manipulation. You can rotate display objects in 3D space, but if you need to add your component to other display container your 3D perspective probably will be changed. The biggest problem is that for all 3D views default camera position is center of main scene, not of your display object.

So if you need to specify concret position of camera just for your display object you need to specify PerspectiveProjection and set it to your transform property. This is code:

var perspective:PerspectiveProjection;
perspective = new PerspectiveProjection();
perspective.projectionCenter = new Point(400, 300);
transform.perspectiveProjection = perspective;