I'm trying to run jQuery to replace the URLs of some background images in an file, prior to conversion to PDF using Prince.
Well, if I use the usual $(document).ready(function() { ... }; to execute the scripts, I get the following warning, and nothing is executed:
Without it I get the following error and again nothing is executed:
I'm using the latest Prince build available for windows (prince-20161018-win64.zip) via the cli for testing.
I tried to replace jQuery 3.1.1 with older 2.x and 1.x with the same results. I also replaced all my URL replacing code with a simple background color change via jQuery ($('body').css('background-color','#FF0000');). If I enclose it with $(document).ready(function() { ... }; I get the same warning as above and nothing happens. If I use it alone it works.
I also use lodash core 4.16.4, but loading it doesn't change the above behaviour.
Any idea of what is going on?
Well, if I use the usual $(document).ready(function() { ... }; to execute the scripts, I get the following warning, and nothing is executed:
prince: warning: setTimeout called too late
Without it I get the following error and again nothing is executed:
prince: https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:3: error: TypeError: value is not an object
I'm using the latest Prince build available for windows (prince-20161018-win64.zip) via the cli for testing.
I tried to replace jQuery 3.1.1 with older 2.x and 1.x with the same results. I also replaced all my URL replacing code with a simple background color change via jQuery ($('body').css('background-color','#FF0000');). If I enclose it with $(document).ready(function() { ... }; I get the same warning as above and nothing happens. If I use it alone it works.
I also use lodash core 4.16.4, but loading it doesn't change the above behaviour.
Any idea of what is going on?
Edited by Cescone