Coder Social home page Coder Social logo

Comments (7)

CitizenOfRome avatar CitizenOfRome commented on June 27, 2024

from jquery.print.

firmlab avatar firmlab commented on June 27, 2024

Hi, thanks for the reply,

the print html is like this: https://jsfiddle.net/8e0yun6k/ but in here it's working fine.

i think you're right, the problem is because of there is css that restrict it's height.

i'm using framework7 popup and i put the HTML print template into it.

have you ever use framework7 before?
how to make this template override the restriction?

from jquery.print.

CitizenOfRome avatar CitizenOfRome commented on June 27, 2024

from jquery.print.

firmlab avatar firmlab commented on June 27, 2024

ah, i fixed it with globalStyles to false.

but is there any way to setup margin on each of print?
let say, i have 2 print template, one for receipt print and one for standard print, is there any option to set the margin only for standard print ?

from jquery.print.

CitizenOfRome avatar CitizenOfRome commented on June 27, 2024

from jquery.print.

firmlab avatar firmlab commented on June 27, 2024

like this one?

<style id="custom-style-print"> @page { margin: 0cm 0cm 0cm 0cm; } </style>

$('#print-registrasi-container').print({append: '#custom-style-print'});

from jquery.print.

CitizenOfRome avatar CitizenOfRome commented on June 27, 2024

Sure, that could work but you may be better off using one of these options:

mediaPrint

  • Default: false
  • Acceptable-Values: Boolean
  • Function: Whether or not link tags with media='print' should be included; Over-riden by the globalStyles option

stylesheet

  • Default: null
  • Acceptable-Values: URL-string
  • Function: URL of an external stylesheet to be included

from jquery.print.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.