I want to turn off the loading of external resources (images) during the conversion.
For example, if a .html or .doc(x) file looks like this:
<html>
...
<img src="https://www.somewebsitewithaimage/myniceimage1234.png">
...
</html>
and i convert:
with batch
soffice.exe -headless -nologo -invisible -convert-to pdf "C: \ my.html" - outdir "C: \"
or with C # (. net)
public bool Save (string filename, string filter)
{
List <PropertyValue> pv = new List <PropertyValue> ();
pv.Add (new PropertyValue ("Filter Name", 0, new uno.Any (filter), PropertyState.DIRECT_VALUE));
pv.Add (new PropertyValue ("Overwrite", 0, new uno.Any (true), PropertyState.DIRECT_VALUE));
try
{
filename = filename.Replace ("\ \", "/");
((XStorable) doc) storeToURL ("file :/ / /" + filename, pv.ToArray ());
return true;
}
catch {return false;}
}
then the images are captured from the external source (http) and stored in the pdf. How can I prevent the loading of external content?