HTML import without changing font

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
martinrame
Posts: 14
Joined: Tue Dec 13, 2016 10:07 pm

HTML import without changing font

Post by martinrame »

Hi, I'm importing very simple HTML documents using insertDocumentFromURL, but noticed the imported HTML files use Times New Roman font while the main document uses another one, is there a property in the HTML filter to allow me to use the same font as the main document?.
LibreOffice 7.1 on FreeBSD 12.2
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: HTML import without changing font

Post by JeJe »

Don't know, but you can easily apply it afterwards:

Code: Select all

oCurs.insertDocumentFromURL(YourURL,array())
oCurs.charfontname = fontnameyouwant
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply