2 Replies Latest reply on Dec 15, 2009 1:22 PM by tjprinter

    pdf.transform

    tjprinter Level 1

      I am having trouble with this line erroring with "myPdf1.transform is not a function"

       

      from this

       

       

                  var myPdf1 = myPage.place(File("~/Desktop/" + ordNum + "_JH_" + pageNumber + "_" + advName + "/Proof/"+ ordNum + "_JH_" +                     pageNumber + "_" + advName + "_" + boardNum + "Proof.pdf"));
                  var myTransformationMatrix = app.transformationMatrices.add({horizontalScaleFactor:.03,verticalScaleFactor:.03});
                  myPdf1.transform(CoordinateSpaces.pasteboardCoordinates,[0,0],myTransformationMatrix);
                  myPdf1.move([.7,-1.05]);
                  var myPdf2 = myPdf1.duplicate();
                  myPdf2.move([34,-1.05]);

       

      but this works fine

       

       


                  var myPdf1 = app.selection[0];
                  //var myPdf1 = myPage.place(File("~/Desktop/" + ordNum + "_JH_" + pageNumber + "_" + advName + "/Proof/"+ ordNum + "_JH_" +                     pageNumber + "_" + advName + "_" + boardNum + "Proof.pdf"));
                  var myTransformationMatrix = app.transformationMatrices.add({horizontalScaleFactor:.03,verticalScaleFactor:.03});
                  myPdf1.transform(CoordinateSpaces.pasteboardCoordinates,[0,0],myTransformationMatrix);
                  myPdf1.move([.7,-1.05]);
                  var myPdf2 = myPdf1.duplicate();
                  myPdf2.move([34,-1.05]);

       

      the only difference i can see is in the "var myPdf1 = " line but I don't know what I have done wrong?????