Jump to content
Sign in to follow this  
LurchMan

help with coords..

Recommended Posts

LurchMan

I'll admit straight up that i know absolutly nothing about using coordinates. I'm trying to use Martin's print UDF to print a screenshot that has been taken and saved. heres the code ive got:

$hp = _PrintDLLStart ($hDll)
_PrintPageOrientation($hp,0)
_PrintSetPrinter($hp)
$pgwd = _PrintGetpageWidth($hp) - _PrintGetXOffset($hp)
$pght = _PrintGetpageheight($hp) - _PrintGetYOffset($hp)
$axisx = Round($pgwd * 0.8)
$axisy = Round($pght * 0.8)
_PrintImage($hp,$TempFile,$axisx,$axisy,$pgwd,$pght)
_PrintEndPrint($hp)
_PrintDllClose ($hDll)

I copied the cood math from one of martins examples, and when it prints its in ther bottom right hand corner of the paper in a small square. Also i wanted it as landscape and it came out as portrait...

I basically want the screen shot to print on a single full page in landscape format.

All help will be appreciated

Thanks


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites
Valuater

$axisx = Round($pgwd * 0.8)

$axisy = Round($pght * 0.8)

The 0.8 (*) times Page-width / Page-height is says

80% of 8.5

and

80% of 11

normal paper is 8.5 inches by 11 inches

just change the 0.8 to 0.1 ( 10%) and see what happens

8)

EDIT, I have not used the UDF and do not know how to set it to Landscape.

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
LurchMan

Thank you!!! (I actually had to use 1% of the page to make it work right) and i figured out the landscape thing just by messin around with it..lol

again thank you!


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×