sivarajankumar / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Creating a PDF using Points as the Unit results in an offset PDF file #194

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new PDF:

var s:Size = new Size([392, 612],"test", [0,0], [0,0]);
var page:Page = new Page(Orientation.PORTRAIT, Unit.POINT, s);

2. Draw something at 0,0
3. Note that nothing will show up in the PDF.  (0,0) is actually (0, 471)
or so.

What is the expected output? What do you see instead?

I would expect that drawing a rectangle at (0,0) would result in the
rectangle being in the upper-left corner of the page.  Instead, at 0,0, it
is "above" the page and therefore not visible.

What version of the product are you using? On what operating system?
1.5RC, but this was an issue in 1.5 Beta as well.  Not sure about previous
versions.  OS = Mac OS X

Please provide any additional information below.

Original issue reported on code.google.com by kopchi...@gmail.com on 11 Feb 2010 at 8:46

GoogleCodeExporter commented 8 years ago
Also, the math doesn't seem to work right - if the pdf's width is 100, for 
example,
and I draw a rectangle with a width of 50, the PDF displays a rectangle much 
larger
than half the width of the page.

Original comment by kopchi...@gmail.com on 11 Feb 2010 at 8:58

GoogleCodeExporter commented 8 years ago
This can be deleted. I hadn't set the PDF units to Unit.POINT, only the Page's. 
 So
the PDF was still rendering things in MM.

Original comment by kopchi...@gmail.com on 11 Feb 2010 at 9:16