Recently Browsing 0 members
No registered users viewing this page.
The _WinAPI_TextOut() function requires a x/y point. In a rectangle enclosing a text character, where is the x/y point, upper left or lower left? I'm trying to setup a function to print a header, then normal text lines, and I want the header to be at the top of the printable area on a page.. I use _WinAPI_GetDeviceCaps() to get the start of the printable area. Then at the start of each page, I want to print a header, then text lines.
$iLeftMargin_X = _WinAPI_GetDeviceCaps($hDC, $PHYSICALOFFSETX) ; returns 151 $iTopMargin_Y = _WinAPI_GetDeviceCaps($hDC, $PHYSICALOFFSETY) ; returns 70 ; print the header: $x = $iLeftMargin_X $y = $iTopMargin_Y WinAPI_TextOut($hDC, $x , $y, "header text") ; print the first text line $y += 22 WinAPI_TextOut($hDC, $x , $y, "The first text line") Will the header text be at the physical top of the printable area or will it be 1 text line lower. It all depends on whether $iTopMargin_Y refers to the top of the text or the bottom of the text.
by eltorro Posted April 26, 2010
Most print preview solutions use the MFC Doc/View architecture which limits it usefulness outside of c++. I found an article where a Delphi programmer used Enhanced Meta Files wrapped in a custom header and packaged together to create a print preview control. After a little more searching, It looks like using EMFs is a solution that would work.
Some people suggest to create the document in Word or HTML and use Word or a browser to view it. Indeed, I have rendered documents to HTML and used the IE UDF to display the contents and/or print them. Not quite as ideal as one would like.
Using GRS's printwin.au3 as a start, I came up with a print preview solution which others may be able to expand upon
Hello everybody, I have a problem here ... I need to generate a form of sale and print quality using the form I could do is not getting good, I created a window without borders with the fields I need, then use the function _ScreenCapture_CaptureWnd () to generate a print of this window and send the image to the printer using the UDF printMGv2.au3, the problem is that to get a good quality I would have to create a huge window to get the print, any suggestions to print this form with a good quality?
example of the form it takes:
I'm using the print udf and i wonder if it is possible to print a long line of text using line wrapping (that is the correct word I think)
e.g. í'm having a $text wich contains 500 characters or more including points, commas and so on, but no carrige return or linefeed characters.
What can I Use to print this line of text on a A4 printer and be sure the text is broken by the space and not in the middel of a word.
perhaps it's been asked before, but I cann't find it in the topics.