crabbly / crabbly/Print.js

Page spliting on print

Open
#672 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.5k
Forks
688
PR merge metrics
No merged PRs in 30d

Description

I'm trying to print an HTML page, inside it the page size is set to 210mm x 110mm, media print also for the same size... but when printing it is dividing into two pages of the same size with the second one blank

Like the example in the picture below
Does anyone know how to avoid this second page?

printOptions:

```
var printOptions: any = {
printable: this.modeloFactura,
type: 'raw-html',
documentTitle: 'Factura',
maxWidth: 210,
maxHeight: 110,
style: `
@page { size: 210mm 110mm; margin: 0; }
@media print { html, body { width: 210mm; height: 110mm; margin: 0; } }
body > div, body, html { width: 99% ; height:99%; max-width:210mm ; max-height:110mm } `,
};
```

![Sem título](https://github.com/crabbly/Print.js/assets/29892885/9acfe25f-6228-4e7d-8632-73825e3a51a5)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.