I am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me

Dear ALL,
i am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me solutions.
var myBookFileName ,myBookFileName_temp;
                if ( myFolder != null )
                        var myFiles = [];
                        var myAllFilesList = myFolder.getFiles("*.indd");    
                        for (var f = 0; f < myAllFilesList.length; f++)
                                    var myFile = myAllFilesList[f]; 
                                    myFiles.push(myFile);
                        if ( myFiles.length > 0 )
                                    myBookFileName = myFolder + "/"+ myFolder.name + ".indb";
                                    myBookFileName_temp=myFolder.name ;
                                    myBookFile = new File( myBookFileName );
                                    myBook = app.books.add( myBookFile );  
                                   myBook.automaticPagination = false;
                                    for ( i=0; i < myFiles.length; i++ )
                                               myBook.bookContents.add( myFiles[i] );             
                                    var pdfFile =File(File(myFolder).fsName + "\\"+myBookFileName_temp+"_WEB.pdf");
                                    var bookComps = myBook.bookContents;
                                    if (bookComps.length === 1)
                                                   bookComps = [bookComps];
                                     var myPDFExportPreset = app.pdfExportPresets.item("AER6");
                                    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFEx portPreset,bookComps);
                                  //myBook.exportFile (ExportFormat.pdfType, pdfFile, false);
                                  //myBook.exportFile(pdfFile, false, pdfPref, bookComps);
                                    myBook.close(SaveOptions.yes);      

Change the below line:
app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset,bookComps);
to
app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset);
Vandy

Similar Messages

Maybe you are looking for

  • Importing CDs to iTunes in Mountain Lion:  iTunes is giving all Classical Albums the same title???

    We have started importing our hundreds of CDs into iTunes.  Problem is, iTunes is giving every Classical CD the same title, copying the title of the first Clasical CD we imported.  Any suggestions?

  • CNA 5.8.9 - can't install

    On Windows 7 64-bit Cisco Network Assistant installed with no problem. Virtual machine Windows 2008R2 Enterprise 64bit it's impossible: javaPathString "C:\Program Files (x86)\Cisco Systems\Cisco Network Assistant\packages\runtime-1.53\bin\javaw"   ro

  • Winetricks problem ...

    I'm following the wineappdb tutorial to install Photoshop CS4 demo on linux, what could be the problem ? [[email protected] ~]$ ./winetricks msxml6 gdiplus gecko vcrun2005 ie6 Using native,builtin override for following DLLs: msxml6 Executing

  • OIM LDAP connector for internal WebLogic LDAP?

    Has anyone ever used OIM to manage internal LDAP for WebLogic?  I'm considering it for compliance reasons.    

  • Did the 1.3 update fix anything for anyone?

    Hi all, Until this evening I had a 'freezer' 24" iMac (i.e an iMac that froze constantly with video problems) and as it was new have just returned it to my local Apple store and replaced it. I've re-installed Leopard (clean install) and my apps but n


HashFlare