Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Anomalie javascript au chargement d'un pdf

New Here ,
Mar 24, 2025 Mar 24, 2025

Bonjour 🙂

 

Avec Adobe Reader, j'obtiens un erreur visible dans la console "TypeError: this.getField(...) is null - 52:Document-Level:code128" et l'affichage devient :

Laurent233019680qvd_0-1742828972086.pngexpand image

Avec d'autres outils, tels que Mozilla Firefox ou Google Chrome, on obtient :

Laurent233019680qvd_1-1742829144745.pngexpand image

Je cherche à trouver la solution pour que cela soit fonctionnel avec Adobe Reader, mais je ne trouve pas la solution !!!

Voici le lien vers ce pdf afin que vous puissiez faire de plus amples tests

 

Merci d'avance pour vos conseils

TOPICS
Crash or freeze , JavaScript , PDF , PDF forms
72
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2025 Mar 24, 2025

The error "this.getField(...) is null" in the Acrobat JavaScript console means that the field you're trying to access does not exist or isn't found.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 24, 2025 Mar 24, 2025

Hi @Laurent233019680qvd,

 

Hope you are doing well. Thanks for writing in!

 

Adding to what Nesa said, try running this command in the console:

console.println(this.getField("FieldCode128"));

 

If it prints null, the field is missing or misnamed.

 

Hope this helps.


Regards,
Souvik.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2025 Mar 24, 2025

Bonjour

 

je comprends bien le sens du message "TypeError: this.getField(...) is null - 52:Document-Level:code128"...
j'ai bien contrôlé plusieurs fois les noms des champs utilisés...

je cherche simplement à reproduire ce que Mozilla Firefox ou Google Chrome ou encore FoxitPDF donnent comme résultat !!!

 

Merci d'avance pour des idées plus avancées !!!

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2025 Mar 24, 2025

Bonjour

En fait ce ce champ existe bien dans la structure du pdf - c'est bien ce qui plante Adobe Reader ou Adobe Acrobat, alors que cela fonctionne avec d'autres outils !!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 24, 2025 Mar 24, 2025
LATEST

There are some errors in your file. In particular the startxref value is incorrect and the xref keyword is not on a line by itself as it should be. (There may be other errors, too, but these leapt to the eye.)

You should fix the PDF and try again.

 

PS: The value entry in the ref field object is completely broken:

/V <FEFF00540044002D0032002D0041002D003300310030002D00300033>ref])

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines