# Avoid HTML Export error in 11.2?

Posted 9 months ago
1082 Views
|
6 Replies
|
4 Total Likes
|
 The following piece of code worked fine in Mathematica 11.1: notesgrid = Text[Grid[{{ Hyperlink["pdf link 1", "notes-1.pdf"]}}]] Export[FileNameJoin[{NotebookDirectory[], "notes.html"}], notesgrid]; But in 11.2 it fails to produce the hyperlink in the html source code (it doesn't create the tags), though the link does appear in the Mathematica output cell.Is this a known problem? Is there a workaround (other than going back to 11.1)?
6 Replies
Sort By:
Posted 9 months ago
 I confirm that with Mathematica 11.2.0 on Windows 7 x64 the text "pdf link 1" in the exported web page is converted to a GIF image which isn't a hyperlink. I recommend reporting this to the tech support as a bug. The expected behavior is to get the exported Hyperlink as a hyperlinked text, not as an image of text.
Posted 9 months ago
 A related bug: Unfortunately the workaround suggested in that thread doesn't work in this case.It is also worth to note that exporting such a little expression takes a lot of time on my machine: about 10 seconds, what isn't appropriate.
Posted 9 months ago
 A little known trick is to use the same HTML exporter that the cloud uses: notesgrid = Grid[{{Hyperlink["pdf link 1", "notes-1.pdf"]}}]; Export[FileNameJoin[{NotebookDirectory[], "notes.html"}], notesgrid, "HTMLFragment", "FullDocument" -> True] I removed Text because it's not yet supported, and stuff is styled as Text by default by this exporter anyway.
Posted 9 months ago
 Carlo, thanks for the tip/trick but what I need are: 1) the image that Export creates and 2) the html code ( tags, etc) so that I can use them to build my website (I create a large table that has pdf links).As Alexey suggests, I think I will report this as a bug and just do this exporting in 11.1 until it gets fixed.