HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML Forums › Technical questions / Troubleshooting › Disable “iframe” execution while exporting to PDF › Reply To: Disable “iframe” execution while exporting to PDF
There are two conversion parameters can be useful for the case. For PD4ML v4.x they are:
https://pd4ml.tech/javadoc/com/pd4ml/Constants.html#PD4ML_DISABLE_EXTERNAL_ATTACHMENTS
https://pd4ml.tech/javadoc/com/pd4ml/Constants.html#PD4ML_ALLOWED_RESOURCE_LOCATION
In PD4ML v4 the external resource restrictions can be set this way:
pd4ml.setParam(Constants.PD4ML_DISABLE_EXTERNAL_ATTACHMENTS, "true"); – completely disables the external attachments
or more precise control with comma-separated list of allowed CSS/image/attachments locations:
pd4ml.setParam(Constants. PD4ML_ALLOWED_RESOURCE_LOCATION, "C:/SafeAttachments/,http://192.168.0.10/styles/,http://192.168.0.10/images/");
There is more-less identical approach to control the external resources availabiliy for PD4ML v3.x
Map m = new HashMap();
m.put(PD4Constants.PD4ML_ALLOWED_RESOURCE_LOCATION, "C:/SafeAttachments/,http://192.168.0.10/styles/,http://192.168.0.10/images/");
pd4ml.setDynamicParams(m);
