2014-01-05 39 views
1

我有得到像这样初始化我创建一个图像:如何生成图像的标签打印机

$width = 800; 
$height = 600; 
$im = @imagecreate($width, $height); 
$background_color = imagecolorallocate($im, 255, 255, 255); 
$text_color = imagecolorallocate($im, 0, 0, 0); 
$font1 = '../library/BarCodeGen/font/timesbd.ttf'; 
$font2 = '../library/BarCodeGen/font/Arial.ttf'; 
$fontSize = 34; 
// etc... 

字体大小是相当大的;并获取生成的图像是这样的:

enter image description here

的问题是,每当我通过我的标签打印机(硬件)标签和字体是非常小的,如本照片打印此标签:

enter image description here

据我所知,在203 DPI标签打印机打印,被称为Wasp WPL305 Thermal Label Printer With Cutter

我怎样才能让字体变大?我不认为我应该设置$fontSize = // some big number,因为34点字体应该足够大。我只是不知道它为什么这么小......

谢谢。

+0

如何打印该图像?该标签的尺寸是多少? –

+0

我打开图像(PNG文件),然后单击“打印”。这将它发送到标签打印机,因为这是连接到机器的唯一打印机。标签尺寸为4x3“(英寸),我输出的图像为800x600像素 – user1477388

+0

您可以在网络浏览器中配置打印过程 –

回答