PDF's cross-platform nature makes it very portable, but it also means that there is a multitude of different software environments, preference settings and hardware configurations to be found in the potential audience of any widely distributed document. For this reason, it can be really useful to run some JavaScript that checks these things and modifies the behavior of the PDF accordingly.
This is a piece of code that I find particularly useful for consumer or customer documentation -- basically, it checks the user's screen resolution. This information can then be used in a number of ways, but one would be setting a document's initial zoom level based on the user's screen resolution (e.g. If the screen resolution is 800x600 or below, set the document zoom to 65%, but if the screen resolution is above 800x600, set the zoom level to 100%.)
Run this code at document open using document level JavaScript (more on document level JavaScript here.)
// get object representing the primary monitor
var monitors = app.monitors.primary();
// returns an array that represents the monitor's boundaries
var res = monitors[0].rect;
// check if resolution is higher than 800x600
if(res[2] > 800 && res[3] > 600)
{
// set document zoom to 100%
this.zoom = 100;
}
else
{
// set document zoom to 65%
this.zoom = 65;
}
Despite the numerous benefits, there can be potential issues with the conversion of paper documents into electronic archives. When scanning paper pages into PDF, it's possible to end up with the odd- and even-numbered pages in separate PDF files. It can be very time-consuming to collate them manually, but there is an easier way. Sean Stewart explains.
BCL easyPDF SDK is a set of PDF Programming Libraries designed specifically to help Software Developers / Programmers build and deploy enterprise class PDF applications for corporate wide PDF...