Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Printing to a Zebra label printer

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

    #16
    Re: Printing to a Zebra label printer

    Darren,

    I also noticed that there seems to be a comma missing after the "A" according to your specs in one of your previous posts. Not that it would have any affect on how the label behaves but it might affect the actual printing.
    The EPL2 programming guide states that the syntax of the "A"scii command is:
    A,P1,P2,P3,P4,P5,P6,P7,"DATA" (The "N" command just clears the buffer ready for printing)
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

    Comment


      #17
      Re: Printing to a Zebra label printer

      Hi Tim,

      Thanks for your input...I really need to get this issue sorted.

      However, I beg to differ with your statement - The EPL2 (Programmeing for Page Mode Printing) guide that I'm reading states the syntax is:

      AP1,P2,P3,P4,P5,P6,P7,"Data"

      ...and this syntax works quite happily when sending it manually to the printer using the DOS COPY command - example as follows (each line is terminated with a chr(10) character):


      N
      A230,5,0,3,2,2,N,"<Company>"
      A230,45,0,3,1,1,N,"<Manufacturer>"
      A480,45,0,3,1,1,N,"9999.99"
      A230,65,0,3,1,1,N,"<Prod Desc>"
      B245,90,0,E30,3,5,70,B,"123456789012"
      A250,185,0,3,1,1,R,"www.webaddress.co.uk"
      P1
      Regards,
      Darren Farmer
      ________________________
      Alpha5V8 Enterprise
      Windows XP Professional
      AMD Turion 64 x2/Athlon 64

      Comment


        #18
        Re: Printing to a Zebra label printer

        Originally posted by daz_racing View Post
        Hi Tim,

        Thanks for your input...I really need to get this issue sorted.

        However, I beg to differ with your statement - The EPL2 (Programmeing for Page Mode Printing) guide that I'm reading states the syntax is:

        AP1,P2,P3,P4,P5,P6,P7,"Data"
        I figured you probably knew what you were doing there. The bit that I quoted re the code sequence was from what you posted in post number 3 of this thread which has an extra comma after the A.


        ...and this syntax works quite happily when sending it manually to the printer using the DOS COPY command - example as follows (each line is terminated with a chr(10) character):


        N
        A230,5,0,3,2,2,N,"<Company>"
        A230,45,0,3,1,1,N,"<Manufacturer>"
        A480,45,0,3,1,1,N,"9999.99"
        A230,65,0,3,1,1,N,"<Prod Desc>"
        B245,90,0,E30,3,5,70,B,"123456789012"
        A250,185,0,3,1,1,R,"www.webaddress.co.uk"
        P1
        Have you tried using the sys_print() function from alpha to send your test_label.txt to the printer. If so what was the result.

        How or what method are you using to insert the chr(10) into this sample label code? If I just use chr(10) by itself I get everything on one line with a thick vertical bar in the place of the chr(10)s. I need to add a chr(13) to get it to show as your sample in notepad. The crlf() function I used in my previous post is short for chr(13)+chr(10).

        Unfortunately I do not have this type of printer to test on and am only going on memory(the failing type) from years ago of sending code directly to printers.
        Tim Kiebert
        Eagle Creek Citrus
        A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

        Comment


          #19
          Re: Printing to a Zebra label printer

          Hi Darren,

          I print all the time to 3 Zebra Z4Mplus with windows drivers. They replaced 3 Eltron 2046(now Zebra). I also printed to the Eltron's with window drivers.

          Can you use regular windows drivers for your application, or is programming the only way?

          I use the Alpha reports generator to print various labels to the Zebra's.

          I noticed that the Zebra site has windows drivers for this unit, if I am correct?

          Regards

          Ed

          Comment


            #20
            Re: Printing to a Zebra label printer

            Hi Tim,

            Ah, I see what you mean... I corrected my own mistake (without knowing it) :o

            Yes, I've tried sys_print()... Once I'd got the Zebra printer, I thought all this would be simplicity in itself... but oh noooo!

            So far, I've defined the label in Label Design, I've defined the calc field and placed it on the label. Then I defined a form and placed a button on the Form. In the ONPUSH event, I've defined a Save Layout as a File action using Action Scripting. The file is saved, but it is saved without the chr(10) in there! :(

            In the same event I then added a bit of inline xbasic:

            filename = "c:\<foldername>\test_label.txt"
            sys_print(filename)

            ...and the output is as I have described:

            NA230,5,0,1,1,1,N,"A Good Product"P1

            with 13 spaces before the "N".

            I'm bemused as it's only the chr(10)'s that are stripped out and not the chr(34)'s, so it's something that's happening between the physical production of the label and the actual saving of the label output.

            Any pointers in how to keep the chr(10) in the saved version of the the output as a text file would be most appreciated... as that's all I'm missing (at the moment) - I'm sure there'll be other "opportunities" to be faced down the road ;)

            Thanks - as always...
            Regards,
            Darren Farmer
            ________________________
            Alpha5V8 Enterprise
            Windows XP Professional
            AMD Turion 64 x2/Athlon 64

            Comment


              #21
              Re: Printing to a Zebra label printer

              Hi Ed,

              I've installed the windows drivers that came with the printer. One installation installs both the USB and parallel windows drivers. I've even been in touch with Zebra and they say the drivers are both XP and Vista compatible.

              I've not tried using the Report Design - I'm using Label Design.

              Do you have any examples I could take a look at to clarify my understanding of what is required?

              One other thought...do you use EPL2 to produce your labels or just send directly?

              Thanks...
              Regards,
              Darren Farmer
              ________________________
              Alpha5V8 Enterprise
              Windows XP Professional
              AMD Turion 64 x2/Athlon 64

              Comment


                #22
                Re: Printing to a Zebra label printer

                Hi Darren,

                I was deathly afraid of the old Eltrons. As I thought that I had to use programming language to use them.

                Well they have/had windows drivers. And all was well.

                I do not use labels.

                I only use reports on the printers.

                This is what I have done. Hopefully it will help you out.

                I use the windows drivers for the Zebra printers. In my case I just installed them, and use them like any print driver.
                The physical label size that I use is 4" x 6".
                I use the Alpha Report generator.
                Play with the bottom/top, right and left, margins, they are a little touchy with the Zebra that we have.

                In my case, it turned out to be no harder than making a regular report in Alpha.

                Hopefully it will help for your situation also.

                Regards

                Ed

                Comment


                  #23
                  Re: Printing to a Zebra label printer

                  Hi Ed,

                  Thanks for your reply.

                  I'm not sure how you retain the chr(10)'s in your raw test files to control the Zebra (Eltron) as printing via A5 (sys_print) strips the control chars out resulting in just a string of characters being printed.

                  I'm getting to the end of this with a reasonable (acceptable) solution. I'm using FILE_CREATE() .write(), .flush(), .close() etc... to create the text file by inserting the CHR(10)'s where required and it's retaining the CHR(10)'s.

                  I'm now getting the (what seems to be) "standard" issues with a SYS_SHELL() "virgin" trying to get SYS_SHELL to issue a "COPY file.txt lpt1" command. Get the "Out of memory" error - which I believe means it can't find the file - nothing like a meaningful error message is there!? ;-)

                  At least I now know the .txt file produced by A5 is correct - if I issue the "copy <file> lpt1" command manually in a DOS session it sends the demo txt file to the printer and prints "A Good Product" (as per my previous example) onto the label - result! :-)

                  When I get this solution working, I'll post it all here. A mate of mine also wrote me a "C" program to scan the contents of a text file to prove which CHR()'s are present (I'll post that as well - it may be of some use to some unsuspecting sole) - Thanks for that Dave! :-)
                  Regards,
                  Darren Farmer
                  ________________________
                  Alpha5V8 Enterprise
                  Windows XP Professional
                  AMD Turion 64 x2/Athlon 64

                  Comment


                    #24
                    Re: Printing to a Zebra label printer

                    Hi Darren,

                    Would this be of any help?

                    http://www.perlmonks.org/?node=binmode

                    Ed

                    Comment


                      #25
                      Re: Printing to a Zebra label printer

                      Originally posted by daz_racing View Post
                      I'm now getting the (what seems to be) "standard" issues with a SYS_SHELL() "virgin" trying to get SYS_SHELL to issue a "COPY file.txt lpt1" command. Get the "Out of memory" error - which I believe means it can't find the file - nothing like a meaningful error message is there!? ;-)
                      Try

                      sys_shell("cmd /c copy c:\file.txt lpt1")

                      substituting the real path to file.txt for c:\
                      There can be only one.

                      Comment


                        #26
                        Re: Printing to a Zebra label printer

                        Hi,

                        Thanks to everyone who has been involved in this thread - your help and support is much appreciated. We've done it! :)

                        Here's how:

                        1) Drop a button on a form

                        2) In the OnPush, here's my code:

                        dim textfile as C
                        dim text as C
                        dim pointer as P
                        textfile = "c:\<folder>\barcode_label.txt"
                        pointer = FILE.CREATE(textfile,FILE_RW_SHARED)
                        text = chr(10) + "N" + chr(10) + "A230,5,0,3,2,2,N," + chr(34) + "Company Name" + chr(34) + chr(10)
                        pointer.write_line(text)
                        text = "A230,45,0,3,1,1,N," + chr(34) + "<Manufacturer>" + chr(34) + chr(10)
                        pointer.write_line(text)
                        text = "A480,45,0,3,1,1,N," + chr(34) + "<Price>" + chr(34) + chr(10)
                        pointer.write_line(text)
                        text = "A230,65,0,3,1,1,N," + chr(34) + "<Product Title/Desc.>" + chr(34) + chr(10)
                        pointer.write_line(text)
                        text = "B245,90,0,E30,3,5,70,B," + chr(34) + "123456789012" + chr(34) + chr(10)
                        pointer.write_line(text)
                        text = "A250,185,0,3,1,1,R," + chr(34) + "<www.webaddress.co.uk>" + chr(34) + chr(10) + "P1"
                        pointer.write_line(text)
                        pointer.flush()
                        pointer.close()
                        ' Print the label using DOS BAT file containing COPY command
                        sys_shell("c:\<folder>\print_barcode.bat")

                        3) Create a BAT file called "print_barcode.bat" and it should contain 1 line only... "copy c:\<folder>\barcode_label.txt lpt1:" and place it in c:\<folder>

                        4) Start the Form and press the button - et voila - 1 printed label!

                        Hope this helps anyone needing this kind of solution...

                        Oh, forgot to mention... I've tested this on XP and Vista. There are XP and Vista Zebra LP2844 drivers now available.
                        Regards,
                        Darren Farmer
                        ________________________
                        Alpha5V8 Enterprise
                        Windows XP Professional
                        AMD Turion 64 x2/Athlon 64

                        Comment


                          #27
                          Re: Printing to a Zebra label printer

                          I dont know if you have sorted this out;
                          create a label layout and then set your label size and select continues label.
                          From your program set a global variable and drop this on the label layout. see attached screen shot includes a function to populate an address which i call from a push button to print individual labels and i also offer on the fly edits for the address label to be printed for any user. but if you want to print directly from a table etc. just create label layout and drop all the fields you want. hope it helps

                          Comment


                            #28
                            Re: Printing to a Zebra label printer

                            Hi,

                            Many thanks for taking the time to reply to this thread...

                            Yes, I sorted out my problem. It was impotatnt for me to use the Zebra's EPL2 programming language...hence my solution (above).

                            Once I'd sorted out my CHR(10) problem by writing directly to a text file, the rest was plain sailing ;)

                            Using the printer's EPL language makes it easy as pie to produce a label with text, barcodes (it even calculates the check digit automatically for EAN/UPC barcodes!) and even produces multiple copies of a lable with a single button press

                            In the end, I decided to use CODE128 for my barcodes as it can quite happily encode characters as well as numbers.

                            Your solution uses the label designer which I think was causing my text file problems.

                            Once again, thanks for this and I may need this solution in the future - you never know.
                            Regards,
                            Darren Farmer
                            ________________________
                            Alpha5V8 Enterprise
                            Windows XP Professional
                            AMD Turion 64 x2/Athlon 64

                            Comment


                              #29
                              Re: Printing to a Zebra label printer

                              How to get a label preview of EPL code ?

                              Comment

                              Working...
                              X