agentsclimarketplace

Australia customs excel to pdf

Skill xuluoforcainiao/australia-customs-excel-to-pdf/australia-customs-excel-to-pdf

Convert Australian customs/ logistics commercial invoice Excel files (.xlsx) into a single-page landscape A4 PDF. Use when the user needs to convert Excel invoices to PDF format, especially for Australian customs clearance documents from Top Logistics, Cainiao, 4PX, or similar freight forwarders. Handles embedded product images and preserves the standard commercial invoice layout.From its SKILL.md

Install
npx -y skills add xuluoforcainiao/australia-customs-excel-to-pdf --skill australia-customs-excel-to-pdf

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.3 KB, 776 tokens by cl100k_base, as published. Nobody here has run it

Australia Customs Excel to PDF

Purpose

Convert Excel commercial invoice files (typically from Australian logistics providers) into a single-page, landscape A4 PDF with a professional layout matching standard customs documentation formats.

When to Use

  • User asks to convert an Excel invoice to PDF
  • Working with Australian customs or freight forwarding documents
  • Files contain product images that need to be preserved in the PDF
  • Need a single-page landscape A4 output for printing or submission

Requirements

  • Python 3.7+ with openpyxl and reportlab installed
  • CJK font support (Microsoft YaHei on Windows, PingFang on macOS)

Workflow

Step 1: Verify Dependencies

Ensure required packages are available:

python -m pip install openpyxl reportlab

Step 2: Run the Conversion Script

python scripts/excel_to_pdf.py <input.xlsx> <output.pdf>

Step 3: Manual Fallback (if script fails)

If the script cannot be executed, generate the PDF manually following this layout:

  1. Page setup: Landscape A4 (29.7cm x 21cm)
  2. Outer border: 1.5pt black rectangle with 2cm margins
  3. Header (red, centered):
    • Company name from cell D1
    • Address from cell D2
    • Horizontal line separator
  4. Title: "COMMERCIAL INVOICE" centered, 13pt
  5. Consignee (left): From cell E4, label "Consignee :" in black, name in red
  6. Right info block (aligned with underlines):
    • DATE: from J4
    • INVOICE NO.: from J5
    • TRADE TERM: from J6
    • PORT OF LOADING: from J7
    • DESTINATION: from J8
  7. Table (grey header, full borders, 7 columns):
    • BUYER P.O. NO. | Package | Quantity | DESCRIPTION OF GOODS | Products' Material | UNIT PRICE (AUD) | TOTAL AMOUNT (AUD)
    • Data from row 10
    • GRAND TOTAL from row 11
  8. WEB: URL from E12 in blue
  9. Product image: Extract from Excel zip (xl/media/) and place below WEB line

Step 4: Image Extraction

To extract embedded images from the Excel file manually:

import zipfile
z = zipfile.ZipFile('input.xlsx')
for name in z.namelist():
    if name.startswith('xl/media/') and not name.endswith('/'):
        data = z.read(name)
        with open(name.split('/')[-1], 'wb') as f:
            f.write(data)

Expected Excel Structure

The skill assumes a standard layout commonly used by Australian freight forwarders:

ContentTypical Cell
Company nameD1
Company addressD2
Consignee nameE4
DateJ4
Invoice No.J5
Trade TermJ6
Port of LoadingJ7
DestinationJ8
Table headerD9:J9
Product dataD10:J10
Grand totalD11:J11
WEB URLE12
Product imageEmbedded in xl/media/

Output Format

  • Single page, landscape A4
  • Outer border frame
  • Red company header text
  • Grey table header background
  • Complete table borders (horizontal and vertical lines)
  • Blue WEB link text
  • Preserved product image

What ships with it: 2 files

9.0 KB alongside SKILL.md, 1 of them executable

scripts/

Gives 0 of the 12 instructions most pdf office docs skills give in 776 tokens

Counted across 636 of the 690 authors here whose files we hold, read 2026-08-07

  • Extract text or tables using pdfplumber or pdftotextin 89 of 636, across 23 files
  • Create new PDFs using reportlabin 83 of 636, across 16 files
  • Read forms.md before filling out PDF formsin 80 of 636, across 13 files
  • OCR scanned PDFs using pytesseract and pdf2imagein 77 of 636, across 10 files
  • Use qpdf to merge or split PDFs or large filesin 70 of 636, across 3 files
  • Use Excel formulas instead of hardcoded calculated values or Python calculationsin 68 of 636, across 13 files
  • Unpack, edit, and repack XML for existing documents or presentationsin 63 of 636, across 8 files
  • Document sources for all hardcoded valuesin 61 of 636, across 9 files
  • Write minimal, concise Python code without unnecessary commentsin 59 of 636, across 7 files
  • Run the recalculation script (recalc.py) after adding or modifying formulasin 59 of 636, across 7 files
  • Fix all identified formula errors and recalculate before finishingin 58 of 636, across 6 files
  • Format years as text stringsin 57 of 636, across 5 files

Said here and by no other author read

  • generate landscape A4 PDF manually if script fails
  • draw a black rectangle border with margins
  • render company header text in red
  • center the commercial invoice title
  • align right info block with underlines
  • draw a table with grey header and full borders

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,401. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.