Send a simple text to a printer

philippegirod
Member Posts: 191
To print to a barecode printer, I need to send to it a simple text from Navision.
I tried the next :
1/ Suppress the margins, and have only one textbox in one section : the printer can't print
2/ create a text file and send it to the printer thrue SHELL command : my printer driver dosen't run in DOS mode..
Anyone have an idea ?
Thanks to all...
I tried the next :
1/ Suppress the margins, and have only one textbox in one section : the printer can't print
2/ create a text file and send it to the printer thrue SHELL command : my printer driver dosen't run in DOS mode..
Anyone have an idea ?
Thanks to all...
My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light
But oh my foes and oh my friends, it gives a lovely light
0
Comments
-
Have you a printer-driver for that printer?
You can also use the generic printer-driver and print the text.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Yes, I have an XP driver for that printer.
When i print the text from notepad => OK
From wordpad => the printer can't print
from Navision => the printer can't print
From a DOS COmmand => the printer can't printMy candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
Have tried
SHELL('copy simple.txt LPT1:');
? The " : " is important.
This is how I use a Zebra printer.
Do It Yourself is they key. Standard code might work - your code surely works.0 -
The DOS command should always work, I think if it does not work is a different kind of problem, because it is very low level. Check whether you have an LPT1 installed in Windows printers. What I usually experienced is that you Zebras are sensitive to turn in order - I mean turn on the PC first and the Zebra later.
Do It Yourself is they key. Standard code might work - your code surely works.0 -
If you have problems with sending raw data to your printer, you can use this:
http://www.mibuso.com/dlinfo.asp?FileID=341
:-)
But as Shenpen wrote, it seems that you have another problem... but I do not know which printer you are using...0 -
Do you send printer commands to the printer?
Because sometimes it causes error to the printer. Printer will not print even when you send commands through the DOS like "ECHO Hello World > LPT1". If you are sending commands to printer then you must test every commands that you pass to it, test the commands if it is executed properly to the printer.No future at CPI0 -
Hi all
We have a problem printing from Navision through a network printer (Zebra 2844 EPL) ](*,) :-k
Does anyone know how to write a command that will copy a .txt-file to this network-printer ?????
TY
/Skyggeman0 -
-
Hi
We can not print using the following command: ](*,)
shell('command.com' , '/c' , 'copy c:\filename.txt \\server\printername');
Can you help =D>:?:
/Skyggeman0 -
Does it give an error?
If not, maybe you should try to send a FF-char (=FormFeed=ASCII 12) to the printer.
You might also try to use the PRINT command.
You might try to connect the printer to LPT1 and use copy [file] Lpt1:Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
This is tested and working:
devnull:=SHELL('c:\winnt\system32\cmd.exe', '/C copy '+CompanyInfo."Barcode Export Dir" +'\labels.txt ' + 'LPT1');
I am storing the return value in a variable to make it run modally (i.e. to make the Navision code wait until finished). Maybe this is your problem. Make sure all SHELL calls are modal this way.0 -
I am not sure a network printer \\server\printer can be printed to directly with a DOS copy the same way as LPT1.
Besides, isn't there a proper software for Zebra which can import exported data?0 -
We used the next method to send data to a barcode printer wich can read only text files :
1/ we build the text file from navision
2/ we write a batch file
3/ we execute this batch file within Navision
the text in the batch file is something like :
echo PRINT \\disk\directory$\filetext.txt\\printerserver\printername
I know, there is obviously an easier method... this is only a way to do..My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
Rather COPY than PRINT I think.
Besides, exactly the same way of thinking than mineAnd of course, your batch file is also self-deleting, like mine, hm?
0 -
Yes, copy is better....
And we delete all file after the job.My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
Dear All,
I Place a button control in the Item card form. I want to send the Item
number directly to the BarCode printer and take the print out.Its a Network
Printer and port is LPT1.Priner is ZDesigner TLP 2844.
What we do for this.Pls help me....
regards,
Jayasankar0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions