1. Go to this page and download the library: Download cable8mm/waybill library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cable8mm / waybill example snippets
use Cable8mm\Waybill\Enums\ParcelService;
use Cable8mm\Waybill\Waybill;
Waybill::of(ParcelService::Cj)
->path(realpath(__DIR__.'/../dist'))
->save('test.pdf');
use Cable8mm\Waybill\Enums\ParcelService;
use Cable8mm\Waybill\Waybill;
$waybill = Waybill::of(ParcelService::Cj)
->toArray();
use Cable8mm\Waybill\Enums\ParcelService;
use Cable8mm\Waybill\Support\Mpdf;
use Cable8mm\Waybill\Waybill;
$mpdf = Mpdf::instance();
$waybill = Waybill::make(ParcelService::Cj)
->mpdf($mpdf)
->path(realpath(__DIR__.'/../dist'))
->save('test.pdf');
use Cable8mm\Waybill\Enums\ParcelService;
use Cable8mm\Waybill\Support\Mpdf;
use Cable8mm\Waybill\Waybill;
use Cable8mm\Waybill\WaybillCollection;
$mpdf = Mpdf::instance();
WaybillCollection::of(mpdf: $mpdf)
->add(Waybill::of(ParcelService::Cj, mpdf: $mpdf))
->add(Waybill::of(ParcelService::Cj, mpdf: $mpdf))
->path(realpath(__DIR__.'/../dist'))
->save('collection.pdf');
// 또는 한 번에 여러 개 추가:
WaybillCollection::of(mpdf: $mpdf)
->add([
Waybill::of(ParcelService::Cj, mpdf: $mpdf),
Waybill::of(ParcelService::Cj, mpdf: $mpdf),
])
->path(realpath(__DIR__.'/../dist'))
->save('collection.pdf');
use Cable8mm\Waybill\Enums\ParcelService;
use Cable8mm\Waybill\Slicer;
Slicer::of(ParcelService::Cj, 1)
->source('source.pdf')
->save('one_page.pdf'); // 또는 ->download('one_page.pdf') 로 다운로드