[JS, CS3] Change text color and export pdfs

Hi there,
I am new to scripting and I am trying to find out if a script exists that will export a PDF, then change all text of a certain color to black, then export another pdf with the same settings as the first, but appending the filename. I've searched the forum and understand about the change color bug, but I haven't seen anything in JavaScript -- It's all been applescript.
Anyone have any brilliant ideas?
Help is GREATLY appreciated!
-Molly

I couldn't get the specific color replacement, I chose the rambo approach...<br /><br />if(app.documents.length!=0)<br />{<br />     var doc = app.activeDocument;<br />     if(doc.saved==true)<br />     {<br />          var docFile = doc.fullName;<br />          var docFile = doc.fullName;<br />          var myFile = File(docFile).fsName;<br />          var myPdfPreset = app.pdfExportPresets.item("[PDF/X-1a:2001]"); //Put what you want <br />          var myPdfFile = new File(String(myFile).split(".indd")[0]+".pdf");<br />          exportPDF(myPdfFile,myPdfPreset);<br />          var myTfs = doc.textFrames.everyItem().getElements();<br />          for(i=0; i<myTfs.length; i++)<br />          {<br />               //will reset all texts to black, quite drastic but works.<br />               myTfs[i].texts[0].fillColor = doc.swatches[2]; <br />               //Should be better to use swatches.item("[Black]"); <br />               //But can't check on my french system<br />          }<br />          var myPdfFile = new File(String(myFile).split(".indd")[0]+"_AllTextsToBlack.pdf");<br />          exportPDF(myPdfFile,myPdfPreset);<br />     }<br />     else<br />     {<br />          alert("Please save your document first");<br />     }     <br />}<br />else<br />{<br />     alert("You need to open a doument first !");exportF<br />}<br /><br />function exportPDF(myPdfFile,myPdfPreset)<br />{<br />     doc.exportFile (ExportFormat.PDF_TYPE, myPdfFile, false, myPdfPreset, undefined, undefined, false);<br />}

Similar Messages

  • Change Text Color and Background

    Hello
    I need to change the text colour and background for an entire text box and it's contents with as little iteration as possible
    For the Background I am using textframe.fillcolor
    and for the text I am usinf textframe.parentstory.fillcolor
    Is this correct?
    Thanks

    Hey!
    Yeah, that's ok.
    Also you can adjust color tint, and color text per paragraph like this:
    //fill text frame with color
    app.selection[0].fillColor = app.activeDocument.swatches.item("Red");
    //adjust fill color tint
    app.selection[0].fillTint = 20;
    //fill second paragraph
    app.selection[0].parentStory.paragraphs[1].fillColor = app.activeDocument.swatches.item("Red");
    //fill third line
    app.selection[0].parentStory.lines[2].fillColor = app.activeDocument.swatches.item("Red");
    Hope it helps!
    tomaxxi
    http://indisnip.wordpress.com/

  • Acrobat XI Pro Mac: Changing Text Color moves Text within Paragraph

    Dear Acrobat Experts!
    I've been using Acrobat Pro for over a decade now (Win and Mac) - but Acrobat XI Pro Mac shows some behavior I cannot deal with:
    When I'm changing text color of say a couple of words within a paragraph, usually the formatting changes and text is being moved/shifted. It looks like the text with altered color requires more space and consequently the following words are shifted which very often ruins the whole formatting. This makes Acrobat XI for me nearly unusable, I had never a behavior like this in former Acrobat versions (Win or Mac).
    I cannot believe that this is "normal" - so what's the mistake I'm making? For illustration please see the two screenshots I included.
    I'm looking forward to your helpful comments!
    Oliver

    Hi Sukrit!
    Thanks for your assistance.
    This is the first and only Acrobat version ever I had this problem with. I am running Acrobat Version 11.0.10 under Mac OS X 10.10.3 Yosemite on a MacBook Pro 15" Retina display. I am working on Mac only since Acrobat Pro 7 - the versions before were Windows.
    So I cannot comment on Acrobat XI Pro Win.
    This is happening with all of my PDF docs - regardless of origin (textbook, scientific journal, or PDFs I generated by myself as export from office applications etc.).
    The only difference is the amount of changes to the formatting (shifting of text).
    To illustrate my workflow I generated a screencast and uploaded it here:
    <Dropbox - Acrobat_XI_Pro_Mac_3.mp4>
    Looking forward to hear from you again!
    Oliver

  • Problem editing text color and page properties due to favicon link

    I recently added a link to a sites favicon using the link tag. Following advice on the net this was added beneath the HTML tag and before the HEAD tag. I was using a Dreamweaver template for the site and it updated all pages with the new link in the non-editable area above HEAD and just after the template declaration.
    This was fine, unitl the user went to edit the site. He found that he could no longer get to page properties as he got an error that no page properties existed in editable areas... although there was an editable region for the page title. Also text color and highlighting were now disabled.
    Moving the link tag into the head area has resolved the editing issue, but it seems a strange bug. Is there some way to add something between HTML and HEAD and have it appear before the InstanceBegin of the template?

    You can edit text in any PDF by using trial version but as for as my knowledge and limited experience with Adobe I could not find any text color option in Adobe Acrobat. But you can highlight text in Adobe Acrobat. If you want to change the text color in PDF, I would like to recommend some another software which allows you to change the color of text and is available for download here.
    Let me tell you how can change text color using this software. Open PDF file > go to "edit tab" > Click "edit" then highlight text to change the color. As you can see in the below screenshot.
    Free free to ask. Hope it helps you. Don't forget to come back to share your views.
    Thanks

  • Why am I unable to change text color from black in LR5 book module?

    Why am I unable to change text color from black in LR5 Book Module?

    I'm assuming you clicked on the color patch besides the word <Character> to open the color picker window.
    At the right side of this window there is a vertical bar that has 2 horizontal black lines at the bottom.
    This is actually a slider. Pull it upwards with the color picker and color will appear in the window.

  • Easy one I hope: How do I change text color?

    For the life of me I can't seem to find anything with a color pallette (except for background fill). I need to change text color but don't know where to find it.  Everything's always black. When I highlight the text, and goto "Font", I see something that looks like the "Select Text Color" (like the one above but as soon as you mouse over it, it turns to a crossed-out "ABC", and can't get the pallette.
    Thanks for your help.

    Hi,
    Question: Are these fields that you had changed the type of in the Object Pallet/Field Tab/Type ? If so, try deleting the object and put a new one in its place from the Object Library.
    If no, what sort of parent do these items have? Table Row? or SubForm?
    Good luck!
    Stephen

  • Thunderbird changing existing color, and occasionally font, from original messages in replies

    Hello,
    Thunderbird keeps consistently changing text color (always) and font (sometimes, intermittently) when I reply to a message. I hope the attached images will make clear what I mean.
    I have many e-mail exchanges where individuals involved use both font and color to make it instantly possible to distinguish who said what, and often in what order, based upon the font being specific to the individual and the color specific to the response given.
    You will see in the attached screen shots that the original message contained two different fonts in dark blue colors. When I hit "Reply" the compose window switches all the text from the old messages to black. In this case it wouldn't matter much, but it can be very disorienting when you have an e-mail exchange going on that's got more participants all of whom use signature fonts and change either the font and/or color as the conversation progresses. Having everything "go black" removes essential context.
    I also find it odd that when you place your cursor in the middle of existing text and open up a new line to insert your own material that the new material always mimics the last font that was in the material you've just "split open" to add your own reply. In virtually every other e-mail editor I've used when you place yourself in existing text and split it apart by hitting a return the opened area typically would use the font and font color you currently have specified in the compose window.
    If there are settings I need to tweak to:
    1. Force Thunderbird to maintain all existing fonts and font colors when replying to an existing e-mail message,
    2. Get Thunderbird to use the font and font color I have chosen in the compose window any time I split existing quoted material to add new material,
    I'd love to know what those settings are.

    Matt,
    I decided to do some experimentation with creating multiple messages and replies strictly within Gmail's web interface and then to reply to same from Thunderbird. After that, I attempted to start the same sort of chain strictly using Thunderbird to create the messages. The difference is pretty stark.
    The first attachment is how the multiple fonts and colors that originated from Gmail show in Thunderbird's reading window. They are all correct here.
    The second shows how the multiple fonts and colors that originated from Gmail show up when I reply from within Thunderbird. Again, all of those fonts and colors are maintained as sent and the font and color I designated in my Thunderbird options are what get used when composing the reply.
    The last shows what happens when I sent a message created in Thunderbird with one font and color and then go to reply to it from within Thunderbird after having switched my default font and color choice for composition intentionally prior to replying. The font from the original message is retained in the reply, but the color is converted to what has been selected for composition. This suggests to me that Thunderbird is not retaining color information at each "level" within a reply. It has to have sent color information in the original message because it shows up in that color on receipt when reading (I didn't bother with a screen shot, but if you want one I can get one). When replying it is stripping or overwriting the color information from the original message and using the current compose color and applying it to everything in the window.
    As far as I'm concerned, that's a bug.
    Brian

  • How do I import and export PDF's from Ibooks

    How do I import and export PDF files from Ibooks on the IMAC running Mavericks?
    How do I sync my PDF files in IBooks to the IPAD when they were not purchased from the bookstore?
    I noticed that I could email the PDF and then add it to IBOOKS on the IPAD.
    Is there a 3rd party IBOOK type reader that will address this issue?
    When I upgraded Mavericks it moved all of my PDF files in ITUNES application to IBOOKS and removed all reference to those
    books in ITUNES. When I purchase a book from IBOOKS store on the IMAC, the books shows up in IBOOKS on the IPAD.
    All of my PDF files will not sync up with the IPAD.
    I do hope this is a problem that Apple will address and would like to know when the fix will be available.

    Hello,
    Thank you. I found that option you pointed out. I can now change it from 1080i to 1080p and I can chance the resolution. However I still can't change the frame rate. It still stays at 29.97.
    Could this be due to the camera? I am using a Canon VIXIA HF S100 with 30p and 24p frame rate options. I suspect that it does not really shoot at true 24p and only does 24p within 60i.
    Frankly, I don't really care about getting 24p support too much but it would be very nice to have the option.
    I'll keep toying with the program. Still, anymore ideas or thoughts would be greatly appreciated.
    Thank you Wild Giles.

  • Change Text Color Dynamically Depending on Which MP3 File is Playing

    Change Text Color Dynamically Depending on Which MP3 File is
    Playing
    Hi,
    Can anyone help with this problem.
    I am trying to change a text cast member's color dynamically
    based on which audio file is currently playing.
    I have 4 Text Cast member buttons named
    Play Song 1
    Play Song 2
    Play Song 3
    Play Song 4
    I am successfully playing the 4 songs in a queue like this
    (ie. If "Play Song 1" sprite text member is pressed then...
    sound(1).queue(member "Song1")
    sound(1).queue(member "Song2")
    sound(1).queue(member "Song3")
    sound(1).queue(member "Song4")
    sound(1).play
    What I would like to do is to have the currently playing song
    text color changed to a different value, say Green.
    So if "Song2" in the queue starts to play then the text "Play
    Song 2" would become Green. When done it would then turn back to
    black then "Song3" starts to play and "Play Song 3" text script
    button would then turn from black to Green an so on.
    These are the codes I've tried in the frame script and none
    seem to work...
    on enterFrame me
    if sound(1).status = 3 then member("Play Song 1").foreColor=5
    (This works but only for the first song because "Play Song 1"
    is directly named and clicked on.)
    else member("Play Song 1").foreColor=255
    end if
    I have tried to make a reference to the playing song and so
    far each of these doesn't work...
    --if sound(1).status = 3 then
    sprite(me.sound.member).foreColor=5
    --if sound(1).status = 3 then
    sprite(me.spriteNum).member.color=rgb(0,255,0)
    --if sound(1).status = 3 then member
    (sound(1).member).foreColor=5
    --text = member(whichMember).scriptText
    end
    Is there any way to reference the song name text cast
    member??
    I thought I had it when I discovered sound(1).member but
    sound(1).showProps returns the playing sound.member as
    member: (member 28 of castLib 1) nothing there I can use?
    It doesn't show the member name and
    It doesn't show the song name "Song1" which I could then
    match up to the "Play Song 1" text
    I'm pretty new to lingo so specific code examples would be
    appreciated.
    Can anyone help??? Thanks!!!

    did you get anywhere with this?
    When applying a styleClass to a af:showDetailItem, it doesnt seem to have any effect whatsoever.

  • Hover over image will change background color and size since IE8

    Hello,
    I have a problem that only occurs in IE8 without compability view.
    I have in CSS set all textlinks to change background color on hover.
    Now my sliced imageslinks also change background color and for a larger background area than the actual image.
    It filles out the area outside the sliced image.
    This hasnt happened before in any other versions of IE and it looks fine in Firefox.
    Please can some one help me !
    I have been searching net for hours.
    I tried to change the background color when hovering imagelinks. Maybe I did something wrong but it didnt help.
    BR,
    Peter

    Noone that can give me a clue?
    I have been trying to figure this out all day

  • Whats the difference between PS and Export pdf

    Hi all,
    I need the difference beween PS and Export Pdf. Which one is better for printing. I need the reason as well.
    Thanks in advance

    Distilling is archaic.
    http://indesignsecrets.com/creating-pdf-export-or-use-distiller.php
    Bob

  • Indesign CS3 text frame parameters and export PDF

    could use some help with the following:
    I need to edit and export a large number (7000) Indesign documents (one page)
    1. check for locked text frames and unlock
    2. group all text frames
    3. set grouped text frames at x=8 millimeters, y 10 milimeters
    4. export the documents to PDF in a subfolder called "Out"
    5. save and close the documents in the same subfolder as an Indesign CS3 document (orig is CS2)
    This is what I've been trying soo far:
    Now only checking one text frame - should be all text frames
    "close document 1 saving yes" doesn't work because the originals are from CS2
    I get a PDF called "Adobe Indesign SC3"
    set processFolder to choose folder with prompt "Choose a folder that contains Innd Docs to process"
    tell application "Finder"
    if not (exists folder "OUT" of processFolder) then
    make new folder at processFolder with properties {name:"OUT"}
    end if
    set the destination_folder to folder "OUT" of processFolder as alias
    end tell
    tell application "Finder"
    try
    set listFiles to (files of contents of processFolder) as alias list
    on error
    set listFiles to (files of contents of processFolder) as alias as list
    end try
    repeat with thisFile in listFiles
    tell application "Adobe InDesign CS3"
    with timeout of 120 seconds
    activate
    set properties of view preferences to {horizontal measurement units:millimeters, vertical measurement units:millimeters, ruler origin:page origin}
    open thisFile
    set myDoc to document 1
    set docName to name
    tell myDoc
    set transform reference point of layout window 1 to top left anchor
    set myBox to text frame 1 of page 1
    set properties of myBox to {locked:false}
    move myBox to {8, 10}
    end tell
    export document 1 format PDF type to (destination_folder as string) & docName & ".pdf" using PDF export preset "[Drukwerkkwaliteit]" without showing options
    close document 1 saving yes
    tell application "Finder" to move thisFile to destination_folder with replacing
    end timeout
    end tell
    end repeat
    end tell
    end
    end
    Any help is greatly appreciated - Doing this manually is a lot of work!!!!!
    Peter

    You're asking for the name of the application, not the document -- you need<br />to do it after your "tell myDoc".<br /><br />You could also get the name from the alias you open, rather than the open<br />document, something like:<br /><br />repeat with thisFile in listFiles<br />set oldDelims to AppleScript's text item delimiters<br />set AppleScript's text item delimiters to {":"}<br />set docName to text item -1 of (thisFile as Unicode text)<br />set AppleScript's text item delimiters to oldDelims<br /><br />You should also move your "set properties of view preferences" line to after<br />your "tell myDoc".<br /><br />-- <br />Shane Stanley <[email protected]>

  • IPhoto quits when I try and change text color in book

    When editing a new iPhoto book (version 5), I was changing the font color. As I clicked on the text color icon in the fonts window (show fonts from the iPhoto menu), Iphoto just quit. It also lost all my formating thst I had for my pics. I tried the font color change in other applications using 'Font Book' and the same icon works without crashing the application.
    This is a new thing, because I have had no trouble with the first book I made.
    Thanks
    Powerbook G4 Hi Res 1.67GHz   Mac OS X (10.4.5)   1G Ram, 120 G Hard drive

    Just wondering, when you pull up the inspector, is the writing that is coming up blue a hyperlink (when you click on it, will it take you to a web page or an e-mail)?

  • Possible to change review text color and wording

    I've searched high and wide to try changing the text color for the review mode field "CORRECT ANSWERS" that shows on a fill in the blank/ short answer question. Ideally I'd like white text (it's set at black) and I'd like to have it say "Correct answer(s)" or even somethinge else. I don't like the all caps that's used either.
    I've looked at the Object Style Manager but I don't see this particular field available/editable. Has anyone found where in the c:\Program Files\Adobe... files this setting is controlled - a .dll, .xml, .txt? I don't mind changing it to white there if I have to.

    Hi, thanks. Cap 7. I whipped up that course from scratch, no particular theme applied. Also to answer your question, I looked at the master slide and that particular review mode field isn't present, just the initial objects like the text input field.It's frustrating how everything but the CORRECT ANSWERS label is editable via the Object Style Manager. Why they forgot to include it is beyond me. I'm left at using "Hack a Cap" methodology by looking at all the .dll, txt. xml files hoping to fix it there because as far as I know you can't just turn the CORRECT ANSWERS field off even if you wanted to. Unfortunately almost all of our screenshots in our courses will have a royal blue background.

  • Changing field text color and fill based on input value.

    I am trying to create a field that can be red, yellow or green.  In the end, what I need is a box that can be made red, yellow or green by the form user.  My strategy is to use a validation script to change the field and text color based on the field input.  So if you type "red", the text and field turn red, essentially making a red box.  The field is named "GoalColor".
    Am I headed in the right direction to get make this dynamic colored box?
    This script works but you must type "red" into the field(including quotation marks).  Any ideas on why the word red alone isn't triggering it? 
    var vcolor = this.getField("GoalColor").value;
    if (vcolor == "red") {
        this.getField('GoalColor').fillColor = color.red;
    } else {
        this.getField('GoalColor').fillColor = color.white;
    I have also tried - works if you type 'red'
    var vcolor = this.getField("GoalColor").value;
    if (vcolor == 'red') {
        this.getField('GoalColor').fillColor = color.red;
    } else {
        this.getField('GoalColor').fillColor = color.white;
    and  - does not work
    var vcolor = this.getField("GoalColor").value;
    if ( vcolor == red ) {
        this.getField('GoalColor').fillColor = color.red;
    } else {
        this.getField('GoalColor').fillColor = color.white;
    Thanks!

    And you don't need to add the quotation marks in the text field. In fact, doing it will cause the script not to identify the word.

Maybe you are looking for

  • In Payback for Encore CC, how do I get to go to a previous chapter?

    Up until using Adobe Encore CS3, when authoring, i was always able to access the previous asnd forward and l chapters easily.  Since Adobe Encore CS4, while accessing playback, the program easily will jump forward to any chapter, but when I want to g

  • Uncompressed 23.976 progressive avi and Encore encoding looks like crap!

    Since i'm getting an "internal software error" when I try to burn a DVD from an m2v/wav I export out of After Effects; i've now exported an uncompressed AVI so I can let Encore encode to hopefully fix this problem. So this 1.54gb AVI is 720x480, 16:9

  • Unable to connect to CMS :6400

    Hi Everyone, I just finished installing CR Server 2008.  I've been looking though posts and user guides and can't seem to find an explanation of what I am missing.  I have everything installed.  I had it create a new SQL database with a user name and

  • Advice on possible ways

    I'm on Oracle 9i R2 Patch 7 on a Microsoft Windows 2003 Server. What are the options to enable email notification to the DBA? For example, I have a query that returns the size of datafiles and I wish to run this query every night and send me an email

  • More than .txt

    I have a workout routine from the net that is in this chart form full with pictures and all. I can turn that into a pdf but that does me no good when trying to load this to my nano to view as a reference. Question, is the nano's Notes feature limited