Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I have a "Name" field on many worksheet pages which I want automatically filled in with a particular student's name when printing. I know in InDesign I can just create a master page that those worksheet pages use and fill in the name of the student there.

I'd like to have a PDF of the worksheet pages where I just enter the name in the PDF viewer instead of having to do this through InDesign. Is this possible?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

You could just add a header with the student's name. That would automatically appear on every page. I can't think of a faster way to do this in Acrobat offhand, if you're dealing with lots of pages.

You can set up a header Action (Tools > Action Wizard) ahead of time with everything but the student's name, then add the name for each print run.

share|improve this answer
    
Sorry, took a while to respond, but this is what we just now ended up doing. Thanks for the tip! –  at. Jun 22 '12 at 17:18
add comment

PDFs support fillable form fields, so this is pretty easy to do in Acrobat. But if you want to use InDesign, you typically need to design the form, then use Acrobat to replace the placeholder elements with actual form fields. This page describes the workflow.

Luckily, as mentioned on the same page, Acrobat 9 has an automatic form field detection feature. Adobe has published a set of guidelines to follow to create recognizable form fields. Additionally, here's a PDF of form field recognition best practices.


Edit:

If you need to repeat a field value in multiple places, both LifeCycle and Acrobat allow you to simply duplicate or copy-and-paste the field to different locations/pages. Make sure to set the binding to "Global" in LifeCycle to get the fields to all show the same value. In Acrobat, you just need to make sure all the fields have the same name.

share|improve this answer
    
I don't think this is what I need. If I only had 1 Name field, this would work. But I have MANY Name fields that all need to be filled in at once. –  at. Apr 10 '12 at 16:39
add comment

You can do it with scripting. I've tried an tested this script in InDesign CS5 on a Mac, What you need to do is

  • Select which text box you want the students' name to go in
  • Then under the 'layers' panel, expand the layer it is in, and change the name of the text box by slow double clicking it, and enter "NAME"
  • Copy and paste the script below in notepad or textedit
  • Edit the first line to var students = ["First Student", "Second Student"]; etc. (Hopefully this doesn't take longer than if you were not to use the script)
  • Save as MakePdfForEachStudent.jsx and save it in /Applications/Adobe InDesign CS5.5/Scripts/Scripts Panel/Samples/Javascript if you're on Mac (I can't remember where it is on Windows)
  • Go to Window > Utilities > Scripts and select MakePdfForEachStudent.jsx
  • Follow the process

Hope this helps/works. I may improve this answer later.

// An InDesign CS5 javascript macro for exporting PDFs with different student names.

var students = ["Peter", "Lois", "Meg", "Chris", "Brian"];
var studentsNameTextLayer = "NAME";

// DON'T EDIT BELOW THIS LINE

// Display a "choose folder" dialog box.
if (app.documents.length != 0) {
    var myFolder = Folder.selectDialog ("Choose a Folder");
    if (myFolder != null) {
        myExportPages(myFolder);
    }
} else {
    alert("Please open a document and try again.");
}

function myExportPages(myFolder)
{
    var studentName, myFilePath, myFile;

    var myDocument      = app.activeDocument;
    var myDocumentName  = myDocument.name;
    var theDialog       = app.dialogs.add();
    var myPageName      = myDocument.pages.item(0).name;
    var textBoxName     = myDocument.pages.item(0).textFrames.item(whichTextBox);

    with (theDialog.dialogColumns.add().dialogRows.add()) {

        staticTexts.add({
            staticLabel: "Base name:"
        });

        var myBaseNameField = textEditboxes.add({
            editContents : myDocumentName, 
            minWidth : 160
        });
    }

    var myResult = myDialog.show({
        name : "ExportPages"
    });

    if (myResult == true) {
        var myBaseName = myBaseNameField.editContents;

        // Remove the dialog box from memory.
        theDialog.destroy();

        for (var loopCounter = 0; loopCounter < students.length; loopCounter++) {
            studentName = students[loopCounter];

            studentsNameTextLayer.contents = studentName;

            app.pdfExportPreferences.pageRange = myPageName;

            var matchColon  = new RegExp(":","gi");

            myPageName  = myPageName.replace(matchColon, "_");
            myFilePath  = myFolder + "/" + myBaseName + "_" + myPageName + "_" + studentName + ".pdf";
            myFile      = new File(myFilePath);

            myDocument.exportFile(ExportFormat.pdfType, myFile, false);
        }

    } else {
        theDialog.destroy();
    }
}
share|improve this answer
3  
Adam, welcome indeed to GD.SE. You are officially appointed InDesign Script Guru. :) (Seriously, you're immediately a great asset to our community, so I do hope you'll visit often!) –  Alan Gilbertson Apr 13 '12 at 5:48
    
Thanks Alan, will sure do. Scripting with Creative Suite is my specialist area –  Adam Elsodaney Apr 16 '12 at 22:59
1  
And, clearly, you have that amazing scripter trait of being super-helpful to passing strangers, stray animals, and birds that have fallen out of their nests. It must be something in the code... :) –  Alan Gilbertson Apr 16 '12 at 23:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.