Announcement

Collapse
No announcement yet.

need help with xprint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • need help with xprint

    I am finally ready to explore the xprint functions, because I found out buying printing software did not offer full support, especailly with vista.

    I have looked at forums for printing but some are too complex, I know I can do xprinting using less code and with help from fellow members help.

    In the forum I have never been to successful finding many help articles, they are scatered around and dificult. Hopefully I will post a step by step on how to use Xprint functions with the help of forum members, for everyone who are also starting to use xprint functions.

    I have included the test program I have started in exploring xprint. I want to print a full page of text with 80 character acrosss, a full page of text with 135 characters across (condensed). And later figure out bitmap printing and print preview.

    1. problem one is that the sample text gets chopped off at 65 characters for the 80 & 135 character across and the first character does not print (printing
    starts at extreme left).

    also noted that printing uses about 1/4 of the page, when I want the full width across with margins all around.

    Code:
    #COMPILE EXE
    #DIM ALL
    'PRINT TEST 1
    
    '1 setup printer to use print device, in program to use as default
    '2 determine to print 80 character across page or 135 characters in program
    
    GLOBAL hDlg AS LONG
    
    CALLBACK FUNCTION ENDPROG()
     DIALOG END hDlg, 1
     DIALOG END CBHNDL, 15
    END FUNCTION
    
    
    CALLBACK FUNCTION PRINT1
    LOCAL linecount, w, h, w2, h2, x, y AS LONG, device,L1, L2, L3 AS STRING, nLEFT, nTop, nRight, nBottom AS SINGLE
    
    L1="This is your printer talking"
    L2="12345678901234567890123456789012345678901234567890123456789012345678901234567890"
    L3="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
    
    ERRCLEAR
    'XPRINT ATTACH "KODAK 5100 AiO"
    XPRINT ATTACH DEFAULT
    'XPRINT ATTACH choose
    IF ERR = 0 AND LEN(XPRINT$) > 0 THEN
    
    'device=XPRINT$
    'XPRINT GET LINES TO linecount&
    'XPRINT GET MARGIN TO nLeft, nTop, nRight, nBottom
    
    'MSGBOX device+"<device  "+STR$(linecount)+"<linecount":
    'MSGBOX STR$(nLEFT)+"<left  "+ STR$(nTop)+"<top  "+ STR$(nRight)+"<right  "+ STR$(nBottom)+"<bottom"
    
    'GOTO EXITT
    XPRINT GET CLIENT TO w, h  ' get client size
    XPRINT TEXT SIZE L1 TO w2, h2      ' get text size
      x = (w-w2) / 2                        ' centered x-pos
      y = (h-h2) / 2                        ' centered y-pos
    MSGBOX STR$(w)+"  "+STR$(h)+"  "+STR$(w2)+"  "+STR$(h2)
      XPRINT ""
    XPRINT SET POS (x, y)
      XPRINT L1
    
      XPRINT L2
    
      XPRINT L3
      XPRINT FORMFEED           ' Issue a formfeed
    EXITT:
      XPRINT CLOSE              ' Deselect the printer
    END IF
    
    END FUNCTION
    
    FUNCTION PBMAIN () AS LONG
    LOCAL result AS LONG ': DIM SET1 AS SETUP1
    
    DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, %WS_MINIMIZEBOX+%WS_SYSMENU, 0 TO hDlg
    CONTROL ADD LABEL, hDlg,200,"EASY Est",175, 55,100, 14, 0
    CONTROL ADD BUTTON,hDlg,100,"&PRINT" ,155, 75, 90, 14, CALL PRINT1
    CONTROL ADD BUTTON,hDlg,101,"&End Program"      ,155,200, 90, 14, CALL ENDPROG
    CONTROL SET FOCUS hDlg, 101
    DIALOG SHOW MODAL hDlg TO result
    END FUNCTION
    Robert

  • #2
    For what it is worth.
    I tried it, and it printed as per the following description.

    The top of the first line about one cm below the middle of the page(top margin, I presume)
    The second line 80 characters with a left margin approximately two characters wide. The line ended close to two thirds across the page.
    The third line, with the same left margin as the second line, printed 120 characters, leaving a right margin double the width of the left.
    The remaining 15 characters did not print.

    My first guess since this is different from what you report is that it all has to do with the default font size.
    If so, I suspect that you're going to have to do something with the FONT NEW and XPRINT SET FONT to make the output appear the way you wish it to.
    Last edited by Rodney Hicks; 7 Dec 2008, 11:29 PM. Reason: add clarity
    Rod
    In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

    Comment


    • #3
      You say that your result was it printing from the middle of the page? My result was printing on the very top of the page. I have a vista sys and use a Kodak 5100 printer. It is strange that results did not appear the same just because of different fonts.

      What is you Op sys and printer that you are using?

      I will check out FONT NEW and XPRINT SET FONT and see what I can figure out. Looks like the first step in using xprint is to identify the font that the printer uses or that the program call for??

      My understanding is that there are two types of fonts, windows ttf fonts and non windows ttf fonts. How would a program determie that?
      Robert

      Comment


      • #4
        I'm using Vista Home Premium, my printer is an HP 3-in-1.

        With the code you provided, the default printer should have at least printed in the centre of the page. Is your printer set as the default on your operating system? (Control Panel-Printers, right click on your printer then click Open, then from the menu select Printer, and then select 'Set as Default')

        I'm not sure where the Font for the printer is set, other than in the document I'm printing. I have never used the XPRINT feature in anything I wrote, so I'm not too familiar with what all happens when using it.

        From your code though, other than the font size almost everything seemed normal in the printout. I might have thought that the missing 15 characters should have been printed on the next line, but I won't state for certain, since this was being hard coded to the printer.

        Those are two of the types of fonts, but I wouldn't know if they are the only two. (There may also be sub-types)
        Rod
        In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

        Comment


        • #5
          Robert, here's a thread on Xprint you will probably find helpful to get started. It also has a host of Macros that tell you how many characters per line certain font/sizes will make.

          http://www.powerbasic.com/support/pb...ghlight=xprint

          =========================================
          A vacant mind invites dangerous inmates.
          (Nicholas Hilliard)
          =========================================
          It's a pretty day. I hope you enjoy it.

          Gösta

          JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
          LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

          Comment


          • #6
            Robert, from my experience, if you are looking for fixed font of 80 and 132 characters,
            XPRINT FONT "Courier New",12,0
            should give you about 10CPI or 80 characters normally.

            XPRINT FONT "Courier New",8,0
            should give you about 16-17 CPI or about 132 characters.

            Other fonts you might try or MS Linedraw and Generic DOS both TTF fonts
            with fixed spacing.

            As Far as where it's printing, the scale feature works nicely. There are several
            examples of this in the forums.
            Last edited by Fred Buffington; 8 Dec 2008, 11:28 PM.
            Client Writeup for the CPA

            buffs.proboards2.com

            Links Page

            Comment


            • #7
              Not on topic but important:

              Code:
              DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, [COLOR="Red"][b]%WS_MINIMIZEBOX+%WS_SYSMENU [/b][/COLOR]...
              Window styles should be combined with the bitwise OR, not the addition operator...
              Code:
              DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, [COLOR="Red"][b]%WS_MINIMIZEBOX OR %WS_SYSMENU [/b][/COLOR]...
              In many cases it will not matter, but in some it will and you will be scratching your head trying to figure out why your window styles are "not working."
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                MM thank for the info.

                FB , yes in my programs I typical print 80 or 132 char. but I want to use xprinting so that it can handle the unkown, if you give your program to someone you do not know what the have setup for printing.

                GHL I will study and checkout you code. I do not use macros in my programs.

                Well I have updated my test program where I think I have enough information to tell xprint to print how I want, but I am stuck at not knowing how to use that info tell my printer to print across the width of 8-1/2 sheet.

                The results now are: L1 is not center anymore. L2 and L3 still prints only 62 characters instead of 80 and 135. And now printing starts down abount a third of the page. Before it started at the top left corner.

                The update test program is below.
                Thank all for your response.

                Code:
                #COMPILE EXE
                #DIM ALL
                'PRINT TEST 1
                
                '1 setup printer to use print device, in program to use as default
                '2 determine to print 80 character across page or 135 characters in program
                
                GLOBAL hDlg AS LONG
                
                CALLBACK FUNCTION ENDPROG()
                 DIALOG END hDlg, 1
                 DIALOG END CBHNDL, 15
                END FUNCTION
                
                
                CALLBACK FUNCTION PRINT1
                LOCAL linecount, cLw, cLh, w2, h2, x, y, ppix, ppiy AS LONG, device,L1, L2, L3 AS STRING
                LOCAL nLEFT, nTop, nRight, nBottom, csWidth, csHeight, x1, y1, x2, y2  AS SINGLE
                
                L1="This is your printer talking"
                L2="12345678901234567890123456789012345678901234567890123456789012345678901234567890"
                L3="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
                
                ERRCLEAR
                'XPRINT ATTACH "KODAK 5100 AiO"
                XPRINT ATTACH DEFAULT
                'XPRINT ATTACH choose
                IF ERR = 0 AND LEN(XPRINT$) > 0 THEN
                
                XPRINT CHR SIZE TO csWidth, csHeight                                  '# step one
                'MSGBOX str$(ncWidth)+"<width  "+STR$(ncHeight)+"<height" 'w=40 h=71
                
                XPRINT GET CLIENT TO cLw, cLh  ' get client size, printable area      '# step two
                'MSGBOX STR$(cLw)+"width  "+STR$(cLh)+"height"     'w=2476  h=3648
                
                XPRINT GET PPI TO ppix, ppiy    'printer resolution                   '# step three
                'MSGBOX STR$(ppix)+"ppix  "+STR$(ppiy)+"ppiy"      '600x600
                
                XPRINT GET SCALE TO x1, y1, x2, y2     'coord for host printer
                'MSGBOX STR$(x1)+"x1  "+ STR$(y1)+"y1  "+ STR$(x2)+"x2  "+ STR$(y2)+"y2"   'x=0 y=1 x2=2476 y2=3648
                
                XPRINT GET LINES TO linecount
                'msgbox str$(linecount)   '51 lines
                
                XPRINT GET MARGIN TO nLeft, nTop, nRight, nBottom     'got 0,0,0,0  is correct ????
                'MSGBOX STR$(nLEFT)+"<left  "+ STR$(nTop)+"<top  "+ STR$(nRight)+"<right  "+ STR$(nBottom)+"<bottom"
                
                'so 2476/300=8.24333  3648/300=12.16?? (page is 11")
                'but printer is printing at 600dpi which is why print out uses only 1/4 (4.5"x5.75") of page ??
                'how do you tell program to print across 8.5" width???
                
                'device=XPRINT$
                'XPRINT GET MARGIN TO nLeft, nTop, nRight, nBottom
                
                'MSGBOX device+"<device  "+STR$(linecount)+"<linecount":
                
                'GOTO EXITT
                XPRINT TEXT SIZE L1 TO w2, h2      'cal text size to print to printer
                  x = (cLw-w2) / 2                        ' centered x-pos
                  y = (cLh-h2) / 2                        ' centered y-pos
                XPRINT SET POS (x, y)
                XPRINT ""
                XPRINT L1                           'this line print text center across width of paper
                
                XPRINT TEXT SIZE L2 TO cLw, cLh      'cal text size to print to printer    << here where i am lost
                XPRINT L2                                                                 '<< do not know what to put
                
                XPRINT TEXT SIZE L3 TO cLw, cLh      'cal text size to print to printer
                XPRINT L3
                
                XPRINT FORMFEED           ' Issue a formfeed
                EXITT:
                XPRINT CLOSE              ' Deselect the printer
                END IF
                
                END FUNCTION
                
                FUNCTION PBMAIN () AS LONG
                LOCAL result AS LONG ': DIM SET1 AS SETUP1
                
                DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, %WS_MINIMIZEBOX+%WS_SYSMENU, 0 TO hDlg
                CONTROL ADD LABEL, hDlg,200,"EASY Est",175, 55,100, 14, 0
                CONTROL ADD BUTTON,hDlg,100,"&PRINT" ,155, 75, 90, 14, CALL PRINT1
                CONTROL ADD BUTTON,hDlg,101,"&End Program"      ,155,200, 90, 14, CALL ENDPROG
                CONTROL SET FOCUS hDlg, 101
                DIALOG SHOW MODAL hDlg TO result
                END FUNCTION
                Robert

                Comment


                • #9
                  Robert, actually it's pretty easy for the dimensions.

                  Code:
                     XPRINT ATTACH PrtNam$ 'attach the selected printer neme
                     XPRINT GET CLIENT TO xWidth!,xHeight! 'get the printable width and height
                     XPRINT GET MARGIN TO xLeft!, xTop!, xRight!, xBottom! 'margins
                     XPRINT GET PPI TO x&,y& 'pixels per inch
                     XPRINT CANCEL 'cancel so printer wont try to print just now
                  All the things above are in pixels unless you have already set a scale and then
                  they are in your 'world' coordinates.
                  Last edited by Fred Buffington; 10 Dec 2008, 10:53 PM.
                  Client Writeup for the CPA

                  buffs.proboards2.com

                  Links Page

                  Comment


                  • #10
                    Fred

                    Tried suggested code and still prints starting at upper top left with only 62 characters across for L2 and L3, should be 80 and 135 characters. Below is modified code.
                    Code:
                    #COMPILE EXE
                    #DIM ALL    'PRINT TEST 1
                    GLOBAL hDlg AS LONG
                    
                    CALLBACK FUNCTION ENDPROG()
                     DIALOG END hDlg, 1
                     DIALOG END CBHNDL, 15
                    END FUNCTION
                    
                    
                    CALLBACK FUNCTION PRINT1
                    LOCAL cLw, cLh, linecount,  w2, h2, x, y, ppix, ppiy AS LONG, device,L1, L2, L3 AS STRING
                    LOCAL nLEFT, nTop, nRight, nBottom, csWidth, csHeight, x1, y1, x2, y2  AS SINGLE
                    
                    L2="12345678901234567890123456789012345678901234567890123456789012345678901234567890"
                    L3="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
                    
                    ERRCLEAR
                    'XPRINT ATTACH "KODAK 5100 AiO"
                    XPRINT ATTACH DEFAULT
                    'XPRINT ATTACH choose
                    IF ERR = 0 AND LEN(XPRINT$) > 0 THEN
                                                 
                    XPRINT GET CLIENT TO cLw, cLh  ' get client size, printable area  w=2476  h=3648
                    XPRINT GET MARGIN TO nLeft, nTop, nRight, nBottom     'got 0,0,0,0  is correct ????
                    XPRINT GET PPI TO ppix, ppiy    'printer resolution    600x600
                    
                    XPRINT L2
                    XPRINT L3
                    
                    XPRINT FORMFEED           ' Issue a formfeed
                    XPRINT CLOSE              ' Deselect the printer
                    END IF
                    
                    END FUNCTION
                    
                    FUNCTION PBMAIN () AS LONG
                    LOCAL result AS LONG ': DIM SET1 AS SETUP1
                    
                    DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, %WS_MINIMIZEBOX+%WS_SYSMENU, 0 TO hDlg
                    CONTROL ADD LABEL, hDlg,200,"Test 1B",175, 55,100, 14, 0
                    CONTROL ADD BUTTON,hDlg,100,"&PRINT" ,155, 75, 90, 14, CALL PRINT1
                    CONTROL ADD BUTTON,hDlg,101,"&End Program"      ,155,200, 90, 14, CALL ENDPROG
                    CONTROL SET FOCUS hDlg, 101
                    DIALOG SHOW MODAL hDlg TO result
                    END FUNCTION
                    Robert

                    Comment


                    • #11
                      Running the above code I get a line of text 80 characters long at the top of the page that runs 2/3 the width of the page.
                      The second line is 120 characters long, runs to the edge of the page, less a 4 character margin width.

                      The nLeft, nTop, nRight, nBottom return are equal respectively to 40,20,40,39
                      The ppix and ppiy are equal respectively to 300,300.
                      I used a MSGBOX in this instance show the values.

                      Have you looked at the LPRINT series of functions and statements?
                      Rod
                      In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                      Comment


                      • #12
                        Robert, You don't set a font (or size) in your program so results will probably differ from computer/printer combinations. For example I get 138 chars across with about 1/4" margins (running the above code).

                        Note here's what I use to measure:
                        Code:
                        Line_Numbering$ = _
                           "12345678 112345678 212345678 312345678 412345678 52345678 612345678 712345678 812345678 92345678 12345678 22345678 32345678 42345678 52345678 "
                        (Just a little easier counting characters.)

                        To set margins, you will have to use Xprint Set Pos
                        Code:
                          XPRINT SET POS (x, y)                 ' set position
                          XPRINT sText                          ' draw the text

                        ===================================
                        "In the end, everything is a gag."
                        Charlie Chaplin (1889-1977)
                        ===================================
                        Last edited by Gösta H. Lovgren-2; 12 Dec 2008, 10:08 AM.
                        It's a pretty day. I hope you enjoy it.

                        Gösta

                        JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                        LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                        Comment


                        • #13
                          Robert, ive modified your code a little. Try this:
                          This incorporates the suggestions by Gosta
                          Code:
                          #COMPILE EXE
                          #DIM ALL    'PRINT TEST 1
                          #INCLUDE "win32api.inc"
                          GLOBAL hDlg AS LONG
                          GLOBAL ncWidth!,ncHeight!
                          CALLBACK FUNCTION ENDPROG()
                           DIALOG END hDlg, 1
                           DIALOG END CBHNDL, 15
                          END FUNCTION
                          
                          
                          CALLBACK FUNCTION PRINT1
                          LOCAL cLw, cLh, linecount,  w2, h2, x, y, ppix, ppiy AS LONG, device,L1, L2, L3 AS STRING
                          LOCAL nLEFT, nTop, nRight, nBottom, csWidth, csHeight, x1, y1, x2, y2  AS SINGLE
                          
                          L2="12345678901234567890123456789012345678901234567890123456789012345678901234567890"
                          L3="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
                          
                          ERRCLEAR
                          'XPRINT ATTACH "KODAK 5100 AiO"
                          XPRINT ATTACH DEFAULT
                          'XPRINT ATTACH choose
                          IF ERR = 0 AND LEN(XPRINT$) > 0 THEN
                          
                          XPRINT GET CLIENT TO cLw, cLh  ' get client size, printable area  w=2476  h=3648
                          XPRINT GET MARGIN TO nLeft, nTop, nRight, nBottom     'got 0,0,0,0  is correct ????
                          XPRINT GET PPI TO ppix, ppiy    'printer resolution    600x600
                          
                          'XPRINT GET CLIENT TO ncWidth!, ncHeight!
                          ' Retreive the resoltuion (points per inch) of the attached printer
                          'XPRINT GET PPI TO x&, y&
                          ' Width in inches of the printable area
                          '
                          ncWidth!  = cLW/ppix
                          ' Height in inches of the printable area
                          ncHeight! = cLH/ppiy
                          ' Set the scale to inches, for American letter-size paper
                          ' in portrait mode. This is the equivalent to 8.5x11 minus the margins.
                          XPRINT SCALE (0,0)-(ncWidth!,ncHeight!)
                          
                          
                          XPRINT SET POS (0,.25)
                          
                          XPRINT FONT "Courier New",12,0
                          XPRINT L2
                          XPRINT SET POS(0,.25+.167)
                          XPRINT FONT "Courier New",8,0
                          XPRINT L3
                          
                          XPRINT FORMFEED           ' Issue a formfeed
                          XPRINT CLOSE              ' Deselect the printer
                          END IF
                          
                          END FUNCTION
                          
                          FUNCTION PBMAIN () AS LONG
                          LOCAL result AS LONG ': DIM SET1 AS SETUP1
                          
                          DIALOG NEW 0, "PRINT TEST 1"  ,,,400, 270, %WS_MINIMIZEBOX+%WS_SYSMENU, 0 TO hDlg
                          CONTROL ADD LABEL, hDlg,200,"Test 1B",175, 55,100, 14, 0
                          CONTROL ADD BUTTON,hDlg,100,"&PRINT" ,155, 75, 90, 14, CALL PRINT1
                          CONTROL ADD BUTTON,hDlg,101,"&End Program"      ,155,200, 90, 14, CALL ENDPROG
                          CONTROL SET FOCUS hDlg, 101
                          DIALOG SHOW MODAL hDlg TO result
                          END FUNCTION
                          '__________________
                          Of course you can use your own coordinate system for printable area. I commonly use the H/V values from HP PCL (i.e. 720ths of an inch)
                          Last edited by Fred Buffington; 12 Dec 2008, 01:17 PM.
                          Client Writeup for the CPA

                          buffs.proboards2.com

                          Links Page

                          Comment


                          • #14
                            For what it is worth.

                            I ran Fred's rendition and got a 80 character line, full width of the page with appropriate margins for the first line.
                            The second line was only 120 characters wide, same width as the first line.

                            I changed the "8" in the following line to "6" and got a line of 135 characters that ended underneath the 7th 8 in the line above.
                            XPRINT FONT "Courier New",8,0
                            I then changed the "6" to "7" and got a line of 135 characters that ended underneath the 8th 7 in the first line.

                            From the FONT NEW documentation
                            points!
                            Size of the font, in points. This may be specified as a floating point value for fractional point sizes.
                            This is the preferred method of creating and specifying fonts in PowerBASIC. Using FONT NEW, you can create a group of fonts, in advance, and switch between them easily using CONTROL SET FONT, GRAPHIC SET FONT, and XPRINT SET FONT.
                            I point this out because I'm not sure what happens with a floating point value in the XPRINT FONT statement. I tried but did not get consistent results.
                            Rod
                            In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                            Comment


                            • #15
                              Interesting rodney. I get 134 characters on the second line with my HP 6150
                              Actually, 120 is what you would expect since 8 size point is 2/3 of 12 so if
                              12 gives 80 characters, logically 8 you would think gives 80 x 3/2 or 120.

                              Since I don't have version 9, I was wondering how a font with a floating point point size is made ?
                              All the APIs Ive seen use long integers for width and height.
                              Last edited by Fred Buffington; 12 Dec 2008, 03:53 PM.
                              Client Writeup for the CPA

                              buffs.proboards2.com

                              Links Page

                              Comment


                              • #16
                                I haven't tried that floating point XPRINT SET FONT myself, I was just encouraging its use because it looks a little more capable of manipulation.
                                I did try XPRINT FONT with numbers like 7.4, 7.2, 7.18, 7.17, and there was a difference in the size, but the last two, didn't seem to make any difference.

                                I get 134 characters on the second line with my HP 6150
                                Actually, 120 is what you would expect since 8 size point is 2/3 of 12 so if
                                12 gives 80 characters, logically 8 you would think gives 80 x 3/2 or 120.
                                This is why in an earlier post I suggested that the default printer may be making some adjustment to the settings, don't ask me how.
                                Rod
                                In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                                Comment


                                • #17
                                  I assume that using xprint font with a floating point (for the point size) will round it to a whole number.
                                  *added* Windows then probably further rounds it (if required) to the closest available pointsize.

                                  What I was interested in was the workaround for the new 'xprint font new'
                                  or perhaps it's the 'xprint set font'. I was going to try it with makerotatedfont
                                  which uses the createfont api but that only accepts long integers as well.
                                  Last edited by Fred Buffington; 12 Dec 2008, 07:47 PM.
                                  Client Writeup for the CPA

                                  buffs.proboards2.com

                                  Links Page

                                  Comment


                                  • #18
                                    XPRINT FONT doesn't seem to round it to a whole number because I got three different lengths for the four values I used 7.4, 7.2, 7.18, 7.17 and all lengths were between the 7 and 8 whole numbers.
                                    This was on an HP C3180.
                                    Rod
                                    In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                                    Comment


                                    • #19
                                      that is interesting, I seem to get the same size it seems for 7.6 7.8 8.0 8.2 8.4
                                      then at 8.6 8.8 9.0 etc font is the same but a little larger. these latter tests using Generic DOS font (ttf).

                                      It could be the OS and/or the printer too. I am testing this on ME even though I have a Vista available.
                                      Client Writeup for the CPA

                                      buffs.proboards2.com

                                      Links Page

                                      Comment


                                      • #20
                                        Well here are the results on code by Fred n Gosta in a bitmap I uploaded. Since my printer prints at 600dpi could that be the result of only printing about half page across only. How do you tell the printer using xprint that the printer prints at 600dpi? Would that fix problem? Does xprint get ppi not do that but it does not work?

                                        xprint get client is 2476width/600dpi=4.12" which is exactly what the length is across in what I print. 3648height/600dpi=6.08 which would be how many line down it would print, not the 8 1/2x 11.00 that I want. How to fix this ??

                                        XPRINT SCALE (0,0)-(ncWidth!*2,ncHeight!*2) I tried the *2 and the printout was the same only printing the two lines on top of each other.

                                        Now try x&, y& as global for PPI to see if any change. No change.

                                        XPRINT SET POS (0,.25) what is this line telling printer? to print down .25

                                        XPRINT SET POS(0,.25+.167) .25+.167+.417 where did .167 compute from? space between rows? Boy that many computations for using xprint.

                                        [STEP] how would this be used? in xprint set pos

                                        Rodney I did look at LPRINT first but xprint looked like it could do more and do what lprints does.

                                        Well hope someone can figure out cause of the 4.12" limit to printing across on my printer or some way around the problem.
                                        Attached Files
                                        Robert

                                        Comment

                                        Working...
                                        X