Skip to content

Commit

Permalink
Merge branch 'antreos-hermes_vinted_qr'
Browse files Browse the repository at this point in the history
Add `hermes_vinted_qr`
  • Loading branch information
typingbeaver committed Jan 9, 2025
2 parents 2694363 + c69d9a8 commit ab5787a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ International returns are most probably better on a real paper sheet/A5 Label.
- **Size:** 62x150mm

![Sample Image](/samples/hermes/hermes_privat.png)

#### `hermes_vinted_qr`
- **Size:** 62x100mm

![Sample Image](/samples/hermes/hermes_vinted_qr.png)
<!-- [Sample PDF]() -->

### Seller Returns
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
<option value="hermes-privat-v102">
hermes_privat [v1.0.2] | 62x150mm
</option>
<option value="hermes-vinted-qr">
hermes_vinted_qr | 62x100mm
</option>
</optgroup>
<optgroup label="seller_returns">
<option value="adidas">
Expand Down
Binary file added samples/hermes/hermes_vinted_qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/js/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default function (labelType) {
case 'dp-briefmarke-short': return dpBriefmarkeShort
case 'dp-briefmarke-adresse': return dpBriefmarkeAdresse;
case 'hermes-privat-v102': return hermesPrivatV102;
case 'hermes-vinted-qr': return hermesVintedQR;
case 'adidas': return adidasRetoure;
case 'amazon-dhl': return amazonRetoureDhl;
case 'bestsecret-retoure-dhl': return bestsecretRetoureDhl;
Expand Down Expand Up @@ -400,6 +401,30 @@ const hermesPrivatV102 = {
}
};

const hermesVintedQR = {
file: {
type: 'pdf',
page: 1,
rotation: 270
},
width: 1110, // 94mm (=> 100mm)
crop(outputCanvas, ctx, image) {
ctx.drawImage(image, // Vinted Logo
154, 150, 120, 696,
0, 0, 120, 696);

ctx.drawImage(image, // Hermes Logo und Empfängername
422, 1375, 360, 820,
130, 0, 306, 696);

// ctx.beginPath(); ctx.moveTo(690, 0); ctx.lineTo(690, outputCanvas.height); ctx.stroke();

ctx.drawImage(image, // QR-Code
440, 226, 632, 632,
470, 32, 632, 632);
}
};

const adidasRetoure = {
file: {
type: 'pdf',
Expand Down

0 comments on commit ab5787a

Please sign in to comment.