Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of type "6X4_PDF,8X4_PDF" in Datatype/*/Label #31

Open
naruone opened this issue May 16, 2017 · 4 comments
Open

Lack of type "6X4_PDF,8X4_PDF" in Datatype/*/Label #31

naruone opened this issue May 16, 2017 · 4 comments

Comments

@naruone
Copy link

naruone commented May 16, 2017

'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, ![a](https://cloud.githubusercontent.com/assets/6942348/26087037/15a14b64-3a21-11e7-85fb-9f5ad4a74745.png) 6X4_thermal,8X4_CI_PDF,8X4_CI_thermal', ),

@Majklas
Copy link

Majklas commented Feb 26, 2019

Hey,
how does it work? I can ee in DHL documentation there're only few params: EPLS2 ZPL2 and PDF.

@vivzon
Copy link

vivzon commented Feb 26, 2019 via email

@Majklas
Copy link

Majklas commented Feb 26, 2019

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', ),

@naruone
Copy link
Author

naruone commented Mar 6, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants