I have a few questions regarding setting PDF properties that aren't clear from the documentation.
1. What is the correct way to set PDF properties in JavaScript, by assignment or as a parameter? For example, which of the following is correct:
Option 1:
Option 2:
2. Does it matter at which point PDF properties are set via JavaScript? As I see it there are three options, are these all the same?
Option 1:
Option 2:
Option 3:
3. If I set a PDF property in CSS and then also in JavaScript, which will take effect? For example, what will be the page mode in this scenario (assuming the JavaScript is run):
CSS:
JavaScript:
1. What is the correct way to set PDF properties in JavaScript, by assignment or as a parameter? For example, which of the following is correct:
Option 1:
PDF.pageMode('fullscreen')
Option 2:
PDF.pageMode = 'fullscreen'
2. Does it matter at which point PDF properties are set via JavaScript? As I see it there are three options, are these all the same?
Option 1:
<script>
PDF.pageMode = 'fullscreen'
</script>
Option 2:
<script>
function setPageMode() {
PDF.pageMode = 'fullscreen'
}
window.addEventListener("load", setPageMode, false);
</script>
Option 3:
<script>
function setPageMode() {
PDF.pageMode = 'fullscreen'
}
Prince.addEventListener("complete", setPageMode, false);
</script>
3. If I set a PDF property in CSS and then also in JavaScript, which will take effect? For example, what will be the page mode in this scenario (assuming the JavaScript is run):
CSS:
prince-pdf-page-mode: show-bookmarks
JavaScript:
PDF.pageMode = 'fullscreen'
Edited by jerkob