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

Print #1

Open
FernandoGambaro opened this issue Jun 15, 2022 · 2 comments
Open

Print #1

FernandoGambaro opened this issue Jun 15, 2022 · 2 comments

Comments

@FernandoGambaro
Copy link

Hi, wish you can tell me hoy to print.

Thanks in advance.

@celioyutaka
Copy link
Owner

celioyutaka commented Jun 15, 2022

Hi, wish you can tell me hoy to print.

Thanks in advance.

Hi Fernando

This project is focused for a front-end solution. So you can use the default shortcut of the browser to print (CTRL+P )

To test if it's working well with some specific label-model.

  1. Click in the red button called "Ativar / Desativar Cor de Fundo para ajuste de escala" (This button is for debug/configuration purpose)
  2. Select your label model (Modelo de Etiqueta)
  3. Click in the blue button "APLICAR ALTERAÇÕES" to save your settings.
  4. Then press CTRL + P
  5. Configure the margins in your browser printer options, type of paper (A4, Letter, etc.)
  6. Save as PDF
  7. Check if all background of the PDF is red.
  8. If the background is not complete red, you need to change the margin (in CONFIGURAÇÕES or in your browser printer options)

To add content to labels:

Clone project, and change the value of jsonString in https://github.com/celioyutaka/etiqueta/blob/master/etiqueta.js

var jsonString = '{"0":"PASTEL","1":"CHURROS","2":"SONHO","3":"<div style=\'color: red;\'>PIMENTA</div>"}';

or in codepen

Using de codepen url as an example, https://codepen.io/celioyutaka/pen/wxBdQO
In line 47

You can replace this values by your content (strings, number, html, image, etc).

@FernandoGambaro
Copy link
Author

FernandoGambaro commented Jun 16, 2022

Thanks for your response, I have managed to generate the labels taking data from a Mysql DB using PHP, the idea was to know if there was something planned to print, I'm still investigating.
Thank you very much for such hard work.

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

2 participants