1

I have an image that I create which get's initialized like so:

$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...

The font size is quite large; and the image that gets generated is like this:

enter image description here

The problem is, whenever I print this label via my label printer (hardware) the label and font is really small, as shown in this photo:

enter image description here

I understand that the label printer prints in 203 DPI and is called the Wasp WPL305 Thermal Label Printer With Cutter.

How can I make it so the font is larger? I don't think I should set $fontSize = // some big number because 34 point font should be big enough. I just don't know why it is printing it so small...

Thanks.

user1477388
  • 20,790
  • 32
  • 144
  • 264
  • How do you print that image? What's the size of that label? – Marcel Korpel Jan 05 '14 at 20:23
  • I open the image (a PNG file) and click "Print." This sends it to the label printer since that's the only printer connected to the machine. The label size is 4x3" (inches). This image that I am outputing is 800x600 pixels. – user1477388 Jan 05 '14 at 20:24
  • You can configure the printing process in your web browser. – Marcel Korpel Jan 05 '14 at 20:25
  • I am not sure what you mean. Are you saying I will get a different result if I print it from a browser window instead of printing from a file? – user1477388 Jan 05 '14 at 20:26
  • You can't just send a file to a printer, can you? You should open the file with a program and give that program the command to print the image. With which program are you printing that image? – Marcel Korpel Jan 05 '14 at 20:27
  • When you open an image file on a Windows machine it opens it in the Windows Photo Viewer. From there, you can click "Print." – user1477388 Jan 05 '14 at 20:28
  • Then you should configure Windows Photo Viewer. I don't have that program, so I can't help you with that; anyway, did you try to print from within your browser? How do page previews look like (within Photo Viewer and your browser)? – Marcel Korpel Jan 05 '14 at 20:30
  • Windows Photo Viewer is the default program that ships with Windows 7. I believe all versions of Windows use a similar default program for opening image files. I don't actually print the image myself, the photo is what someone sent me. I am developing this app remotely :) So, I am just trying to find a way to output the image properly. – user1477388 Jan 05 '14 at 20:32
  • I don't use Windows, so I can't say. But can you look at the print preview image and see if it matches the outcome of the printing process? My god, that's hard to test for you. – Marcel Korpel Jan 05 '14 at 20:34
  • I will have to ask them to send me a screenshot. I was just hoping there was something I was missing in my code or something... – user1477388 Jan 05 '14 at 20:37
  • 1
    You can't install the driver yourself and have a look? – Marcel Korpel Jan 05 '14 at 20:39
  • That's a good idea, but I can't find the driver. I was looking on their website... http://www.waspbarcode.com/support/updates-patches – user1477388 Jan 05 '14 at 20:45
  • A popular search engine revealed [this](http://www.driverguide.com/driver/detail.php?driverid=948031) to me… – Marcel Korpel Jan 05 '14 at 20:49
  • Dude OMG... That was a horrible idea. Downloading from that site just f'd up my expensive Alienware computer... It d/l'd a bunch of garbage now I have to delete it all. Running a full virus scan now too. Thanks for trying to help though – user1477388 Jan 05 '14 at 20:58
  • Ow, I'm sorry to hear that. – Marcel Korpel Jan 05 '14 at 21:01
  • The worst part is, I still don't even have the driver! – user1477388 Jan 05 '14 at 21:02
  • 1
    Can't you ask the owner of the label printer for the driver? – Marcel Korpel Jan 05 '14 at 21:05
  • Do you know where it would be? I looked in `C:\Windows\System32\DriverStore\FileRepository` but I don't know what it would be called. – user1477388 Jan 08 '14 at 22:02
  • I really don't know, I don't use Windows. But doesn't the owner have an installer (e.g., on CD-ROM)? – Marcel Korpel Jan 09 '14 at 11:24

1 Answers1

0

The problem here was that the label printer had to be configured to use the proper size of labels. Once I downloaded the new driver from here http://www.bartenderbarcodesoftware.com/drivers/printer-driver-features.aspx?m=Wasp+WPL-305 I was able to create a new Preset with the correct size of the labels. Then, the print was correct.

user1477388
  • 20,790
  • 32
  • 144
  • 264