Accessing local files in the html file is not working

I have a sample html file and a local test.log file referenced in it. when opening this html file in google chrome rendering the data from the test.log file but Libre office is not rendering the data from test.log file ?
Is there any setting that can change this behavior ?

Please remove .pdf extension in the attached files as I am not able to attach .html and .log files , I just appended with .pdf

test.html.pdf (134 Bytes)
test.log.pdf (78 Bytes)

Side note: Links should include the transfer protocol. For local files that should be “file:”
I see that Chrome opens and renders the local file, but Firefox does not. With the protocol spec added, it also works in Firefox.
I have not tested in other browsers.
I am not soure whether I’d consider the Chromium (seemingly) assumption a feature or a bug. I guess it depends on the html spec for this type of object linking.


Edit: I see now that the purpose seems to be web page rendering, not creation/editing, so the addition of protocol identifier, by Writer or text editor, is less relevant. Many file converters exist. The ones I tried (SwifDoo and NCH Doxillion) do not support the linking to external object as it appears in your files, and neither with the “file:” addition.

I suspect the answer is going to be LibreOffice isn’t a web browser and doesn’t intend to incorporate the full range of abilities of one. It does include the ability to save documents as html in a limited manner but incorporating the full web standards is beyond the scope of the project at this time.

1 Like

Can we speicify a URLBlocklist for Libreoffice, for it’s processing of HTML/HTM files ? I don’t want to access any external links when processing the html files using LO

You don’t access “external files” while you’re in Writer unless you Ctrl-click on a link.

Writer offers you a (somewhat limited) way to edit your HTML file. Unless you want to heavily “style” your web page under the usual Writer approach (which then translates into CSS), you’re better off with a text editor or a dedicated HTML application.

@ajlittoz Thank you for your response. Do we have any security features in LO specific to HTML file processing ?

What do you mean? Writer does not act as a server. It renders you edit-in-progress document according to HTML rules. Full stop. Only you see this result, no network traffic unless you open an hyperlink. And in that case, the open command is sent to your web browser.

I am intrested in converting html files to pdf using Libre office, in that case, what happens if the html file contains some external links ?

Do this with your web browser. It is much simpler and reliable.

Most OSes allow to print to PDF file instead of a physical printer. You’ll get a PDF representation of the page. Hyperlinks may or may not be kept depending on your preferred selection of options in the print dialog.

we are already using libre office command line convert-to-pdf for other documents (like all office documents), so we wanted to use it for html files as well. we don’t have access to browsers in our Linux machines.