No announcement yet.

Printer paper guides

  • Filter
  • Time
  • Show
Clear All
new posts

  • Printer paper guides

    Noticed that most of the new printers in the stores now
    have paper guides that move toward the middle?
    All my programs have many printing routines that are
    based on the paper guide moving to the right. Probably
    too much work to rewrite each one. I don't know of a
    way to detect which kind of paper guide printer has, guess
    just have to ask user from a message box?

  • #2
    With Laser & inkjet printers, this should have very little bearing, as long as you know the size of the paper stock. XPRINT (or DDOC, for that matter) simply goes by coordinates relative to the edge of the paper.

    For dot-matrix printers where your sending pure ASCII text, I can see where this would be a problem
    Real programmers use a magnetized needle and a steady hand


    • #3
      The problem is if user wants to print, say 5.5" x 8.5" and they have paper guides that move in to the middle.
      My print program figures the col and row positions on a standard paper size of 8 .5" x 11". If user printed it on a standard paper size, it would appear in the bottom left corner of paper. Part of it would not print at all. I would have to know that they have paper guides that move to the middle, then I would direct printing to a different routine that would figure positions something like: 8.5 - 5.5 = 3, divide by 2 = 1.5". This(1.5") would be left margin
      positon instead of 11/16"(if rgt to lft paper guide).
      Has anyone run in to problem with middle paper guides?


      • #4
        Here's how I handle the alignment for printing envelopes in one of my programs:

        A print offset value is adjusted depending on the alignment the user selects. No complaints or problems from users thus far.
        <strong>Billing clients for your freelance work?</strong> Try <a href="">Minute-2-Minute</a>, the project management, timing, and billing system. Perfect for programmers who charge by the hour. FREE 45-day trial.


        • #5
          I've got an Epson Color 740 inkjet & an HP LJ 1018. The way I handle
          things like envelopes & checks is to define a new form to the right size
          and set it to portrait or landscape ( whichever works ). Then printing
          goes along normally. the Epson has a guide that moves to the right & the
          HP has a guide that goes to the middle. Same program works fine on
          either printer.


          • #6

            Nice looking program. Would you mind showing offset code?


            Not sure using XPRINT how printer with guides going into middle can print in same area as guides that move right?

            Here is some of my code, but only for guide moving to right.
            I don't have a printer with paper guides moving toward middle, just guides that move to the
            right. Here is code I use to print on paper 5 1/2" x 8 1/2"
            ' Portrait Only!!! - Load 5 1/2" side first, Hole side Right 'for Front, Left fro Back.
            ' PRINTS 2 RECORDS PER PAGE ON MULTI NUMBER OF 'PAGES - coded for sheet 5 1/2 x 8
            ' Prints index for up to 8 pages(16 records front, 16 'records back)
            XPRINT GET MARGIN TO x1, y1, x2, y2 ' Get 'printer 'margins(lft,top,rgt,bot)
            ' Canon(Portrait)- x1=.251, y1=.116, x2=.248, y2=.198
            ' Canon(Landscape)- x1=.116, y1=.248, x2=.198, y2=.253
            XPRINT GET CLIENT TO CliWidth!, liHeight!
            'Printable 'Area(no margin included)
            XPRINT GET PPI TO ppiX, ppiY ' Get resolution in
            ' Must minus left margin(x1) so printing is same on all
            'printers, 12-6-2008
            y1 = ppiY ' One inch from top edge
            '(pixels per inch)
            XL1 = (.6875*ppiX)-X1 ' 11/16 of one inch
            'from left edge
            XL2 = XL1+(.875*ppiX) ' Column 2, 1 9/16
            'from left edge
            x = XL1 ' Column pos for Index
            'on Back 'Title
            xt = (ppiX * 4.75)-x1 ' Column pos for
            'Index letter. ex: "A-B"

            XPRINT SET POS (XL1, y1 + (c * y2))
            SELECT CASE AS LONG y
            CASE 0 : XPRINT "Rec No:" : INCR c




            • #7

              The way I do it is to define a new paper size at the printer ( or within
              the printer driver ) and use it. Not try to figure out offsets to get to
              the correct position within an 8 1/2 by 11 sheet of paper. True, my way
              does mean that you need to select the correct paper size first but
              the programming is simpler than the other way.

              If you're going to try to print everthing based on a standard sheet of
              paper then Frank's solution looks like a good way to go. If you want to
              print multiple pages per sheet then it's up to you to figure out the
              correct XPrint Loc for each line depending on which page you're


              • #8

                The code was developed through trial-and-error (I have three different printers, each with a different paper path alignment scheme). The code for printing envelopes sets the x-value for printing on the page based on the offset type selected by the user:

                SELECT CASE AS LONG guXP.EnvFeed
                   CASE %ALIGN_LEFT
                      rx& = 188
                      sx& = 12 
                      bx& = 156
                   CASE %ALIGN_CENTER
                      rx& = 400
                      sx& = 200
                      bx& = 375
                   CASE %ALIGN_RIGHT
                      rx& = 612
                      sx& = 412
                      bx& = 594
                END SELECT
                These are printer units and -- again -- were decided upon by trying different values until we obtained the desired results. (The rx& value is for the recipient's address, sx& the sender's address, and bx& for a bar code sequence that helps us handle returned mail.)

                Hope this helps.
                <strong>Billing clients for your freelance work?</strong> Try <a href="">Minute-2-Minute</a>, the project management, timing, and billing system. Perfect for programmers who charge by the hour. FREE 45-day trial.


                • #9

                  You have been a big help! Thanks!
                  I have my new dialog built now with radio buttons and now
                  I'll have to go through all my print routines and add 1 1/2"
                  if printer guides are aligned to the center.