Coder Social home page Coder Social logo

Comments (9)

MaximilianLloyd avatar MaximilianLloyd commented on August 19, 2024 1

Sure. It's nothing special. This prints qr codes. Code below:

    var printContents = document.querySelector('.print-content').innerHTML;
    var popupWin = window.open('', '_blank', 'width=600,height=600');
    popupWin.document.open();
    popupWin.document.write('<html><head><style>* {font-family: Arial}.qr-code {display: inline-block;  margin-top: 20px;  position: relative; } .qr-title {display: inline-block;  position: absolute; right: 0; width: 50%; text-align: center;} .qr-code-code {display: block; margin-top: 20px;}</style></head><body onload="window.print()">' + printContents + '</body></html>');
    popupWin.document.close();

from angularprint.

pelizza avatar pelizza commented on August 19, 2024 1

Hey guys,

I've fought a lot against browser printing and it seems most problems are related to the browser itself.

I ended up by avoiding using any overflow hiddens elements, or event position relative/absolute. @MaximilianLloyd 's solution is great because putting the content into a popup creates a "printable" version of your content, with a much simpler layout.

from angularprint.

gkeshavan avatar gkeshavan commented on August 19, 2024

Hi,
I am also having the same issues in creating multiple page inside the table row. Page break is not working. Did you get any solution. Can you help me how to insert page break inside ng-repeat?

from angularprint.

MaximilianLloyd avatar MaximilianLloyd commented on August 19, 2024

Sadly i have still not found a solution to this problem :-(.

from angularprint.

yuanda avatar yuanda commented on August 19, 2024

I have the same issue too, any solution yet?

from angularprint.

MaximilianLloyd avatar MaximilianLloyd commented on August 19, 2024

No, sadly not. I ended up just coding a custom solution.

from angularprint.

yuanda avatar yuanda commented on August 19, 2024

Would you mind sharing you custom solution here?

On Fri, Aug 19, 2016 at 17:42 Maximilian Lloyd [email protected]
wrote:

No, sadly not. I ended up just coding a custom solution.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#26 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC1H_lW5GnQnZPvAy6Icfhsq-tJDBqvLks5qhiNBgaJpZM4I8RgL
.

from angularprint.

yuanda avatar yuanda commented on August 19, 2024

It works! Thank you very much @MaximilianLloyd

from angularprint.

MaximilianLloyd avatar MaximilianLloyd commented on August 19, 2024

No problem @yuanda, glad to help ;).

from angularprint.

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.