Hi all, I’m trying to embed a dynamic PDF page on my site using the code below and keep on getting “Forbidden”. I have been successful in making the PDF file show in previous pages I have created, but for some reason, I am unable to do so for this website. Is there anything I am missing? Is there some permissions setting that I am unaware of?
Here is the website: https://www.chinoyarchives.com/items/Trilingual-code-switching-using-quantitative-lenses%3A-An-exploratory-study-on-Hokaglish/2016/47
Notice the word “Forbidden” in the iFrame html thing.
Help!
// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;
let source;
console.log (source);
console.log( “1” );
$w.onReady( function () {
console.log (source);
console.log( “2” );
$w( “#dynamicDataset” ).onReady( () => {
source = $w( “#button14” ).link;
let name = source.split( “/” )[ 4 ];
let url = source.split( “/” )[ 3 ];
$w( “#html1” ).src = (https: //docs.wixstatic.com/ugd/${url}?
);
console.log (source);
console.log( “3” );
});
});
// for PDF
console.log (source);
console.log( “4” );
export function button15_click(event, $w) {
let name = source.split( “/” )[ 4 ];
[let](let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
}) [ url = source.split(](let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
}) [“/”](let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
}) [)(let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
}) [3](let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
}) ;](let url = source.split(“/”)[3];
wixLocation.to(https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf
);
console.log (source);
console.log(“5”);
})
[ wixLocation.to(https:](let url = source.split("/")[3]; wixLocation.to(
https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
}) [//docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
})
[ console.log (source);](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
})
[console.log(](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
}) [“5”](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
}) [);](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
})
[}](let url = source.split(“/”)[3];
wixLocation.to(`https://docs.wixstatic.com/ugd/${url}?dn=${name}.pdf`);
console.log (source);
console.log(“5”);
})