2014-01-05 43 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

您可以在網絡瀏覽器中配置打印過程 –

回答