Strategies for Reading Data into PDF
X/FDF can be imported programmatically.
app.openDoc() will import text and HTML if WebCapture is present.
this.getURL() will import a surprising variety of filetypes (from disk as well
as from the Web)
importTextData() is capable of reading text into a PDF file (with important
ADBC can bring data in from a database.
Acrobat 5.0 importTextData() method will read a variety of file types.
Intended for text only, not binary data.
You must know the first line in the file.
There must be a text field by that name in the front doc.
File will be read line-by-line into the text field.
Termination mechanism not defined by Adobe. You're on your own!
importTextData() has no return value.
One way to terminate is to know in advance how many lines the file has,
and read just that many lines. Another way is to look for a special EOF marker.
// READ A TEXT FILE INTO AN ARRAY:
function getTextFromFile( file, firstLine,lastLine )
var textArray = [firstLine];
// create a dummy field
var field = this.addField(firstLine,
for (var i = 0; field.value != lastLine; i++)
// destroy the dummy field
Copyright 2002 by Kas Thomas. All rights reserved.