michaelrsweet/htmldoc

Link not working

Closed this issue · 13 comments

My hyperlink is showing in red and underlined, but is not clickable.

Please provide an example HTML file and the command you are running. Also, what version of HTMLDOC?

Version 1.8.28

<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Expires" CONTENT="-1">
    <meta http-equiv="Cache-Control" CONTENT="no-cache">
    <meta http-equiv="Pragma" CONTENT="no-cache">
    <title>Approved MIS Products: Menu Card</title>
    <link rel="stylesheet" type="text/css" href="/js/niftyCorners.css">
    <link rel="stylesheet" type="text/css" href="/js/niftyPrint.css" media="print">
    <script type="text/javascript" src="/js/nifty.js"></script>
    <link rel="stylesheet" type="text/css" href="/apps/kilwins_store/s16.css" media="print">
    <link rel="stylesheet" type="text/css" href="/apps/kilwins_store/p3.css" media="print">
    <link rel="stylesheet" type="text/css" href="/apps/kilwins_store/shadowBox.css" media="print">
  </head>
  <body>
    <table width=100%>
      <tr width=100%>
        <td colspan=4 align="left">&nbsp;</td>
      <tr> 
      <tr>
        <td width=68%>&nbsp;</td>
        <td width=10% colspan=1 align="right"><font face="Helvetica" size="2px" color="659EC9"><b></b></font></td>
        <td width=5%>&nbsp;</td>
        <td width=5%>&nbsp;</td>
      </tr>
      <tr><td><b>Turtle Sundae</b></td>
        <td align="right">1270&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">9.99</td>
      </tr>
      <tr>
        <td>Kilwins  Old-Fashioned Vanilla Ice Cream, served in a </td>
      </tr>
      <tr>
        <td>hand-crafted Waffle Bowl with Kilwins  Hot Fudge & Caramel </td>
      </tr>
      <tr>
        <td>Toppings, with pecan pieces, sprinkled over whipped cream & </td>
      </tr>
      <tr>
        <td>topped with a cherry!<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr><td><b>Tin Roof Sundae</b></td>
        <td align="right">1200&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">8.99</td>
      </tr>
      <tr>
        <td>Kilwins  Old-Fashioned Vanilla Ice Cream served in a </td>
      </tr>
      <tr>
        <td>hand-crafted Waffle Bowl, drizzled in Kilwins  Chocolate </td>
      </tr>
      <tr>
        <td>Syrup with whipped cream & a cherry. Roasted, salted peanuts</td>
      </tr>
      <tr>
        <td>top off this classic!<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr><td><b>Dusty Miller Sundae</b></td>
        <td align="right">920&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">8.99</td>
      </tr>
      <tr>
        <td>Kilwins  Old-Fashioned Vanilla Ice Cream served in a </td>
      </tr>
      <tr>
        <td>hand-crafted Waffle Bowl, drizzled in Kilwins  Chocolate </td>
      </tr>
      <tr>
        <td>Syrup, topped with whipped cream, a cherry, then dusted with</td>
      </tr>
      <tr>
        <td>Kilwins  Malt Powder!<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr><td><b>Hot Fudge Sundae</b></td>
        <td align="right">610&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">5.99</td>
      </tr>
      <tr>
        <td>Our Old-Fashioned Vanilla Ice Cream with Kilwins  Hot Fudge </td>
      </tr>
      <tr>
        <td>Topping, whipped cream & a cherry.<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr><td><b>Hot Caramel Sundae</b></td>
        <td align="right">610&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">5.99</td>
      </tr>
      <tr>
        <td>Our Old-Fashioned Vanilla Ice Cream with Kilwins  Hot </td>
      </tr>
      <tr>
        <td>Caramel Topping, whipped cream & a cherry.<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr><td><b>Chocolate Sundae</b></td>
        <td align="right">550&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td align="right">$</td>
        <td align="right">5.99</td>
      </tr>
      <tr>
        <td>Our Old-Fashioned Vanilla Ice Cream with Kilwins  Chocolate </td>
      </tr>
      <tr>
        <td>Syrup, whipped cream & a cherry.<br></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      </table>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr width=100%>
        <td colspan=4 align="center">
          <A href="https://www.kilwinsfranchise.com">Own a Store</A>
        </td>
      </tr>
    </table>
  </body>
</html>

menu_card_tmp_0051217.txt
This one is just in case you need it in text.

OK, so to start with HTMDOC 1.8.28 is ancient and not something I can really help you troubleshoot.

I'm assuming the "Own a store" link is the one you are talking about? What options are you using when you run the HTMLDOC command?

    tmp = HTMLDOC('--webpage','--quiet','--pagelayout','one','--left','.5in','--right','.5in','--top','1.10in','--bottom','.5in','--footer','...','--fontsize','11','fontspacing','.8','--header','...','--headfootsize','8','--headfootfont','Helvetica','--browserwidth',browserWidth,'--bodyimage',t_image,'--bodyfont','Helvetica','--links','--linkstyle','plain','--linkcolor','red','--datadir',mc_pp+'/system/htmldoc','-f',pdf_fl_tmp,htm_fl)

This is how the PDF is being created and everything works except the abillity to click the link. The link is red.

I can schedule time to update HTMLDOC to a newer version, but didn't see anything relating to link issue updates in new versions.

I tried it with the current HTMLDOC and the link works but the table is missing for some reason...

Ah, a typo in the HTML (missing close tag for the first row).

Shouldn't have any issues upgrading on Red Hat.

Okay, what about the call to HTMLDOC executable in linux and how that is run.

From Linux command I type htmldoc --version and it returns: 1.8.28

From my application I call tmp=HTMLDOC('--version') and it returns: 1.8.27

Not sure why the linux extension is doing this.

I'm not sure what language or add-on you are using for your application, but it looks like it might have embedded its own version of HTMLDOC separate from the installed command.