Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Untick Include Annotation Checkbox by default in PDFTron PrintModal

As per my knowledge, there is no explicit properties given in pdftron to untick Include Annotation Checkbox which is checked by default. You can go to https://www.pdftron.com/webviewer/demo/ and see the print modal by pressing ctrl+P: Print Modal Image

So I am looking for work around in javascript, to make it disaable, having id "include-annotations". The issue is when the code runs, dom object is 'NULL', then after some time that same code works on console.

How to make this trigger when print modal dom gets loaded.

document.addEventListener("keydown", (e) => {
                if (e.ctrlKey && e.code === "KeyP") {
const annotationUncheck = document.getElementById(
                         "include-annotations"
                    ) as HTMLElement;
                    annotationUncheck.click(); 
}
            });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The reason why document.getElementById("include-annotations") is coming up as null, is because Webviewer runs inside an iframe and its components will not be part of the main DOM. To get the checkbox from inside the iFrame and uncheck it, you can use this code:

WebViewer({...}, viewerElement).then(function (instance) {
  const { UI } = instance;
  UI.iframeWindow.document.getElementById("include-annotations").click();
});

Here is the relevant API for getting the iFrame window. https://www.pdftron.com/api/web/UI.html#.iframeWindow

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!