Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda