Export to PDF with MetaData

I have a script that exports each individual page to a pdf with each page having it's own metadata.
It works fine except for on small thing.
The keyword array looks like this in the final PDF.
; "Keyword1, Keyword2, Keyword3
How do I get rid of the semicolon and quotes?
Thanks!
main ();
function main() {
var curDoc = app.activeDocument;
var docPath = app.activeDocument.filePath; 
// Array of paragraph Style names
var paraStyleNames = ["meta-title", "meta-alt", "meta-subject"]; // insert here your para names !
var missingParaStyles = [];
// check, if the styles are valid
for ( var p = 0; p < paraStyleNames.length; p++ ) {
    var curName = paraStyleNames[p];
    // if the style is missing, push it to the array
    if ( !curDoc.paragraphStyles.itemByName(curName).isValid ) {
        missingParaStyles.push( curName );
var folderPath = new Folder(docPath + "/" + curDoc.name.replace(/\.indd$/,"") + "-pdf");
    if (!folderPath.exists)
        folderPath.create();
// loop through all pages
for ( var i = 0; i < curDoc.pages.length; i++ ) {
    // the current page
    var curPage = curDoc.pages[i];
// Page number
    var pName = (curPage.name < 10) ? ("0" + curPage.name) : curPage.name;
   // controls the loop
    var controller = true;
  // all paragraphs on the current page
    var allPageParas = curPage.textFrames.everyItem().paragraphs.everyItem().getElements();
    // loop through all paragraphs and check, if one has the para style applied
    for ( var p = 0; p < allPageParas.length; p++ ) {
        if ( !controller ) break;
        // the current para
        var curPara = allPageParas[p];
        // loop through the styles
        for ( var n = 0; n < paraStyleNames.length; n++ ) {
            if ( curPara.appliedParagraphStyle.name == "meta-title" ) {
                var docTitle = curPara.contents;
               } // end if
            if ( curPara.appliedParagraphStyle.name == "meta-alt" ) {
                var docAlt = curPara.contents;
            } // end if
         if ( curPara.appliedParagraphStyle.name == "meta-subject" ) {
                var docKeywords = curPara.contents;
                var docDirectory = Array(docKeywords); 
            } // end if
        } // end for paraStyleNames
    } // end for allPageParas
for (var i = 0; i < docDirectory.length; i++) {
    docDirectory[i] = docDirectory[i].replace(/; /g, "");
    var filePath = folderPath + "/" + curDoc.name.replace(/\.indd$/,"")  + "-" + pName + ".pdf";
    var myFile = File( filePath );
    var pdfPreset = "Labels";
    with (curDoc.metadataPreferences){
    documentTitle = docTitle;
    author = curDoc.name.replace(/\.indd$/,"") ;
    description = docAlt;
    contentCreator = curDoc.name.replace(/\.indd$/,"")  + "-" + pName ;
    keywords =  docDirectory;
with (app.pdfExportPreferences) {
  pageRange = curPage.name; 
  viewPDF = false }
  curDoc.exportFile( ExportFormat.PDF_TYPE, myFile, false, pdfPreset );
  } // end for > main

You mean rendered on top of the image? That info is already embedded inside the image as metadata. To render metadata on top of your image, you can use the slideshow module, add a text overlay with your custom metadata and export to jpegs. You can do similar things inside the Print module but you cannot control the placement of the text.

Similar Messages

  • Exporting to pdf with new numbers app

    recently i upgraded from numbers 09 to numbers 3.0. i have a worksheet with 2 pages. with numbers 09 when i export to pdf it export as pdf with 2 pages works fine. but in numbers 3.0 when i wxport the same worksheet it combines both pages in one pdf page so i can't print it on 2 pages. any solution ?

    Vikas
    The solution is to Print to PDF rather than Export to PDF.
    You will see that there are two pages in the Print dialog preview, and when you choose PDF, Open in Preview, you will see that the PDF version of the file has two pages.
    Jerry

  • Problem while exporting to PDF with japanese character in Crystal Report X1

    Hi,
    I am using Crystal report X1 with classic ASP on a Windows 2003 Enterprise Server, SP 2. In my application, I have to export the report into PDF, CSV, DOC formats. I am have Japanese strings in the report. While exporting to PDF, empty boxes has displayed in the place of Japanese string and in CSV file, question mark has been displayed instead of Japanese string. But the Doc file is exported correctly. I have not installed any language support software either in server or in client machine. I have used MS Gothic and Arial Unicode MS fonts for the text-objects which has Japanese strings.
    Please give me a solution so that I will get PDF file with Japanese strings instead of empty box or question mark.
    Do I need to install any language support pack software?
    Thanks in advance.
    Regards,
    Manju

    Hi Don,
    Thank You for your reply. I have resolved the issue of exporting to pdf from crystal report X1 having Japanese data after installing the language pack.
    But when I am exporting to CSV or TXT, i am getting ??? instead of Japanese characters. I have tried "export" through crystal report designer and got ??? instead of Japanese.
    The Crystal report version I am using is Crystal report X1  11.0.0.1282
    Crystal Report Desinger is installed in Windows Xp machine
    Font set for Text object is Arial Unicode MS, MS PMincho, MS PGothic
    Does the Crystal report X1 11.0.0.1282 has the UTF-8 support for CVS / txt
    Please provide me a solution
    Thanks in advance,
    Regards,
    Manju

  • Cannot export to PDF with grayscale PDF in layout

    IDCS5.5, MacPro, OSX 10.7.4
    I am working on a grayscale teacher’s guide that accompanies a CMYK schoolbook. The introduction pages contain miniature pages of the workbook (formatted as grayscale PDF), but InDesign refuses to output those pages as PDF ("Impossible d’exporter le fichier PDF"), or when it does produce a PDF (when exporting page by page), Acrobat warns of a possible problem and stuff is missing on the resulting page, not necessarily from the grayscale minipages.
    I have tried grayscale PDFs created from the original CMYK PDFs in Acrobat Pro X, grayscale PDFs exported from the original CMYK file in InDesign CS6, PDFs reduced to 20% in InDesign, PDFs reduced to 20% with a third-party application and imported in ID at 100%, and all sort of variations on the export values. The problem is also present in InDesign CS4 (after exporting the file as IDML) and in CS6.
    The thing is, there is no problem at all if I use the CMYK PDF version of the minipages (I then turned the resulting PDF into grayscale with Acrobat Pro X). But the printer expects to see only grayscale images in a grayscale job, not color... and a Photoshop version of those minipages is not acceptable.
    Has anybody encountered that problem? Can you reproduce it, i.e. can you export to PDF if you use any type of grayscale PDFs in your layout?

    FOUND IT! Inspired by Rob solution, I was able to export my InDesign CS5.5 document containing some grayscale PDFs to PDF/X-3:2002 (and PDF/X-1a:2001), with or without the standard, but without converting to destination. For some reason, it does not work with PDF/X-4:2008, nor with any of the other presets.
    -3

  • Can't export a PDF with XFA form

    Cannot convert/export a PDF document containing an SFA form - can this program not do this?

    Hi Morin27,
    XFA forms are not regular PDF's but XML files in a PDF shell.
    To create a word file from those files, you first have to flatten the XFA forms by printing as PDF with the Adobe PDF Printer.
    Then you can save using ExportPDF the created static PDF as Word document.
    ~ Pranav

  • Problem exporting a PDF with Helvetica Neue

    I am using InDesign CS6 on Mac OSX 10.8.4. I have a PDF with Helvetica Neue in it. When I export this file to a PDF my client claims that the text is jumbled and appears to be widely spaced/leaded. I've read it's an issue with Helvetica Neue as a system font, and found the following solution, but wondered if there was a simpler answer that does not involve messing with my system fonts.
    http://indesignsecrets.com/removing-nonessential-system-fonts-in-leopard.php

    I am sorry this is the simplest way if you need to use exactly that font.

  • Export a PDF with Acrobat Layers

    How do you do this via scripting? In the normal InDesign PDF export UI, this is referred to as "Create Acrobat Layers" and is only enabled for Acrobat version 6+

    That property doesn't seem to do it. Here's the code I'm trying without success:
    function ExportAsPDF(inDocumentPath, inSaveDocumentPath)
         try
            app.open(File(inDocumentPath));
            currentDocument = app.documents[0];
              var preset = app.pdfExportPresets.item("[High Quality Print]").duplicate();
              with(preset)
                   exportLayers = true;
                   subsetFontsBelow = 0;       
                pdfColorSpace = PDFColorSpace.CMYK;
                pdfDestinationProfile = PDFProfileSelector.USE_DOCUMENT;
            currentDocument.exportFile(ExportFormat.pdfType, File(inSaveDocumentPath), preset);
         catch(thisError)
              throw thisError;
    As I said before, I'm trying to get a PDF with layers.

  • Export a PDF with Imposition and wraparound

    Hi everybody,
    I'm a relative newbie here, and I apologize for that.  I'm looking for some help in CS5 with imposition.
    Specifically:
    I created a 28 page booklet, 8.5x11, for a client that has 28 pages.   Same booklet as last year.  However, this year, the client - to save money - wants to print on tabloid paper.  So an 8.5x11 format needs to convert to 17x11.
    The printer they have chosen wants the inDesign document as a PDF.
    Two unique problems:  one, how do I export to PDF a document that allows for imposition.  And two, the front and back cover are wraparound (a single image). 
    Or, more concisely, how do I format this correctly?  And can it be done in a single file?  Or would a second file be required to handle the wraparound of 1 and 28?

    I would have thought that too, but that's not what I'm hearing from the printer.
    You are correct: I have been told by the printer that 14 11x17 sheets, printed double-sided, and golden in half, will save the client significant money. Hence the reason the client made the change.  So getting my imposition right kinda got me scratching my head. But let me revisit that with them.
    The cover issue I still need to be clear on:  how pages 1 and 28 can have a wraparound image , and still assimilate into a layout. How would you handle that in your print house?  Right now I moved 28 to precede 1, built the layout, and then moved that half image back down in the layout. Is that correct?
    Thanks so much for your insight.

  • Export to PDF with Working Hyperlink

    Post Author: JaeLevel3
    CA Forum: Exporting
    I saw a few of these questions, and left unanswered.  I hope answering this question can help several people.
    It appears when the hyperlink starts with http, exporting Crystal to PDF, Acrobat recognizes the link.  However, when the hyperlink is to a file on a drive, exporting to PDF, the link is not recognized.  Is there a way to have the hyperlink to a file on a drive remain active when exported to PDF?

    One of the 3rd-party Crystal Reports Desktop Scheduling tools listed at: http://www.kenhamady.com/bookmarks.html provides a solution for this. It allows you to automate the process of exporting to pdf and then detecting file references in the pdf text and turning them to hyperlinks or detecting invisible formulas and turning them into file hyperlinks.

  • Export to PDF with Options

    Hi,
    I would like to export the active document to PDF with options [Standard options] using vbscript.
    Is there any sample or references for this?
    Thanks,
    Shailesh

    A quick copy to help you getting started.
    myInDesign.ActiveDocument.Export "Adobe PDF", TargetPDFfilepath, False, IDPDFPresetName
    The command can be found in VB reference guide (and scripting guide I believe)

  • Exporting to PDF with Fillable and Savable Fields

    Hi,
    I was wondering if it is at all possible to export from Crystal Reports to a pdf with fields that can be filled in and saved by the user?
    I have read up on Visual CUT and it seems like I can do it from there. The problem with Visual CUT is that it offers way more than what I need. I only need the ability to create a pdf with fields that can be filled in and saved by the user.

    Hi,
    In my experienced it cant, you can export it to pdf but you dont have the ability to make it fillable, unless doing it manually, from the exported pdf, install an Adobe Professional software to have capability to save data's.
    Regards,
    Clint

  • How can I Export a PDF with Hebrew Font

    I am having trouble exporting a PDF file with a Hebrew font into word document.

    Sorry for the long delay in getting back to you! I must have missed your original post.
    Unfortunately our ExportPDF service doesn't support Hebrew text.  You can vote for this feature in here: http://forums.adobe.com/ideas/1554  We use the Ideas section to help prioritize features.
    -David

  • Indesign crashes when exporting to pdf with .eps and .ai files placed

    Hi everyone,
    I have an Indesign file with 4 placed Illustrator .eps file placed. Whenever I try to export to pdf, it starts to export and then when it reaches a page with a .eps file on it, it hovers for a minute and then Indesign crashes. I decided to save these 4 .eps files as .ai files and replace them. Now when I export to pdf, it gets through the export and a pdf file is created but immediately after, Indesign crashes.
    Is this a sign of corrupt .eps or .ai files or a corrupt Indesign file? All I know is that if I remove all the image files, then the ID file is fine, ie. it exports and ID doesn't crash.
    Is there a way to test either .eps, .ai or Indesign files for corruption, and if they are corrupt is it possible to repair them?
    Appreciate any help offered.

    You haven't said which version of Indesign you are using or other specs, but I would bet that you are using CS2 on an Intel Mac. CS2 runs under Rosetta on an Intel Mac, and I have found that memory problems are often the result of crashes like the ones you have described. My advice is to stay away from EPS files and use AI or PSD, especially if the file is a bitmap or photo. This has eliminated all the crashes that used to occur on my system. As far as the crashes after making PDF files, I don't have a solution other than restarting Indesign after exporting a PDF file or two at a time. The same Rosetta memory problem seems to mess it up for me. Mine would just exit from Indesign with no warning. Hope this helps.
    Regards,
    Len Swierski

  • Exportting a PDF with bookmarks

    How do I export report to PDF with bookmarks. The report has groups with each group needed as bookmark. This this avialable in JRC.

    I tried to use this method but was not able to get pdf with bookmarks. I am using crystal report that is developed using version 11.0.0.1282. Will the bookmarks work only with newer version of crystal reports.

  • Exporting to PDF with Vector/Transparency issues? (huge file)

    Hi folks
    I have a 36 page magazine in Indesign which has a lot of illustrator images placed in, some of which have transparency applied.  The images are xmas icons and there are 10 or so on each illustrator file so there are only 3/4 illustrator files placed but they are done many times over within the Indesign file.
    When I export to PDF the file size is huge.  154mb.  I am sure it is to do with the vectors/transparency, but dont know how to correct this to bring the PDF file size down.  Any ideas?
    Thanks

    To echo Peter's response, 154 MB for a 36 page magazine is not necessarily all that large, especially if the content is graphically rich.
    There is some information you are not providing us. For example, how are you bringing in the Illustrator artwork? And with what settings are you exporting PDF?
    In the first case, the most efficient way to bring Illustrator content into InDesign is to save the Illustrator artwork as PDF/X-4 and place the resultant file into InDesign. InDesign is more likely to reuse the content for PDF export if the content is placed in that manner.
    In the second case, content with transparency can yield very bloated PDF if you export PDF with flattened transparency such as you would get with the PDF/X-1a or PDF/X-3 export settings from InDesign (or for the Illustrator-based imported content, PDF saved from Illustrator with such settings). Again, we recommend PDF/X-4 for PDF export maintaining live transparency and original color spaces with ICC profiles and avoiding the bloat caused by transparency flattening and conversion of RGB to CMYK.
              - Dov

Maybe you are looking for