I've got a pdf (Not created by PDFsharp), whose page size is 8.5 by 11 (612 by 792) but the actual size of the page with hidden content is 612 by 11796. The MediaBox and CropBox is located at 11004, therefore the content between 11004 and 11796 is the actual viewable portion of my pdf page. My problem is when I try gfx.DrawString at (gfx.PageSize.Height - 250) it puts it in the unviewable portion, of course, since 792 - 250 = 542. I know I could just determine the position of the MediaBox and offset the place where I DrawString but my problem lies deeper than just this.
A quick fix to my problem if it's possible is to move the content of the MediaBox to the top of the page so that everything starts at (0,0). Is this possible?
For those more interested in my deeper problem for curiousity: In different code in my program, I use the Adobe Interop to get the JSObject to determine the mouse position on the page. At that location is where I do a DrawString. The mouse.y coordinate reports the 11004-11796 location but every pageBox in the JSObject reports the size as 612 by 792, even the MediaBox and CropBox.
_________________ If hope could grow from dirt like me, it can be done.
|