Print a pdf ZQ620

// Expert user has replied.
L Lim Carle 2 years 3 months ago
236 7 0

Hello, I have an Android application that has an invoice and delivery note printing functionality.
Printing is done correctly with the sendFileContents(filePath) function on both ZQ510 and ZQ511 printers which have Link OS 6.3.
Today I received a new ZQ620 printer and printing does not work on this new printer, it prints me a blank page with the printer configurations.

Please Register or Login to post a reply

7 Replies

S Steven Si

Update the firmware on the ZQ620 to the latest and don't forget to enable the PDF Direct on the ZQ620 as well. See this article for the instructions - Announcement | Printers Include Free PDF Direct with Link-OS 6.3.

L Lim Carle

Hello thank you for your answer, but I still can't print.

The printer has Link OS 6.6 V85.20.24Z and direct pdf is active.
I also added this line in the procedure which allows to Takes the size of the pdf and the printer's maximum size and scales the file down

else if (printerModel.equals("iMZ32")||printerModel.equals("QLn32")||printerModel.equals("ZQ510")||printerModel.equals("ZQ511")||printerModel.equals("ZQ620" )) {
scaleFactor = 3.0/fileWidth*100;
}

S Steven Si

Please also make sure that the device.languages is set to zpl. It has to be in ZPL in order to print PDF on a PDF Direct enabled printer. Use the following SGD to set and verify the setting.

### Set to zpl
! U1 setvar "device.languages" "zpl"

### Verify the setting.
! U1 getvar "device.languages"

 

L Lim Carle

Hello, I force the zpl language at the beginning of my function, here is the procedure I use. Thanks

public static String sendPrint(String MacAddress, String filePath) {
	Connection connection = new BluetoothConnection(MacAddress);
	String sTrace = "";
	String pageDescriptionLanguage = "pdf";
	String Language = "";
	try {

		connection.open();
		ZebraPrinter printer = ZebraPrinterFactory.getInstance(connection);
		

		boolean isReady = checkPrinterStatus(printer, filePath);
		SGD.SET("device.languages","zpl",connection);
		
		SGD.SET("media.type", "journal", connection);
		
		Language = SGD.GET("apl.enable", connection);
		if (!Language.contains(pageDescriptionLanguage))
		{
			SGD.SET("apl.enable", "pdf", connection);
		}
		else  {
			
			SGD.SET("apl.settings", "dither" ,connection);
			String scale = scalePrint(connection, 9);
			SGD.SET("apl.settings",scale,connection);
			
			SGD.SET("apl.settings", "scale-to-fit no-varlen orient = N" ,connection);
			SGD.SET("apl.settings", "scale-to-fit no-varlen no-text-smooth mct = 0x94",connection);
			
			if (isReady) {
				if (filePath != null) {
					
					printer.sendFileContents(filePath);
				} else {
					sTrace+= "no_pdf_selected";
				}
			} else {
				
				sTrace+= showPrinterStatus(printer);
			}
			
		}
		
		
	} catch (ConnectionException e) {
		e.printStackTrace();
		sTrace+= "no_printer";
	} catch (ZebraPrinterLanguageUnknownException e) {
		e.printStackTrace();
	} finally {
		try {
			connection.close();
		} catch (ConnectionException e) {
			e.printStackTrace();
		}
	}
	return sTrace;
}

 

S Steven Si

The code looks just fine. Not sure why it works on your ZQ510, but not work with your ZQ620. Is the Bluetooth connection okay? If the app connects to the ZQ620, but doesn't print PDF, it is most likely related to the settings. You can do an "allcv" output from the working ZQ510 and compare the "allcv" output from the ZQ620 to compare the PDF settings, Bluetooth settings, language setting, etc.

L Lim Carle

you think it comes from setting the dither scale? how much should it be for the ZQ620 printer?

What I don't understand is that I can't print a pdf file either via the "printer setup" application provided by zebra on the ZQ620 while it prints the same file on the ZQ510 printer

S Steven Si

Here are the PDF print related configuration.

ZQ510 Parameters:
...
apl.
apl.enable : none , Choices: pdf,none
apl.framework_version : 1.3
apl.version : none
apl.o.
apl.o.graphics_byte_width : 72 , Choices: 0-255
...

On the ZQ620, the PDF print is configured as below.

ZQ620 Parameters:
...
apl.
apl.enable : none , Choices: apl-e,apl-m,apl-s,pdf,apl-d,apl-i,none
apl.framework_version : 1.4
apl.version : none
apl.settings : scale-to-fit no-varlen no-text-smooth mct = 0x94
apl.o.
apl.o.graphics_byte_width : 7 , Choices: 0-255
...

Because the ZQ510 has old firmware, the apl.framework_version is v1.3. The ZQ620 has the latest firmware, so the apl.framework_version is v1.4. Based on the output above, the PDF print is not enabled on either the ZQ510 or the ZQ620, because the apl.enable is set to none on both. If the PDF print is enabled, it should be shown as:

apl.enable : pdf , Choices: pdf,none

Please enable the PDF on both printers first via the following command, and retry.

! U1 setvar "apl.enable" "pdf"

 

CONTACT
Can’t find what you’re looking for?