116
©Nitro
AddoreditfolderlevelJavaScript
FolderlevelJavaScriptsareJavaScriptfiles(.JS)thatarerunduringapplicationstartup.Thesecanbe
usefulforloadingreusableJavaScriptfunctionsintotheapplication,oraccessingmethods/properties
whosesecurityrestrictionsonlyallowthemtoberunintheapp/initevent.
Simpleexamplesincludeloadingtheuser'sWindowsloginintoaglobalJavaScriptvariableatstartup,or
loadingalistofemployeenamesfromyourcompanyintoaJSarrayatstartupwhichcanbeusedbythe
formsthatareopenedinNitroPro8.
ToaddoreditafolderlevelJavaScript
1. OpenNitroPro8
2. OntheFormsribbontab,intheJavaScriptgroup,clickFolderLevel
3. AddJSfilestothefolderoreditexistingones
NitroPro8-UserGuide
Pdf split pages - Split, seperate PDF into multiple files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Explain How to Split PDF Document in Visual C#.NET Application
pdf separate pages; pdf splitter
Pdf split pages - VB.NET PDF File Split Library: Split, seperate PDF into multiple files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Splitter Control to Disassemble PDF Document
break a pdf password; combine pages of pdf documents into one
117
©Nitro
DocumentlevelJavaScript
YoucanuseJavaScripttoaddanalmostinfinitenumberofinteractivefeatures,createcomplexcalculation
formulas,andaddmoredynamicfunctionalitytoyourPDFs.
Documentlevelscriptsareusedtoaddfunctionsfromwhichotherscriptscanreuseroutinesthroughout
aPDFfile.YoucanalsousedocumentlevelJavaScriptstoinvokeactionswhenafileopens.
TowriteadocumentlevelJavaScript
1. OpenthePDFinNitroPro8
2. OntheFormsribbontab,intheJavaScriptgroup,clickDocumentLevel
3. ClickNew,andtypeanamefortheJavaScript
4. IntheJavaScriptEditordialog,enteryourcode.Intheexamplebelow,asimpleroutineiscreated
thatopensanalertdialogboxeachtimethefileopensThecodeusedis:
var msg = “Created in Nitro Pro”;
app.alert(msg);
5. ClickOK.Ifyourscriptwaswrittenproperly,adialogboxshoulddisplayeachtimethefileisopened
NitroPro8-UserGuide
C# PDF Page Insert Library: insert pages into PDF file in C#.net
files by C# code, how to rotate PDF document page, how to delete PDF page using C# .NET, how to reorganize PDF document pages and how to split PDF document in
pdf no pages selected; break up pdf into individual pages
VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.
Page: Delete Existing PDF Pages. |. Home ›› XDoc.PDF ›› VB.NET PDF: Delete PDF Page. How to VB.NET: Delete Consecutive Pages from PDF.
break pdf into smaller files; pdf print error no pages selected
118
©Nitro
AddoreditcustomcalculationJavaScript
Anyformyoucreatethatrequirescalculationsislikelytorequirecustomcalculationscripts.Theoptions
youhaveavailablewithpresetcalculationformulasarelimitedtosimplemultiplicationandaddition.
Otherkindofcalculationyouneedrequireswritingascript.
Towriteacalculationscript
1. OpenthePDFinNitroPro8
2. OntheFormsribbontab,intheFieldsgroup,clickTextField
3. Selectthetextfieldtoedit
4. Right-clickandselectProperties
5. ClicktheCalculatetab
6. ClicktheCustomcalculationscriptoption,andthenclicktheEditbutton
7. Typethecodeforyourscript.Intheexamplebelow,asimpleroutineiscreatedtocalculatesales
taxata7.25%rate.Thecodeusedis:
var f = this.getField(“subtotal”);
event.value = Math.round(f.value 7.25)/100;
8. ClickOK
NitroPro8-UserGuide
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
Page: Insert PDF Pages. |. Home ›› XDoc.PDF ›› VB.NET PDF: Insert PDF Page. Add and Insert Multiple PDF Pages to PDF Document Using VB.
add page break to pdf; split pdf into individual pages
C# PDF Page Delete Library: remove PDF pages in C#.net, ASP.NET
Page: Delete Existing PDF Pages. Provide C# Users with Mature .NET PDF Document Manipulating Library for Deleting PDF Pages in C#.
break up pdf into individual pages; pdf file specification
119
©Nitro
Addasimplifiedfieldnotation
SimplifiedfieldnotationiswrittenmorelikeformulasyouaddinspreadsheetapplicationslikeMicrosoft
Excel.Writinganotationisoftenaneasiersolutionwhenaddingcalculationscripts.
ToaddaSimplifiedfieldnotation
1. OpenthePDFinNitroPro8
2. OntheFormsribbontab,intheFieldsgroup,clickTextField
3. Selectthetextfieldtoedit
4. Right-clickandselectProperties
5. ClicktheCalculatetab
6. ClicktheSimplifiedfieldnotationoption,andthenclicktheEditbutton
7. Typethecodeforyourscript.Inthisexample,thesamecalculationforcreatingsalestaxisadded.
ThecodeintheJavaScriptEditoriswrittenasfollows:
subtotal .0725;
8. ClickOK
NitroPro8-UserGuide
C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
C# File: Merge PDF; C# File: Split PDF; C# Page: Insert PDF pages; C# Page: Delete PDF pages; C# Read: PDF Text Extract; C# Read: PDF
break pdf documents; break a pdf password
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
C#.NET PDF Library - Copy and Paste PDF Pages in C#.NET. Easy to C#.NET Sample Code: Copy and Paste PDF Pages Using C#.NET. C# programming
break apart pdf pages; break apart a pdf
120
©Nitro
UsetheJavaScriptconsole
YoucanopentheJavaScriptConsoleandwriteascriptthatdoesn’tbelongtoanyfieldorelement.Scripts
writtenintheJavaScriptConsolecanbeusedtotestroutinesanddebugcode.
TousetheJavaScriptconsole:
l
OntheFormsribbontab,intheJavaScriptgroup,clickConsole
NitroPro8-UserGuide
VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.
Page: Extract, Copy, Paste PDF Pages. |. Home ›› XDoc.PDF ›› VB.NET PDF: Copy and Paste PDF Page. VB.NET PDF - PDF File Pages Extraction Guide.
acrobat split pdf pages; break apart a pdf file
C# PDF Page Rotate Library: rotate PDF page permanently in C#.net
featured with the functions to merge PDF files using C# .NET, add new PDF page, delete certain PDF page, reorder existing PDF pages and split PDF document in
break pdf into pages; split pdf files
121
©Nitro
ViewoutputandJavaScripterrors
TheOutputPaneallowsyoutoviewanyerrorsrelatedtoJavaScriptordocumentprocesses,andwillopen
automaticallytoalertyouofanyimportantoutputmessages.
ToopentheOutputpane:
l
Onthesidebar,clicktheOutputtab
NitroPro8-UserGuide
122
©Nitro
SupportedJavaScriptObjects
l
App
object
l
Color
object
l
Console
object
l
Event
object
l
Field
object
l
Global
object
l
Identity
object
l
Link
object
l
This
object
l
Util
object
l
OCG
object
NitroPro8-UserGuide
123
©Nitro
Appobject
AstaticobjectthatrepresentsthePDF viewerapplication.
Containsmethodsandpropertiesforinterfacingwiththeapplicationaswellassomeforworkingwith
activedocuments.
Example:Getsthenumberofdocumentsopenanddisplaysitinanalertmessage.
var nDocs = app.activeDocs.length;
app.alert("You have " + nDocs + " documents open.");
Properties
activeDocs
formsVersion
platform
viewerType
viewerVersion
Methods
alert
browseForDoc
goBack
goForward
launchURL
mailMsg
newDoc
openDoc
response
NitroPro8-UserGuide
124
©Nitro
Colorobject
AnobjectthatcanbeusedwhensettingacolorinotherJavaScriptmethodsandproperties.
Example:Setsthetextcolorintheformfield“FirstName”tored.
this.getField("First Name").textColor = color.red;
Properties&Methods
ThecolorobjectsupportsallpropertiesandmethodsincludedintheAcrobatJavaScriptspecification.
NitroPro8-UserGuide
125
©Nitro
Consoleobject
AllJavaScriptscriptsareexecutedastheresultofaparticulareventoccurring.Foreachoftheseevents,
JavaScriptwillcreateaneventobjectthatcanbeusedtogetandupdateinformationaboutthecurrent
stateoftheevent.
Example:ExecutingthisJavaScriptonthekeystrokeeventwillchangeanyinputfromtheuserto
uppercase.
event.change = event.change.toUpperCase();
Properties&Methods
TheconsoleobjectsupportsallpropertiesandmethodsincludedintheAcrobatJavaScriptspecification.
NitroPro8-UserGuide
Documents you may be interested
Documents you may be interested