Chrome-pdf recipe : hyperlink hover styling is not working



  • I am converting html to pdf using chrome pdf recipe. In my pdf I have few hyperlinks, and I want change the color of the hyperlinks when user hovers the mouse.

    here is the html and the css which I am using.

    html:

     <div class="header-cell product">
                <a href="https://forum.jsreport.net/unread" target="_blank">  
                   jsreport forum
                </a>
            </div>
    

    css:

    .header-cell {
        min-width: 220px;
        max-width: 220px;
        position: sticky;
        border-right: 1px solid #E2E8F0;
        border-bottom: 1px solid #E2E8F0;
        padding: 0 5px;
    }
    
    .product {
        display: flex;
        box-sizing: border-box;
        min-width: 185px;
        max-width: 185px;
        font-weight: bold;
        border-right: 1px solid #E2E8F0;
        border-top: 1px solid #E2E8F0;
        border-bottom: 1px solid #E2E8F0;
        background: #F5F8F9;
        font-family: Lato, Gotham, Helvetica, Arial;
        font-size: 14px;
    }
     a:link {
      text-decoration: none;
     color:#636363;
    }
     a:visited {
      text-decoration: none;
      color:#636363;
    }
     a:hover {
      text-decoration: underline;
      color: #F26722;
      
    }
     a:active {
      text-decoration: underline;
      color:#636363;
    }
    


  • Chrome unfortunately ignores the hover style when printing pdf.
    This needs to be done likely using Adobe javascript events, this is problematic because it may not work in different pdf viewers.
    If it is possible, may be better to skip this.



  • Is there any sample ? I just wanted give a try.



  • I don't know about an existing example, unfortunately.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.