Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
Printthis.js now showing hyperlinks

We have a page that gets printed via printthis.js, everything is working as expected except that hyperlinks aren't shown if importStyle: false, we need to set it to false as the style of the document needs to be a lot different to the page style. I have tried a few different styles on the links in the CSS file for the pdf to no avail. Here is the current code.

jQuery(function(){    
    jQuery('a[id="printbutton"]').click(function(){         
            jQuery('').printThis({
                debug: false,  
                importStyle: false, 
                importCSS: false,  
                loadCSS: "/pdfstyle.css",
                removeInline: true,  
                footer: jQuery(".printthis"),
            });
        });
    });
<p style="text-align: left;margin-bottom: 30px;">Please click the button below to start your download</p>
<a onClick="document.title = 'My new title';" id="printbutton" class="pp-button" style="padding: 10px; background-color: #9aab21; color: white; margin-top: 20px;" role="button" href="#">
<span class="pp-button-text">DOWNLOAD THE PDF</span>
</a>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

See: https://github.com/jasonday/printThis/wiki/Styling-Printed-Content#printing-backgrounds

By default, browsers do not print backgrounds to save on ink/toner, but they do not adjust foreground colors. With your CSS, the links are there, they are just white against a white background in the print document:

background-color: #9aab21; color: white;

Remove the background color and change the color of the link, and they will be visible.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!