batch pdf export script problem

Hello guys,.

I had problems with my code because it does not at all.

Could someone help me to fix it

It's something with the line13 exportfile


//==== Batch PDF =====\\
/* InDesign JavaScript to Create PDFs of a batch of InDesign files using an export PDF preset */
var myPDFExportPreset = app.pdfExportPresets.item("Smallest file size"); // Change myPDFpreset to the name of the preset you want to use
var myFileLocation = Folder.selectDialog("Please select path to files");
myFolder = new Folder ([myFileLocation]);
myFolderContents = myFolder.getFiles("*.indd"); // array
myFileAmount = (myFolderContents.length - 1);
// ===== Open, Export as PDF, and Close files ===== \\ 
for (i = myFileAmount; i >= 0; i--)
{ 
app.open(File (myFolderContents[i]));
app.activeDocument.exportFile(
  ExportFormat.pdfType, 
  File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"),
  false, 
  myPDFExportPreset
  );
app.activeDocument.close(SaveOptions.no);
}

= PDF in batches =.

/ * InDesign JavaScript to create PDFs of a lot of InDesign files using a PDF export preset * /.

var myPDFExportPreset = app.pdfExportPresets.item ("[smallest file size]"); Change the name of the preset to use myPDFpreset

var myFileLocation = Folder.selectDialog ("Please select path to the files");

myFolder = new file ([myFileLocation]);

myFolderContents = myFolder.getFiles ("*.indd"); Table

myFileAmount = (myFolderContents.length - 1);

= Open, export to PDF and close the files =.

for (i = myFileAmount; I > = 0; i--)

{

App.Open (file (myFolderContents [i]));

app.activeDocument.exportFile)

ExportFormat.pdfType,

new File (myFolder.fsName + "/" + app.activeDocument.name.split (".indd") [0] + ".pdf").

fake,

myPDFExportPreset

);

app.activeDocument.close (SaveOptions.no);

}

Vandy

Tags: InDesign

Similar Questions

  • I have problem in the PDF export to save only the layers appeared only. When I export the indesign file to PDF that contains layers hidden pdf placed, pop up problem when I use the search field in exported pdf file. hidden text of hits from search results

    I have problem in the PDF export to save only the layers appeared only. When I export the indesign file to PDF that contains layers hidden pdf placed, pop up problem when I use the search field in exported pdf file. hidden text of hits from search results to laye

    I answered your question: there is nothing you can do in InDesign. You need to ask in the Acrobat forum I linked.

  • Page ID Export PDF/EPS size problems

    Hello InDesigners,

    I set up a document with the following properties 265 x 375 mm (without bleed or slug), as seen in the pictures below. However, when you export to PDF or EPS slightly reduced page size (see third photo). Is it possible to solve this problem and export formats of exact page? I use InDesign CS6 - v8.0.2.

    Thanks in advance for your help.

    P.S. The same problem also happens for standard paper such as A4 and A3 sizes.

    ID Doc Setup.png(ID Doc parameters)

    ID Paper size.png(Size of EPS when opened in Illustrator)

    ACRO properties.png(Acrobat PDF exported properties)

    For the PDF, Acrobat preferences panel change: units > units page & ruler mm

  • Quality PDF export from InDesign and Photoshop problems

    Hello.

    I have problems exporting my InDesign files to PDF and keeping the Res. And it's not only images (I understand on the CIO) is the guy over there too.

    I exported as preset high quality printing - this is false. Are there other settings to make sure the PDF export retains the quality of high resolution and clarity?

    At the time of high resolution when I export jpeg or eps but not PDF.

    I also noticed the same problem when I export to PDF from Photoshop.

    I really need to create interactive and high quality print PDF of my InDesign files.

    Please can you advise.

    Thank you

    Karen

    Sounds like it might be that the setting resolution in Acrobat is not corresponding to the screen.

  • Problems downloading pdf and conversion to the format with PDF Export excel, file will not download

    I'm trying to convert a PDF file to Excel format using the PDF export.

    I converted a file successfully, but have one number of others who will not export, in fact, they seem to fail downloading?

    The only difference between the file that has converted and the other is the size.

    Any help is appreciated!

    Thank you

    Hello

    Thank you I have now managed to convert. I tried to download using a hosted desktop computer, I have since tried to use my local computer and managed

    Thanks for your help.

  • Problem with black in .pdfs exported

    Hi all.  I am very new to work with InDesign, so please forgive me if I do not know all of the appropriate terminology.  I had a 42 page .indd file I exported.  The reason for the export was so that I could then, open the pages of pdf in photoshop and individually rename/re-record pages.  The text in InDesign is 100K black.  When I opened the PDF in photoshop, black now has a mixed CMYK value.  It is causing all sorts of stress at the printer.  Is there something I need to do in .pdf export that will preserve the value of black than 100K?

    Opening a PDF file in Photoshop will rasterize the entire Page of the PDF file, including; text and vector graphics in a native resolution of pixels.

    The color levels change as it is converted to pixels that there is no way to keep the original color values.

    The only time that you can open a PDF file in photoshop is when the PDF file was created with Photoshop and had edit it with photoshop ability checked when recording.

  • PDF-export truncates report

    When I export my TDR-report (test.tdr in attachment) to PDF I get only truncated reports (see testDIAdem2012.pdf in the attachment). Export to JPG or WMF format is OK. (see test.jpg in attachment). Even the printer output is as expected.

    It does not matter if I use the Menu\PDF file to the export or the following code

      Pads const = "C:\temp\test. TDR.
    SPDF const = "C:\temp\test.pdf."

    Call PicLoad (pads-r)

    PicWidthInScal = 29.7
    PicHeightInScal = 21
    PrintLeftMarg = 0
    PrintTopMarg = 0
    PrintOrient = "landscape".

    If FileExist (sPDF), THEN call FileDelete (sPDF)
    PDFFileName = sPDF
    PrintName = "winspool, DIAdem PDF Export"
    Call PicPrint ("WinPrint")

    Truncated PicPdfExport results in the same report.

    What can I do to get a whole PDF-report page?

    GEMÜ

    Hi GEMÜ,.

    When chossing the pdf export as part of your report is printed. You can turn off the frame in page layout options.

    Letter: Einstellungen > einrichten Layout > Layout-setting...

    I've attached a screenshot of the box you need to uncheck.

    If this does not resolve your problem, please do not hesitate to come back to me.

    Kind regards

    Vanessa

    AE Munich

  • Windows vista ultimate 64 bit PDF export error

    Hi, I use diadem 11.0 and I have a big problem with my new operating system.

    When I try to export a report to PDF I get a printing error in the status of the printer "diadem pdf export.

    Any idea or solution for this problem?

    Thanks for the support of Brad, I tried to download and install diadem 11.1, but it does not solve the problem.

    After that, I tried to search the forum for a solution amyuni and I discovered this (he solved my problem)

    Windows Vista:

    1. Make sure that you are connected as a Windows administrator.
    2. Click the windows button, and then click Printers.
    3. Make the Diadem pdf Export right click and select Properties
    4. Click the Ports tab, and then click the Add Port button.
      Note: If the Ports tab is grayed out, right-click on the Diadem Pdf Export icon and select run as administrator.
    5. Select Local Port and click New Port .
    6. Enter the new name of port PDF1 , and then click OK. Close the Printer Ports window.
    7. Put a check mark in the box next to the port of PDF1 if it is not already.
    8. Click the Advanced tab.
    9. Select the option Spool print documents to the below clickable options.
    10. Clear (uncheck) the box for enable advanced printing features by clicking on it.
    11. Select the print directly to the printer option button to make the options below not clickable.
    12. Click the apply button, and then click OK.
    13. Important: so that the changes take effect, you must restart your computer.
      Restart your computer, and then try to print, send, or create a PDF of DIAdem.

    Kind regards

    Gert Ierman

  • How to return to my first pdf export?

    Hello

    I HAD ALREADY PURCHASED ANNUAL PDF-EXPORT IN APRIL 2017, THEN 10 DAYS AGO SIGNED FOR 7 DAY TRIAL

    DC - PRO ADOBE, NOW THAT THE 7 DAYS ARE OVER, HE I CANNOT RETURN TO MY ORIGINAL

    PLAN AND MAKE THE PDF-EXPORT TO WORD FORMAT.

    HE KEEPS ASKING ME TO SIGN UP TO THE SUM OF $ PLUS PLAN PRO, I HOPE YOU DON'T.

    HOW TO RETURN TO MY FIRST PDF EXPORT? PLS HELP.

    RGDS

    KP

    Hi contel$ $44,

    Please use Adobe Acrobat Reader DC application PDF export.

    Try to log out of the application, restart it and then reconnect with the Adobe ID

    You can also export a PDF online here: https://cloud.acrobat.com/exportpdf

    Let us know if you still experience the problem.

    Kind regards

    Meenakshi

  • How to upgrade to Adobe PDF Export service?

    I bought Adobe PDF Export service in November 2015. Now, my accountant advised me to this day because I wasn't able to open the document (in PDF format) she sent me. I tried to find tips how to do this update but could not find. Could someone help me pls. ?

    Hello

    Thank you all for your help. Fortunately, my problem was solved after update my version of Adobe

    With the kind rgds,

    Marja

    Lahetetty Windows Phonesta

  • Bad display quality PDF - export to AutoCAD

    My goal is to effectively publish my drawings of the multi of AutoCAD Map to a single PDF file for e-mailing to my clients who do not have AutoCAD and want to open a PDF file on their device of choice.

    The file should look like it will print seen on the screen of the client with any what Viewer PDF (web or desktop) and it must have a sufficient resolution for printing on paper 11 x 17, without loss of quality.

    The problem I have is with my Appendix at the end of my output document pages.

    The appendix is made from the material data sheets (files to PDF in AutoCAD) and framed by my title block, and some PDF files appear badly on the screen. (Some of them display wrong but fine print, but is not a acceptable deliverable to my customer).

    Seems a perfectly good Source PDF for the last page of the manufacturer: http://Unirac.com/wp-content/uploads/BSK-PDF-Manager/6_SM-2703-CERTIFICATION_6.PDF

    If you zoom in you can see, it is a raster image, but there must be something not-so-good happening results to look so bad when the source is perfectly readable.

    Drawing attention to the last page where the problem lies:

    Here is a screenshot of the last page of this file read through the PDF of Google Drive Viewer: http://screencast.com/t/VeMOFeNNYjB

    This file was printed in the format PDF by using the command post of AutoCAD LT 2015 on my mac with the latest OS: El Capitan 10.11.4

    https://files.Acrobat.com/a/preview/9cd47e59-ded0-470A-ADAC-6aed8cc10338

    This file was printed in the format PDF by using the command post from 2014 AutoCAD on my PC for Windows 10

    https://files.Acrobat.com/a/preview/c2ad141b-E1BC-4C18-A52A-fbe09537df38

    This file is 1/5th the size of that produced by my mac but still as bad the last page displays.

    To summarize:

    Question 1) 5 x greater PDF export from the Mac version of AutoCAD

    Question 2) terribly screen display of some PDF files when PDF raster sources are set in the AutoCAD file.

    I won't pretend to know if this is a bug with AutoDesk product or Adobe, so I reported the problem to the two companies.

    Adobe: Let me know if there is anything more I can give you to help you determine and solve this problem.

    I have downloaded and open the files that you pointed to.

    Observations.

    (1) none of the questions here are associated with Adobe products. With any component Acrobat PDF files were not created.

    (2) the file created from AutoCAD on Mac OS is entirely to 600 dpi color raster Imaging by using ZIP compression, on the other hand, the file created from AutoCAD under Windows uses text and vector where possible with compressed lossy JPEG raster images. This explains the huge difference in size (and ironically quality - the smaller file is better)!

    (3) the pages of http://unirac.com/wp-content/uploads/bsk-pdf-manager/6_SM-2703-CERTIFICATION_6.pdf are in fact images JPEG2000 compressed at 150 dpi with no text and no vector. Even if Adobe desktop and mobile software PDF has no problem with raster JPEG2000 images, various third-party viewers are not so robust. The artifacts you see via http://screencast.com/t/VeMOFeNNYjB are likely due to a weak implementation of JPEG2000. JPEG high quality or compression ZIP (Flate) would have eliminated this particular problem!

    -Dov

  • Fall of InDesign in pdf export

    osx version 10.10.1 Capitan / 3.06 GHz Intel Core 2 Duo / 4 GB 800 MHz DDR2 SDRAM

    Hello

    I have problems with the latest version of InDesign update. The pdf export function causes indd crashing. Whether with old or newly created documents.

    the following hotfixes do not work:

    -removing and then reinstalling indd

    -checking of all the fonts on the computer and disable those unused

    -removal of all preferences

    Everyone has the same problems?

    Kind regards

    First of all, make sure that you have removed the preferences correctly, there are two halves for ID see replace your preferences

    Can export you a single page, the totally blank file? If you can, then see Adobe Community: file crashing on exit - print/PDF/other, if not can you make if you start up your Mac with the SHIFT key down to prevent other programs from loading?

  • Adobe reader 11 and dc crashes after trying to connect to use pdf export.

    I have adobe installed CD player and after signing to do the export adobe pdf, it crashed. CD player would crash whenever I tried to run after that. Uninstalling and reinstalling drive dc fixed the crash until I went to reconnect to use pdf export. So, I removed the CD player and installed reader 11. Drive 11 blocks the moment I click on connect. Anyone has any suggestions I can try to solve this problem?

    Hi maryl1671466,

    Export PDF service is not compatible with Reader 11 so there is no interest in trying it.

    Uninstall any previous installer using this link Download Adobe Reader and Acrobat cleaning - Adobe Labs tool, reboot your system & reinstall CD player using this link Adobe - Adobe Acrobat Reader DC Distribution, Sign In using your adobe ID to use the service to export it in PDF format.

    Otherwise, you can also use the export to PDF Online https://cloud.acrobat.com/exportpdf

    Let me know how it goes.

    Kind regards
    Nicos

  • Change of color in the PDF export and brochure printing

    InDesign CS5 Windows 7 64 bit

    I need to provide a client with both a composite PDF of a manual to use on their website and a PDF of a composite booklet even content to go to print (managed by their printers separations).

    The document is strictly two colors: black and pure Cyan - no other colors involved. Only imports are EPS of CorelDraw format diagrams which also use that same two simple colours.

    When I export to PDF, no problem: Blacks are 100% black, cyans are 100% cyan. When I export this manual, Blacks are still very well but the cyans becomes C:69%, M:14%. 100% Cyan color applied in CorelDraw and applied in InDesign itself all come out them with the same results.

    I tried to change a lot of output and management settings of colors in the print booklet application but still get the same result despite the use of the same what is CMYK color profile used for the right PDF export.

    There are no complications of PhotoShop imports or conversions from RGB image, so I can't understand what is going wrong here.

    Any thoughts?

    I would check the default settings for the PDF printer. Looks like a profile mismatch.

  • Import and update PDF Export Preset

    Hey there again!

    I'm now trying to define a "Preset" for the PDF export process... it is based on the "high quality Print" (preset from the Adobe PDF list), and then I want to change the settings of "one or two".

    Changing one or two parameters is easy, I've done it already, but given that most of them is already defined by the "high quality Print" Preset, my idea was:

    1. Load the Preset 'high quality '.
    2. And after that, change the required parameters
    3. And then export to PDF, of course!

    How is that possible?

    Thank you very much!!

    Best regards.

    Hello

    There are basically two location of pdfExportPresets:

    app folder - "/ c/ProgramData/Adobe/Adobe%20PDF/Settings/presetName.joboptions".

    user folder - "~ / AppData/Roaming/Adobe/Adobe%20PDF/Settings/presetName.joboptions".

    You are able to change those 2nd or duplication with those of 1st (copy of the app folder goes to the folder of the user).

    So step 1 is to reproduce some app preset at user folder (say, change your name)

    and call this copy one be changed by the script.

    To duplicate it using:

    currPreset = app.pdfExportPresets.item("[High Quality Print]").duplicate();
    currPreset.name = "myHResPreset";
    

    After this, you can change the 1st line of your script:

    myPDFExportPreset=app.pdfExportPresets.item("myHResPreset");
    

    and run your code

    Jarek

Maybe you are looking for