Shipping Integrator V5 - Online Help
Shipping Integrator V5
Questions / Feedback?

ImageLayout Property

Determines how the labels will be formatted for printing.

Syntax

 uspsshipintl.getImageLayout([callback])
 uspsshipintl.setImageLayout( imageLayout, [callback])

Possible Values

  0 (ilOnePerFile), 
  1 (ilAllInOneFile), 
  2 (ilTrimOnePerFile), 
  3 (ilTrimAllInOneFile)

Default Value

0


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getImageLayout([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setImageLayout([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The LabelImageType property indicates the file type of the label that USPS returns. ImageLayout dictates how the label looks in that file. The labels returned by USPS measure 8.5" x 5.5", or exactly one half of a sheet of regular 8.5" x 11" paper. The layouts available are listed below:

ilOnePerFile (0)Each label is returned as a separate file. The label takes up the top half of the paper, and the bottom half is left blank.
ilAllInOneFile (1)All the labels are returned in one file. Each label takes up the top half of a piece of paper, and the bottom half is left blank.
ilTrimOnePerFile (2)Labels are returned two to a file. If there are six pages of labels, then there will be only three files. Each file has a label on both the top and bottom half of the paper.
ilTrimAllInOneFile (3)All the labels are returned in one file. No blank space is left on the pages.

For the ilAllInOneFile and ilTrimAllInOneFile ImageLayouts, only one file will be written. However, for the ilOnePerFile and ilTrimOnePerFile ImageLayouts, more than one shipping label may be returned, up to a maximum of 6 total pages. If PackageShippingLabelFile is specified, these additional pages will be saved with the page number appended to the PackageShippingLabelFile you supplied.

For instance, if the PackageShippingLabelFile is "c:\expresslabel.pdf", the following files will be created: "expresslabel.pdf", "expresslabel.page2.pdf", "expresslabel.page3.pdf", etcetera.

Note that for the stUSPSFirstClass ServiceType, only ilOnePerFile and ilAllInOneFile are supported. Using any of the Trim-values will result in an error from USPS.

Data Type

Integer

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 5.0.6240.0