Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Auto zoom to one page only while printing

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245047
    [email protected]
    Participant

    I want to print invoice page (as one page only) if its more than one page, this can be done manually using zoom but I want to make it auto.

    Can this be done using CSS?

    #245048
    bearhead
    Participant

    You could possibly do it like so:

    @media print {
    body{
      transform:scale(.5);
    }
    }
    

    Of course, the right scale factor would be something you would have to figure out .

    #245049
    [email protected]
    Participant

    But how to make it dynamic? if the print became more than one page then scale to one page? can this achieved using CSS or needs extra JavaScript?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.