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

Create a log file

Explorer ,
Jul 27, 2021 Jul 27, 2021

Hi guys, 

 

I'm trying to create a log file in AdobeJS but I can't. Anybody can help me? I need create a log file (similar to file.log) in my machine and I want to write in this file some sentences to audit my adobe javascript code (similar to log4j).

 

Best regards!

TOPICS
Acrobat SDK and JavaScript
576
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
LEGEND ,
Jul 28, 2021 Jul 28, 2021

Adobe devoted a lot of time and trouble to making sure Acrobat JavaScript can't write files. How about writing to the console?

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
Explorer ,
Jul 28, 2021 Jul 28, 2021

Thanks for the reply, the problem is I want create a log file to audit the process and have a file with some important information to validate if my adobe form opens ok, validates ok and save in the correct path. Is it possible?

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 ,
Jul 28, 2021 Jul 28, 2021

In Adobe Acrobat you can create a report with javascript.

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
Explorer ,
Jul 28, 2021 Jul 28, 2021

Thanks for the reply but how? How I create this log file in javascript? Best regards

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 ,
Jul 28, 2021 Jul 28, 2021

Info about creating a report is available in the Acrobat Javascript Reference.

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
Explorer ,
Jul 29, 2021 Jul 29, 2021

Thank you @Bernd Alheit , it works now!

 

Do you know if I can declare a global variable (myReport) and use it in some parts of my form?

 

Best regards

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 ,
Jul 29, 2021 Jul 29, 2021

Yes.

E.g. at document open:

var rep = new Report();

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
Explorer ,
Jul 29, 2021 Jul 29, 2021
LATEST

Can you tell me how do it? Thanks

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