[OEM-255] added ability to inject js into the generated PDF to avoid race conditions when triggering iframe printing.