LurchMan Posted April 2, 2009 Share Posted April 2, 2009 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. Link to comment Share on other sites More sharing options...
Valuater Posted April 2, 2009 Share Posted April 2, 2009 (edited) $axisx = Round($pgwd * 0.8)$axisy = Round($pght * 0.8)The 0.8 (*) times Page-width / Page-height is says 80% of 8.5 and80% of 11normal paper is 8.5 inches by 11 inchesjust change the 0.8 to 0.1 ( 10%) and see what happens8)EDIT, I have not used the UDF and do not know how to set it to Landscape. Edited April 2, 2009 by Valuater Link to comment Share on other sites More sharing options...
LurchMan Posted April 2, 2009 Author Share Posted April 2, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now