Comments (4)
Hey,
how does it work? I can ee in DHL documentation there're only few params: EPLS2 ZPL2 and PDF.
from dhl-api.
from dhl-api.
I had to include
use DHL\Datatype\GB\Label;
and afterwards
`$shipment->LabelImageFormat = 'PDF'; // thermal ZPL2 arba EPL2
$shipment->Label->LabelTemplate = '8X4_PDF'; // 6X4_PDF`
make sure you're having this class in DHL/Entity/GB/ShipmentRequest.php
'LabelTemplate' => array( 'type' => 'LabelTemplate', 'required' => false, 'subobject' => false, 'comment' => 'LabelTemplate', 'enumeration' => '8X4_A4_PDF,8X4_thermal,8X4_A4_TC_PDF,6X4_A4_PDF,6X4_PDF,8X4_PDF,6X4_thermal,8X4_CI_PDF,8X4_CI_thermal', ),
from dhl-api.
I had to include
use DHL\Datatype\GB\Label;
and afterwards
`$shipment->LabelImageFormat = 'PDF'; // thermal ZPL2 arba EPL2$shipment->Label->LabelTemplate = '8X4_PDF'; // 6X4_PDF`
make sure you're having this class in DHL/Entity/GB/ShipmentRequest.php
'LabelTemplate' => array( 'type' => 'LabelTemplate', 'required' => false, 'subobject' => false, 'comment' => 'LabelTemplate', 'enumeration' => '8X4_A4_PDF,8X4_thermal,8X4_A4_TC_PDF,6X4_A4_PDF,6X4_PDF,8X4_PDF,6X4_thermal,8X4_CI_PDF,8X4_CI_thermal', ),
this is my code
$xmlCreate = new DHL\Entity\GB\ShipmentRequest();
// Omit
$xmlCreate->LabelImageFormat = 'PDF';
if ($data['LabelImageFormat'] == 'PDF_Thermal') {
$xmlCreate->Label->LabelTemplate = '8X4_PDF';
$xmlCreate->Label->Logo = 'N';
$xmlCreate->Label->Resolution = '300';
} else {
$xmlCreate->Label->LabelTemplate = '8X4_A4_PDF';
$xmlCreate->Label->Logo = 'N';
$xmlCreate->Label->Resolution = '300';
}`
I modified 'Datatype//Label' (all of them) according to the above. I can support 64_pdf, 8*4_pdf, the above is my code, the middle part is omitted.
from dhl-api.
Related Issues (20)
- where to find the configuration parameters for use DHL-API? HOT 1
- How to retrieve 6x4 labels
- Trying to get property of non-object HOT 1
- Barcodes is not defined for DHL\Entity\GB\ShipmentResponse HOT 5
- Cannot determine destination service HOT 2
- Issue in geeting Cost for DHL shipping services HOT 1
- How to print COD(Collect on delivery) in Shipment
- PickUp example HOT 5
- How to get the credential HOT 2
- AWBnumber field size
- DHL Invoice Is not generate in label for non doc courier.
- /rest/v2/Label
- Getting the actual shipping price the XML response HOT 2
- Add DocImages node HOT 1
- Proper response for getCapability or getQuote
- getting error while hit ShipmentRequest from sample HOT 2
- Not working GB/BookPURequest function HOT 2
- Error in writing data to XML file
- Plugin Woocommerce
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhl-api.