Click or drag to resize

FileUtilLinkOsGetObjectFromPrinterViaFtp Method (String, String)

Retrieves a file from the printer's file system via FTP and returns the contents of that file as a byte array.

Namespace:  Zebra.Sdk.Device
Assembly:  SdkApi_Core (in SdkApi_Core.dll) Version: 2.14.1869
Syntax
byte[] GetObjectFromPrinterViaFtp(
	string filePath,
	string ftpPassword
)

Parameters

filePath
Type: SystemString
The absolute file path on the printer ("E:SAMPLE.TXT")
ftpPassword
Type: SystemString
The password used to login to FTP, if null, a default password ("1234") will be used.

Return Value

Type: Byte
The file contents.
Exceptions
ExceptionCondition
ConnectionExceptionIf there is an error communicating with the printer, or the ftpPassword is invalid
ZebraIllegalArgumentExceptionIf the filePath is invalid, or if the file does not exist on the printer.
Remarks
Will retrieve the following file extensions: ZPL, GRF, DAT, BAS, FMT, PNG, LBL, PCX, BMP, WML, CSV, HTM, TXT.

Files transferred between different printer models may not be compatible.
NOTE: This method retrieves files over a network protocol and hence will only work over a TCP connected printer with FTP enabled. If ftpPassword is not provided, a default will be tried.
See Also