Try this:
In the following line of script:
"make picture box at beginning with properties ¬
{bounds:{"0" - DocBleedSize, "0" - DocBleedSize, DocSizeHeigth + DocBleedSize, DocSizeWidth + DocBleedSize}, color:"White"}"
remove the color attribute while creating picture box. Most probably this will resolve your problem.