CSS configuration for matrix printer

Asked

Viewed 791 times

2

Well, my problem is this. I’m developing a web system and I use ASP.NET MVC, I managed to generate a guide where the layout that I present is null. But I couldn’t set up the print correctly for a dot matrix printer.

The size of the matrix sheet is half a page (Width: 21,4 / Height: 13,7). What would be the best page size, font size and font size for such printing? Or such settings are performed directly on the printer?

PS: I tried the code below and it didn’t have the expected effect.

PS²: I am using the window.print(); to call the print modal on Chrome.

@media print {
    html, body {
        width: 5.5in; /* was 8.5in */
        height: 8.5in; /* was 5.5in */
        display: block;
        font-family: "Calibri";
        /*font-size: auto; NOT A VALID PROPERTY */
    }

    @page {
        size: 5.5in 8.5in /* . Random dot? */;
    }
}

1 answer

3

I had a similar problem with printing on thermal printers in Firefox. To solve the problem of the page layout I had to use the "Configure page" menu in Firefox and leave customized for that type of paper (margins, orientation and size).

The problem is that it is always configured with that type of print.

  • And you’d also have to set that up on every printer as well.

  • Maybe this post can help you: http://stackoverflow.com/a/13797130/2238515

  • @Cleveralmeida thank you for the answer, that’s really the intention. The problem is that I don’t know the right style (font, size, margin, padding) for matrix printing. And it’s exactly what I need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.