jasonday / printThis

jQuery printing plugin; print specific elements on a page

Home Page:https://jasonday.github.io/printThis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quality Reduction when printing from the browser

iam-dante opened this issue · comments

Without additional details, I'm unable to look into your issue.

When am printing a html contain from the browser am losing the quality of the content. It is different when I download it then print it.

Hi @iam-dante this still isn't enough information for me to troubleshoot. I really need much more information to understand your issue, such as which browser, quality of what content, example code, a URL, have you debugged, etc.

https://github.com/jasonday/printThis#please-read

Please read

  • "It's not working" without any details is not a valid issue and will be closed
  • A url, or html file, is necessary to debug. Due to the complexities of printing and this plugin, an example is the best way to debug
  • When troubleshooting, set debug: true and inspect the iframe. Please report your findings when reporting an issue
  • Every user should be active in the debugging process

Hello @jasonday Okey am printing a div content from the browser using your CDN, its plain HTML, javascript and tailwindcss. The issue is the quality of the pages after printing directly from the browser is low compared to when downloaded then printed

Code :

<div id="form" class=" relative  h-[561.25984252px] w-[795px] bg-[url('../images/backgroundcover.jpg')] bg-cover px-6 py-6">
     something content
</div>

 <script src="https://cdnjs.cloudflare.com/ajax/libs/printThis/1.15.0/printThis.js"></script> 

<script>
    var button = document.getElementById("download");
    var makepdf = document.getElementById("form");

    button.addEventListener("click", function () {
      $(makepdf).printThis({
        importCSS: true,
        importStyle: true,
        debug:true
      });

  </script>

What happens if you increase the printDelay option to something larger like 3000? I'm inferring that what you mean by quality reduction is an image that you're seeing reduced quality?

Closing due to inactivity.