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

  • Best way to handle text files in OD10g

    We have a requirement to store reports in text format into a database field, to be able to view the reports, and to print them if desired using Forms 10g. What is the best way to handle this? - define the field in the database as clob or blob? - if C

  • Itunes wont start unknown error (-69) and cyclic redundancy check

    I use an ipod shuffle and am on itunes 6 (or 6.1 maybe) on my windows compaq presario laptop. I was burning a number of disc from itunes and all seemed ok. The shut the computer down and the next day came to do the same thing and itunes wouldn't star

  • Why is the service SO bad?

    I have been a Verizon Customer for over 10 years, and lately the services are getting so bad that I most likely will be going to another carrier at the end of my contract. 1)     Over the past 2 years, I have noticed more and more dead areas, where I

  • Can File Adpater read EBCDIC file on the sender side

    Hi , I Have file to Proxy scenario and on the sender side I have EBCDIC file can file adpater can read it into normal text format can any one suggest me how to encode the file Thanks Inadvance Byee

  • How can I turn off the startup chime on my new iMAC (Intel based)?

    Hi, Every time I turn on my iMac the startup chime is very loud.  It doesn't matter whether I lower or mute the volume prior to shutting it down, the startup chime volume is unpredictable.  Is there any way possible to control it without having to do


HashFlare