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

Render quality issue #41

Open
ASoldo opened this issue Oct 29, 2021 · 0 comments
Open

Render quality issue #41

ASoldo opened this issue Oct 29, 2021 · 0 comments

Comments

@ASoldo
Copy link

ASoldo commented Oct 29, 2021

Hi, I'm using this package to render some barcodes and I have an issue that doesn't make much sense to me.

I'm able to save my barcode on Mac os (Main Display) and it looks like this. Crisp and good quality.
asdasdasdsdadasdasdasdasdadasdsadasdasdasda

but when I move my browser to an external display it renders it in low quality even tho it is full screen on both screens and elements are fully visible and crisp on both screens.
Screenshot 2021-10-29 at 11 11 00

asdasdasdsdadasdasdasdasdadasdsadasdasdasda (1)

I'm not sure how to tackle this problem. Does anyone know what could go wrong and how to have it consistent?

This is my template:

   <div ref="printMe">
        <barcode
          height="50"
          width="1"
          :value="barcodeValue"
          :display-value="displayValue"
          format="code39"
          background="transparent"
          lineColor="black"
        >
        <!-- It is not loading -->
        Please insert CODE39 barcode
      </barcode>
   </div>

and script:

async print() {
        const el = this.$refs.printMe;
        // add option type to get the image version
        // if not provided the promise will return
        // the canvas.
        const options = {
          type: "dataURL",
          // useCORS: true
          imageSmoothingEnabled: false
        };
        this.output = await this.$html2canvas(el, options);
        let a = document.createElement("a");
        a.href = this.output;
        a.download = `${this.barcodeValue}`;
        a.click();
        a.remove();
      },

Thank you!

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

1 participant