mycurelabs / vue-html-to-paper

Vue mixin for paper printing html elements.
MIT License
298 stars 101 forks source link

Help with Print settings #61

Closed Zanndorin closed 4 years ago

Zanndorin commented 4 years ago

Hi, I don't think I'm using this correctly.

I am trying to make the print label sized

@media print {
    @page {
        size: 50mm 25mm;
        margin: 2mm;
    }
}

I added this to a print.css file.

and I call it

printLabel() {
      const localOptions = {
        name: '_blank',
        styles: [
          'print.css' // Have tried with ./print and /print
        ]
      };
      this.$htmlToPaper('printMe', localOptions, () => {
        console.warn('done landscape');
      });
    },

but I think the size thingie are ignored? or is this related to https://github.com/mycurelabs/vue-html-to-paper/issues/47

jofftiquez commented 4 years ago

Hello @Zanndorin I am currently still investigating this on my end. One possible reason might be the permission to the public folder. Altho I am not yet certain about it. Would you mind using the a CDN at the moment? Thanks.

jofftiquez commented 4 years ago

Duplicate #47