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

Advertisement

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);      

Advertisement

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

October 11, 2015

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

TS3694 I have tried to install the latest version of itunes to my PC on Windows Vista & I keep getting - Runtime Error! R6034 & itunes will not open I have tried re installing but it is the same

I have tried to install the latest version of itunes to my PC on Windows Vista & I keep getting - "Runtime Error!" R6034 & itunes will not open. I have tried re-installing itunes but it is the same.....any advice?Try the following user t

Pls help, im trying to update/restore my iphone but i am getting an error message., An unknown error occured. (1015).. What should i do?

Pls help, im trying to update/restore my iphone but i am getting an error message., An unknown error occured. (1015).. What should i do???Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software.

I-Photo won't open even though I have upgraded to OS X Yosemite and downloaded the I-Photo upgrader.  The upgrades indicate they were successful but I still get an error message when I try to open I-Photo telling me I need to prepare the library

I-Photo won't open even though I have upgraded to OS X Yosemite and downloaded the I-Photo upgrader.  The upgrades indicate they were successful but I still get an error message when I try to open I-Photo telling me I need to prepare the libraryI-Pho

HT1766 I backed up to my PC and attempted restore but I keep getting an error message that "iTunes could not restore the iPhone because not enough free space is available." I have a 32GB iPhone; only 13GB used!!!  HELP!  iCloud backup/restore did not work

I backed up to my PC and attempted restore but I keep getting an error message that "iTunes could not restore the iPhone because not enough free space is available." I have a 32GB iPhone; only 13GB used!!!  HELP!  iCloud backup/restore did not w

Hi there I have updated to your lates version but every time I open up the browser and new windows I get this error message 'TypeError: Components.classes[cid] is undefined' although it does work but the message is very annoying

Question Hi there I have updated to your lates version but every time I open up the browser and new windows I get this error message 'TypeError: Components.classes[cid] is undefined' although it does work but the message is very annoyingThis issue ca

I have the new iPad and I could not use I tunes , every time I get an error says "cannot connect to itunes store " please help

I have the new iPad and I could not use I tunes , every time I get an error says "cannot connect to itunes store " please helpSorry, yes iTunes on your computer. When I updated my iPad 3 and iPod Touch 4th generation to iOS 6 a few months back,

Initially stating No authorization required using Adobe.  When I try to change it so I can transfer downloaded books by my Nook e-reader it I get an error message stating the Adobe user name and password is associated with another computer.  What gives?

When I set up Adobe reader on my computer to be able to download books from a library and then transfer to my Nook e-reader, I initially stating No authorization required using Adobe.  When I try to change it so I can transfer downloaded books by my

I'm trying to email a photo from my iPhoto album, but I'm getting an error message that says "The email server didn't recognize your username/password combination." Any ideas?  I can't find any help in Apple on-line support.

I'm trying to email a photo from one of my iPhoto albums, however I'm getting an error message that says "The email server didn't recognize your username/password combination." Any ideas?  I can't find any help in Apple on-line support.Never min

I almost complete uploading a 32 page iPhoto book, on a number of occasions when I get an error message stating "An error occurred uploading your order" can anyone tell me why and provide a solution please?

I am having problems uploading a photo book from my MacBook Pro!!! I almost complete uploading this 32 page iPhoto book when I get an error message stating "An error occurred uploading your order" This error message has occurred for each of my f

I am trying to send pictures to facebook but I keep getting an error message. (facebookErrDomainerror10000.)

I am using iPhoto and am haing difficulty adding my pictures to FB.  Each time I try to load picture I get an error message.  (facebookErrDomainerror10000.)  It doesn't matter if I try to download only on or many pictures.  Can someone help me to fix

I want to move my iphoto libarary but i am getting an error message that says there is already a folder with that name - there is not.

I want to copy my iphoto library to an external hard drive but when i drag and drop it there i get an error message that says there is already a file with that name - i am not sure what to do next?!  i have tried changing the name of the file - and s

I have tried uninstalling and reinstalling Firefox several times. Every time I try to open Firefox I get an error message saying "Close Firefox"," A copy of Firefox is already open. Only one copy of Firefox can be open at a time."

I uninstall Firefox, then reinstall Firefox, try to open Firefox, and get an error message in a popup box saying, "Close Firefox" "A copy of Firefox is already open. Only one copy of Firefox can be open at a time."Create a new profile

I am trying to set the airport express with a printer; everything looks fine but I keep getting an error message, any tips??

Do you know where the error message is coming from? All the set ups looks fine. Do you think I should reset everything and start from scratch? Cheers, JBAn AirPort Express running firmware version 6.3 must be an old one. The Express is unrelated to B

My iphone 3GS no longer syncs with iTunes. The phone is recognised, backs up but then I get an error message: "Waiting for changes to be applied". BUT unlike other people, it doesn't stay stuck on it, instead the process closes down immediately

Hi all, Apologies: I've just joined the community and didn't quite figure how to write a msg! Hope it works... Anyway, I read many posts on this annoying error message (Waiting for changes to be applied) in the last 2/3 days, but they all refer to th

I just downloaded Itunes 64-bit. When I hit the Help button it freezes and nothing. Also I get an error message, that I am not connected online, which I am. What is going on? Please help. Thanks

I am having problem with my Itunes 64-bit. The help button is not working. I also have an error message, that I am not connected to the website. I have good connection. My Home sharing error (-2146893032) and my network connection error (0X80090318).

I have Pages 09 but it will not save a document.  I have tried clicking on all the options but I keep getting an error message that the document cannot be saved.  Any help?

I have Pages 09, but it will not save a document.  I have clicked on all options, but I cannot save anything.  Any thoughts?Hi lv, This may help. File > Export > PDF or Word or RTF. At least that will save your work. Regards, Ian.Read other 6 answer

I'm trying to run the CS5.5 uninstaller, but I am getting an error message.

I ran the cleaner tool, but still get the uninstaller error. I'm making the upgrade to CS6, and running this on a MacBook Pro, OSX.9.3. I can trash the apps, but I'd love to be sure that I've really uninstalled things.The installer app simply says, "

I try to drag the new icon to my applications folder, as instructed. When I'm asked if I want to replace the older version, I say yes, but I get an error message saying that it can't because FireFox is open. But it isn't! help. Mac OS 10 system. Jerry

upgrade says firefox is open when it isn't, preventing me from overwriting/replacing older version/iconFor an unofficial Firefox 4 compatible version that runs on Mac OS X 10.4.11 or Mac OS X 10.5.8 (PowerPC) you can look at: * http://www.floodgap.co

My computer says it's authorized, but i still get an error message that i need to authorize it.

i am trying to download my music onto my ipod. i just updated it tonight and it took off all of my music and my apps. when i go to click on the app, it doesn't come up. and also, in itunes, i am trying to sync my ipod to my mac and a message comes up