How to calculate DUE DATE in Adobe Acrobat with PDF Javascript

Publié le: 29 décembre 2022
sur la chaîne: SAR Solutions
2,114
23

In this video, I'm going to show you How you can calculate DUE DATE in PDF Form and PDF Document with PDF JavaScript. I'm using Adobe Acrobat Pro DC 2023.

First, we need to create two Javascript for calculating the due dates of a certain number of days and Months. I have shown every single step in the video, just follow as shown.
________________________________________________________________________
If you still facing any problems, Let me know in the comment box down below.

For more videos, Subscribe to our channel:    / @sarservices  
________________________________________________________________________

How to create a dependent Dropdown menu in adobe acrobat
   • How to create Multiple Dependent Drop...  

Create an auto-calculating PDF INVOICE in adobe acrobat
   • Create PDF Invoice With Auto calculat...  

How to add checkboxes and run Javascript in Adobe Acrobat
   • How to add checkbox and run Javascrip...  

________________________________________________________________________
JAVASCRIPT:

For Days:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var theTime = d.getTime () ;
var oneDay = theTime + 5*24*3600*1000;
var dd = new Date(oneDay);
event.value = util.printd("dd mmmm yyyy", dd);

For Months:
var d = util.scand("dd/mm/yyyy", this.getField("Date").valueAsString);
var cMonth = d.getMonth() + d.getFullYear() * 12;
d.setMonth(d.getMonth() + 1);
var diff = d.getMonth() + d.getFullYear() * 12 - cMonth;
if (diff != 1) {
d.setDate(0);
}
event.value = util.printd("dd mmmm yyyy", d);


Sur cette page du site, vous pouvez voir la vidéo en ligne How to calculate DUE DATE in Adobe Acrobat with PDF Javascript durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SAR Solutions 29 décembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,114 fois et il a aimé 23 téléspectateurs. Bon visionnage!