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

Create tutorial for adding new labels #13

Open
seneca13 opened this issue Dec 7, 2023 · 3 comments
Open

Create tutorial for adding new labels #13

seneca13 opened this issue Dec 7, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@seneca13
Copy link

seneca13 commented Dec 7, 2023

First of all: GREAT WORK!!!
Having the opportunity to use my 62mm Printers for big shipping labels ist awesome!

But me and a whole lot of other people, I guess, need to print out labels for shipping company other then those implemented in Your Tool already.
Like most people I'm a total noob in programming.

As far as I understand, Your tool does the following steps:

  1. Read "original pdf label"
  2. convert "original pdf label" to image
  3. cut out pieces of the image
  4. create a blank label (59 mm x n mm)
  5. arrange the pieces on the new blank label
  6. convert the new label to pdf

The cut sizes and positions are set in the "labels.js".
For additional labels the labels.js has to be modified.

Could You please make a short tutorial on how to modify the "labels.js" for new label.

This would make this little tool universal an applicable world wide!

@seneca13
Copy link
Author

seneca13 commented Dec 7, 2023

I'm trying to get DPD-shipping lables (from ebay/packlink.de) to be printed out on 62mm,
but as I said above, I'm a total noob.

Here is the original label (DIN-A4):
[file removed]

The 62 mm label should look like this:
[file removed]

And here I defined the cut marks:
[file removed]

Maybe someone could help me and all the others using this labels.
They should be quite popular, because packlink.de is connected to eBay.de

(or All in one file)
[file removed]

@typingbeaver
Copy link
Owner

typingbeaver commented Dec 8, 2023

Heyho, I have added the label to the selections as dpd_packlink. :)

packlink_dpd_original-Label

I have removed your original files, as they still contained some personal info.
As I have to access to Packlink labels myself, I can't create any sample file for that. If you'd like, you can send me an original PDF to my mail [email protected] - I will delete the file right after creating a sample.


Indeed it would be nice to have a tutorial for that. I can make one, when I will find time for it.

ctx.drawImage(image,   // Adresse
    57, 78, 1112, 882,
    4, 0, 878, 696);

In general pasting pics is build up in the following way:

 [x coordinate original], [y coordinate original], [size x cutout], [size y cutout],
 [x coordinate paste], [y coordinate paste], [size x paste], [size y paste]

When scaling down the new cutout you have to pay attention to the original ratio (878 = 696/882 * 1112).

I at least added the option to download the full rendered page when const debug = false in crop.js is set to true. (This then has to be compiled at your local machine, e.g. via npm run dev for bundling and a development server.)
A button "Save uncropped PNG Image" will be visible then.

In general I have to clean up the whole code, including a proper debug mode, but time is lacking a bit at the moment. So please be patient. :)

@typingbeaver typingbeaver changed the title Add new shipping labels/companys Create tutorial for adding new labels Dec 8, 2023
@typingbeaver typingbeaver added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Dec 8, 2023
@seneca13
Copy link
Author

First things first:
Thank You for Your quick answer!
Sorry for my late reply, I forgot to subscribe the topic for notifications (noob!)

It really seems to work like a charme, tried it with https://snake-label.de/ and it looks awsome!
This will save me a whole lot of work,
THANK YOU SO MUCH!!!

I'm really looking forward on Your project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants