标签: thermal-printer

从网站上绕过热敏运输标签数据

我需要帮助尝试从网站获取热传输标签数据到本地Zebra打印机.数据本身只是纯文本,但由于某些原因,它从网站上假脱机似乎非常困难.有人对这个有经验么?我正在使用ColdFusion 8和Windows Server 2008.

coldfusion fedex thermal-printer zebra-printers

5
推荐指数
1
解决办法
949
查看次数

PHP打印到本地热敏打印机,没有网络名称就无法工作

我在PHP中构建了一个可以直接打印到热敏打印机的POS(销售点)应用程序.在大多数情况下,我使用WAMP在本地Web服务器上运行应用程序.

部分打印代码是:

$printer = "\\\\localhost\\TM-T88V";

// Open connection to the thermal printer
$fp = fopen($printer, "w");
if (!$fp){
  die('no connection');
}

$data = " PRINT THIS ";

// Cut Paper
$data .= "\x00\x1Bi\x00";

if (!fwrite($fp,$data)){
  die('writing failed');
}
Run Code Online (Sandbox Code Playgroud)

只要PC连接到网络,此代码就可以正常工作.我可以使用fopen和"LOCALHOST"或"COMPUTER-NAME"将PHP连接到共享打印机(在同一台PC上或在网络中的PC上):fopen("\\ localhost\TM-T88V") , 'W');

如果我断开电脑与网络的连接,PHP将无法再连接到\\ localhost或\\ COMPUTER-NAME.

我尝试过这样的事情:fopen('TM-T88V'),fopen('\\.\ TM-T88V'),但我一直得到"[function.fopen]:无法打开流:没有这样的文件或目录...".

如何在没有活动网络连接的情况下连接到本地(共享)打印机(最好是通过名称)?

php printing fopen thermal-printer

5
推荐指数
1
解决办法
7964
查看次数

通过命令行将打印指令发送到Star TSP143LAN热敏收据打印机

我正在尝试通过以太网连接向Star TSP100(TSP143LAN型号)热敏打印机发送打印指令.

我没有问题打开原始数据连接到打印机使用它的LAN IP和端口9100,这似乎是打开的端口,但一旦连接我无法执行任何操作,我怀疑我正在使用命令不正确,但我很难说我打算如何使用它们.

我在http://www.starmicronics.com/support/Mannualfolder/linemode_cm_en.pdf上找到了一些文档,这些文档似乎是针对正确的模型,但是它们的命令参考是模糊的.

到目前为止,我已经尝试使用纯文本命令(例如,键入'LF'并命中返回以提供单行),而没有任何结果.

我还尝试使用键盘上的明显按键,在这个例子中,我按下键盘上的ESC键,然后是文档中附带的字符,使用"ESC"命令,也没有任何结果.

编辑:

我还将控制字符作为十六进制值发送,并作为十进制值发送,没有任何不同的结果.

printing cmd tcp thermal-printer

5
推荐指数
1
解决办法
5714
查看次数

打印机执行一次打印后关闭

我想在J2ME应用程序中使用蓝牙打印一些打印机数据.我可以完美地打印数据但在完成打印功能后,打印机会自动关闭.我的意思是设备连接丢失,当我关闭应用程序时,它会自动打开.打印一次后,我不明白为什么连接会丢失.如果有人有任何想法,请帮助我.谢谢.

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mobifin;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import com.sun.lwuit.Command;
import com.sun.lwuit.Component;
import com.sun.lwuit.Dialog;
import com.sun.lwuit.Display;
import com.sun.lwuit.Font;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.List;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.list.ListCellRenderer;
import com.sun.lwuit.plaf.Border;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import …
Run Code Online (Sandbox Code Playgroud)

printing lwuit bluetooth thermal-printer java-me

5
推荐指数
0
解决办法
250
查看次数

如何使用Tcp / Ip套接字从热敏打印机获取状态命令的响应

我正在使用(以太网)热敏打印机的新android应用程序上工作,智能手机和打印机在同一网络(192.168.2.0)中,所以直到这里工作正常为止,我可以打印票证并将命令成功发送到打印机,但我无法获取打印机的饱和状态(例如,纸张状态),我发送命令(套接字Outputstream),但无法使用Tcp / ip(套接字)读取响应(Inputstream),所以我的问题是是,如何使用Inputstream读取打印机的响应?任何帮助表示赞赏。

java sockets android thermal-printer tcp-ip

5
推荐指数
0
解决办法
616
查看次数

通过USB从Android设备将数据发送到热敏打印机

我正在从应用程序将数据发送到热敏打印机。我已经使它可以通过网络正常工作,并且我的数据可以正确打印。现在还有一个附加要求,即我们还必须能够通过usb打印。

这是我尝试过的:

    private UsbManager mUsbManager;
    private UsbDevice mDevice;
    private UsbDeviceConnection mConnection;
    private UsbInterface mInterface;
    private UsbEndpoint mEndPoint;
    private PendingIntent mPermissionIntent;
    private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
    private static Boolean forceCLaim = true;

    HashMap<String, UsbDevice> mDeviceList;
    Iterator<UsbDevice> mDeviceIterator;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);

        mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
        mDeviceList = mUsbManager.getDeviceList();    
        mDeviceIterator = mDeviceList.values().iterator();

        Button print = (Button)findViewById(R.id.print);

        Toast.makeText(this, "Device List Size: " + String.valueOf(mDeviceList.size()), Toast.LENGTH_SHORT).show();
        TextView textView = (TextView) findViewById(R.id.usbDevice);
        String usbDevice = "";
        //This is just …
Run Code Online (Sandbox Code Playgroud)

usb android connectivity thermal-printer

5
推荐指数
1
解决办法
5160
查看次数

Epson ePOS 打印机无法打印 - Android SDK

我正在使用 Epson ePOS 打印机 TM-T20,并且我已经运行了 SDK 示例并且它可以工作,但是,我正在尝试编写一个用于打印的小型应用程序。

成功找到打印机,数据发送成功,但不打印。如果有人可以帮助我,我将不胜感激。

这是我的代码:

显现

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.garydoolin.newepsontest" >
<uses-permission android:name="android.permission.USB"></uses-permission>
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MyActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
            android:resource="@xml/device_filter" />
    </activity>
</application>
Run Code Online (Sandbox Code Playgroud)

这是我的主要活动

package com.example.test.newepsontest;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.epson.eposprint.Builder;
import com.epson.eposprint.EposException;
import com.epson.eposprint.Print;
import com.epson.epsonio.DevType;
import com.epson.epsonio.DeviceInfo;
import com.epson.epsonio.EpsonIoException;
import …
Run Code Online (Sandbox Code Playgroud)

printing sdk android thermal-printer epson

5
推荐指数
1
解决办法
8756
查看次数

如何使用 ESC/POS 命令“GS v 0”

请有人解释一下“GS v 0”命令吗?我想在热敏打印机上打印一些位图。我无法理解参数 xL xH yL ...

\n\n

以下是编程指南中的内容,但到目前为止我还看不到解决方案。

\n\n

ASCII:Gs v 0\n十进制:29 118 48 m xL xH yL yH [d]k\n十六进制:1D 76 30 m xL xH yL yH [d]k

\n\n

0 \xe2\x89\xa4 米 \xe2\x89\xa4 3, 48 \xe2\x89\xa4 米 \xe2\x89\xa4 51\n0 \xe2\x89\xa4 xL \xe2\x89\xa4 255\n0 \ xe2\x89\xa4 xH \xe2\x89\xa4 255\n0 \xe2\x89\xa4 yL \xe2\x89\xa4 255\n0 \xe2\x89\xa4 d \xe2\x89\xa4 255\nk = ( xL + xH \xc3\x97 256) \xc3\x97 ( yL + yH \xc3\x97 256) ( k \xe2\x89\xa0 0)

\n\n

xL, xH 指定位图像水平方向的 (xL …

bitmap thermal-printer

5
推荐指数
2
解决办法
7049
查看次数

如何设置蓝牙打印的字体大小?

I am writing an application which print ticket receipts.
I have some how written the code to print the receipt but the printer either      
Run Code Online (Sandbox Code Playgroud)

以非常大的字体或非常小的(不可读)字体打印。任何机构都可以向我提供设置格式的代码。

     try {
            //////////this code runs in thread
                    OutputStream os = mBluetoothSocket
                            .getOutputStream();
                    String BILL = "";
                    BILL = BILL
                            + "     *********      ";
                    BILL = BILL+"\n***Invoice No*** \n" +
                            "Muslim Movers\n"
                            +Todays_date+"\n";

                    BILL = BILL + "\n\n";
                    BILL = BILL + "Tickets:" + "      " + String.valueOf(tickets_wanted)+"\n";
                    BILL = BILL + "Price:        "+String.valueOf(Total_Tickets)+"\n"+
                            Selectedroute+"\n";
                    BILL …
Run Code Online (Sandbox Code Playgroud)

printing android bluetooth thermal-printer

5
推荐指数
1
解决办法
4688
查看次数

构建配置为更喜欢设置存储库而不是项目存储库,但存储库“Google”是由构建文件“build.gradle”添加的

添加 allproject{} 时评估根项目时出现问题。原因:org.gradle.api.InvalidUserCodeException:构建配置为更喜欢设置存储库而不是项目存储库,但存储库“Google”是由构建文件“build.gradle”添加的

这是build.gradle中的代码

buildscript {
repositories {
    google()
    mavenCentral()

}
dependencies {
    classpath "com.android.tools.build:gradle:7.0.0"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
}
}

allprojects {
repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

printing thermal-printer printers gradle build.gradle

5
推荐指数
1
解决办法
4387
查看次数