Is there a way to select every other page in a pdf and convert it to grayscale?

I'm going to ask this question in a few sub-forums, so if you think you've seen it, you might have. Someone suggested it might be done with Javascript. I know nothing about Javascript.
Where I work I use a program that can print to pdf. We use it to produce mailings, usually postcards, that are addressed.
I often end up with a 500 page document that will print on 250 sheets of cover stock, which will get cut into 1,000 postcard, all pre-addressed and sorted by zip code.
Usually, the address side is all black and the front is color. The printers we use can print a black click on the address side and a color click on the other, IF the pdf is set up that way. Otherwise, both sides will be counted as color clicks.
I know I can select pages individually in a pdf and convert them to grayscale and those pages will be counted by the printer as black clicks, which are cheaper than color clicks.
The problem is, I have not figured out how to convert all the odd numbered pages to grayscale at once. As a result, I usually end up printing the color side simplex, then putting the job back in the tray and printing the black side. Of course, that only works if only one side is personalized, sometimes both sides are.
Is there a way to select every other page in a pdf and convert it to grayscale?

The Acrobat SDK has sample code that shows how to convert the colors for one page (the first page of a document). This sample can easily be adjusted to process every other page. You can then use an Action that executes this JavaScript to process the document. Do you know how to create an Action? If so, you can use this script (as I said, adapted from the sample in the SDK) to convert all odd pages (1, 3, 5, ...):
// Get a color convert action
var toGray = this.getColorConvertAction();
// Set up the action for a conversion to RGB
toGray.matchAttributesAny = -1;
toGray.matchSpaceTypeAny = ~toGray.constants.spaceFlags.AlternateSpace;
toGray.matchIntent = toGray.constants.renderingIntents.Any;
toGray.convertProfile = "Gray Gamma 1.8";
toGray.convertIntent = toGray.constants.renderingIntents.Document;
toGray.embed = true;
toGray.preserveBlack = false;
toGray.useBlackPointCompensation = true;
toGray.action = toGray.constants.actions.Convert;
// Convert every other page
for (var i=0; i<this.numPages; i++) {
  console.println("Processing page " + i);
  if (i % 2 == 0) {  // change to "if (i % 2 != 0) {" for all even numbers
  console.println("in page " + i);
  console.println(this.colorConvertPage(i, [toGray], []));
As I've indicated in the code, you can change this to all even numbers by changing the == to !=

Similar Messages

  • Is there a way to select every other page in a multi page pdf and convert it to grayscale?

    I'm going to ask this question in a few sub-forums, so if you think you've seen it, you might have.
    Where I work I use a program that can print to pdf. We use it to produce mailings, usually postcards, that are addressed.
    I often end up with a 500 page document that will print on 250 sheets of cover stock, which will get cut into 1,000 postcard, all pre-addressed and sorted by zip code.
    Usually, the address side is all black and the front is color. The printers we use can print a black click on the address side and a color click on the other, IF the pdf is set up that way. Otherwise, both sides will be counted as color clicks.
    I know I can select pages individually in a pdf and convert them to grayscale and those pages will be counted by the printer as black clicks, which are cheaper than color clicks.
    The problem is, I have not figured out how to convert all the odd numbered pages to grayscale at once. As a result, I usually end up printing the color side simplex, then putting the job back in the tray and printing the black side. Of course, that only works if only one side is personalized, sometimes both sides are.
    Is there a way to select every other page in a pdf and convert it to grayscale?

    The Acrobat SDK has sample code that shows how to convert the colors for one page (the first page of a document). This sample can easily be adjusted to process every other page. You can then use an Action that executes this JavaScript to process the document. Do you know how to create an Action? If so, you can use this script (as I said, adapted from the sample in the SDK) to convert all odd pages (1, 3, 5, ...):
    // Get a color convert action
    var toGray = this.getColorConvertAction();
    // Set up the action for a conversion to RGB
    toGray.matchAttributesAny = -1;
    toGray.matchSpaceTypeAny = ~toGray.constants.spaceFlags.AlternateSpace;
    toGray.matchIntent = toGray.constants.renderingIntents.Any;
    toGray.convertProfile = "Gray Gamma 1.8";
    toGray.convertIntent = toGray.constants.renderingIntents.Document;
    toGray.embed = true;
    toGray.preserveBlack = false;
    toGray.useBlackPointCompensation = true;
    toGray.action = toGray.constants.actions.Convert;
    // Convert every other page
    for (var i=0; i<this.numPages; i++) {
      console.println("Processing page " + i);
      if (i % 2 == 0) {  // change to "if (i % 2 != 0) {" for all even numbers
      console.println("in page " + i);
      console.println(this.colorConvertPage(i, [toGray], []));
    As I've indicated in the code, you can change this to all even numbers by changing the == to !=

  • Is there a way to select multiple track sections from different tracks and join them to make the chorus on iPhone?

    I am currently using the iPhone to record my vocals on top of professional beats, or riddims as they are called in the dancehall world. Is there a way for me to select multipe voice sections from different tracks, copy them and then paste them later in the project. I don't want to record the chorus more than once. Normally what I do is sync the project to my wife MacBook Air and then from there edit it but I would like to avoid this. Also, I use the earpods microphone to record my voice and of course it doesn't come out professional quality but it is decent. Do you recommend a microphone that plugs to the iPhone or should I get an interface? Thanks for the help.

    You can either copy and paste single regions or duplicate sections, if you want to copy regions
    from different tracks in parallel. 
    See: Extend a song with song sections
    Adjust the length of your sections in a way, that the regions you want to copy from different tracks are together in a section of your song.
    Add a copy of a section:
    Open the song section controls, choose the section you want to copy, then tap Duplicate.The copy is added after the last section.
    Tap Done to close the song section controls.
    After copying the section, move the new section to the end of the song:
    Change the order of sections:
    Open the song section controls, then tap Edit.
    Drag a section up or down in the list by the handle on its right edge.
    When you are finished, tap Done.
    Tap Done to close the song section controls.
    Regards
    Léonie

  • Is there any way to select multiple variables on a block diagram and change them all to read or write?

    Doing one variable at a time can be tedious.  It's hard to believe there wouldn't be a solution for this.

    I agree with tbd that there is rarelynever a reason for ton's of local variables.
    Even if you feel you need many, it does not take much time to configure each right after creation and I see little use to globally change many from read to write or vice versa at a later point. An overuse of Local variable tend to make code hard to read and can easily cause race conditions. For one perspective have a look at some older discussions, e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=112401#M112401.
    To make a new local variable, I typically ctrl+drag an existing one (read or write as needed) and "right-click..select item" to assign the desired control/indicator.
    LabVIEW Champion . Do more with less code and in less time .

  • Selecting every other note

    Hi folks...
    Is there a way to select every other note in a midi region? I know you can select sub positions etc but that won't work because it's a totally random midi sequence. There's hundreds of notes and I need to select either notes 1/3/5/7 (etc) or 2/4/6/8 (etc). Any ideas? I'm guessing if there is a way it onvolves some trickery...
    Cheers

    To select manually will take ages
    You don't have to do it by hand. You can do it with an AppleScript, and the shareware program MidiKit. This is the AppleScript:
    tell application "MidiKit"
    activate
    end tell
    set x to 2
    repeat 100 times
    tell application "System Events" to key code 51
    set x to x + 1
    repeat x times
    tell application "System Events" to key code 125
    end repeat
    end repeat
    To use that, there are a few things you need to do. In System Preferences > Universal Access, turn on the checkbox for "Enable access for assistive devices."
    You also need to make the AppleScript Script Menu visible in your menu bar. How to do this varies by OS version, but I think on 10.5 you need to launch AppleScript Utility (in /Applications/AppleScript) and activate "Show Script Menu in menu bar."
    Once the Script Menu appears (near the other Menu Extras, like Airport and Date/Time), use this command on the Script Menu: Open Scripts Folder > Open User Scripts Folder. And then use this command on the Script Menu: Open AppleScript Editor.
    You now have an Untitled document open in the AppleScript Editor. Paste in the script text from above, and save that script as a document in the folder you opened. That folder is this one:
    Macintosh HD/Users/YourUserName/Library/Scripts
    Give your script a helpful name, like "Delete alternate events." Your script will now be available on the Script Menu.
    Download, install and launch MidiKit. Export your midi from Logic and open it in Midikit. Use the buttons in the MidiKit toolbar to hide all the events that aren't notes. Select the second note. Run the script by selecting it from the Script menu. It will take a while to run, but it will work. Save the midi in MidiKit and then drag that file back into Logic.
    This could almost be done in the Logic Event List, without MidiKit, but it works better with MidiKit.
    In the script, where it says "repeat 100 times," you need to edit that number to reflect the number of notes you intend to delete. You don't need to know the exact number, because it's OK if the number you enter exceeds the correct number.

  • Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Did you find an answer to your question?
    Would it also apply to Mountain Lion's Messages?
    Thanks

  • Is it possible to have my text messages sent to my email as well?  or is there a way to view them other than on the phone?

    is it possible to have my text messages sent to my email as well?  or is there a way to view them other than on the phone?

    Sure. Go to the conversation that contains the message(s) you wish to forward. Tap the Edit button in the upper right corner. Select the message(s) you wish to forward using the radio buttons. Tap "Forward" at the bottom right of the screen.

  • Can I choose a backup-font for missing characters in a style? Or is there a way to select pink areas

    I have to layout tons of UTF 8 data from a MySQL database.
    There is one problem. The designer picked a font that does not contain the Japanese characters. But there is much inline-Japanese in the text.
    So the imported text has many pink areas (characters not present in font).
    So I search for any of the following options:
    Is there a way to define a fall-back font (like webbrowsers do). If you view UTF in TextEdit (mac) or in the browser, all weird characters are displayed using Osaka. Is there a way to let Indesign replace pink squares with Osaka?
    Is there a way to SELECT all pink squares, and apply a character-style to them? That way I can create a characterstyle with the Osaka font
    Is there a way to have InDesign parse some sort of markup-elements in plain text? I could tweak the MySQL output with PHP to wrap all strange symbols in a markup-item like [japanese]blabla[/japanese]. If that would be converted to characterstyle "Japanese" on import, I would be helped a lot as well.
    The font hack: is there a way to load all available characters in the designfont into Osaka and replace those characters and make Osaka2? Or would that result in a mess?
    I think some automation to get a character style on the pink areas is the best, as that allows to tweak font height and baseline shift to match the other font.
    Does anybody know one of the four or maybe a fifth way to tackle my problem?

    Thanks for standing in for me, Peter - we were hosting the extended family, I did nothing but cook for hours.
    Is there a way to have InDesign parse some sort of markup-elements in plain text? I could tweak the MySQL output with PHP to wrap all strange symbols in a markup-item like [japanese]blabla[/japanese]. If that would be converted to characterstyle "Japanese" on import, I would be helped a lot as well.
    This is what I'd do, honestly.  It depends on your available output-from-DB formats, and what you're placing/importing into ID. But if you're placing raw text (?) then you can't simply use Type -> Find Font, so the GREP solutions offered here are good ones.
    I think some automation to get a character style on the pink areas is the best, as that allows to tweak font height and baseline shift to match the other font.
    Note that the "baseline" in Japanese is not the same place as the baseline in Latin-script. Japanese doesn't really have a baseline - they operate with a completely separate set of typographical conventions - but the effect is that you should not line up the bottom of your Japanese glyphs with the Latin-script baseline. Set some bilingual text in a good font (Kozuka Mincho Pro, it came with ID, you probably already have it installed) and take a look.
    it is very important that you have the correct glyphs or you risk changing the meanings or making the author look like an idiot. If you don't read Japanese you would be well advised to have the document checked by someone who does to be sure it reads OK before it goes into the wild.
    Chances that you'll make something completely illegible are minimal when handling Japanese, but there are a very large number of reasons why you can't just flow Japanese into English-language ID and expect it to work. There are permissible places to wrap Japanese, and places where it's not permissible. The paragraph composer you'd be using if you are using English-language ID will happily break Japanese in the wrong place. This is analagous to bad hyphenation, but looks far more idiotic to the Japanese readership than bad hyphenation looks to an English-language readership (who probably wouldn't notice bad hyphenation unlesss they happen to be a design-savvy readership). Look into using something like Japanese Indesign or World Tools Pro or the TransPacific Digital Japanese-composer template files.

  • How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    How do I select and email a whole lot of photos on my iPad from my iPad emails? It seems I have to go into Email and then insert one photo at a time? Isn't there a way to select all in the photos and then email the batch.?

    Actually, you can email up to 5 at a time from the Photos app. Select any more and the email share option will not appear.
    If you explain why you need to email large numbers of photos, we might be able to offer an alternative.

  • Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent

    Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent backgrounds. Any thoughts?

    Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
    Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
    Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
    This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion.

  • Is there a way to select all emails at once on the iPad and then delete them at one time?

    Is there a way to select all emails at once on the iPad and then delete them at one time?

    Tap on the edit button at  the top right of the email list. This will let you select the emails to delete, once all are selected, tap on the bottom right button that says delete to delete them all at once.

  • Is there a way to select multiple files and initiate the Capitalize function?

    I have hundreds of files all in upper case that are driving me crazy. I can select them one at a time, right click and then select Transformations/Capitalize. Is there a way to select multiple files and initiate the Capitalize function?

    You could use Automator to do this - take a look at the article at http://www.wikihow.com/Batch-Rename-Files-in-Mac-OS-X-Using-Automator to see how this might be done.
    Good luck...

  • Is there any way to select all mail messages and delete them?

    I get lots of mail, and most of it I don't keep, or keep over on my MacBook. Is there a way to select all the Mail messages and delete them, or do I need to go through them one at a time?
    many thanks!
    Jeannette
    <Edited by Host>

    In your inbox in the phone you can mark the mails one by one and then tab delete.
    In Trash you can delete all with one tab.

  • When using apple remote app on ipad or iphone to control apple TV is there a way of selecting different airplay speakers?

    When using apple remote on ipdad or iphone to control apple TV is there a way to select different airplay speakers without having to control the menu on screen. Eg I want to listed to my music through apple tv (which is in the living room)  and beam it to my airplay speakers in my bedroom, at the moment I would have to go back into the living room to see my tv screen to select the bedroom airplay speakers, then go back upstairs to listen to the music. YOu should be able to select the speakers in app without looking at the TV screen. Hopefully that makes sense!?!

    Look at this.
    Tango Remote Control for iOS6-7 on the App Store on iTunes

  • Is there a way to select a word in a pdf form and have it circled

    is there a way to select a word in a pdf form and have it circled instead of say check marked

    https://discussions.apple.com/community/professional_applications/final_cut_stud io
    Al

Maybe you are looking for

  • Navigable item order

    I've got a form with a text item called "Option" at the top, and depending on which value is selected in the LOV for this field, the order of the keyboard navigation (tab order) is set up dynamically using set_item_property. Some of the fields are al

  • Waves on iPhone 5 screen on camera

    When I am on the camera app, in certain lighting condition there are waves across the screen. It's only when it's kind of dark so it's hasn't usually got this but I'm just wondering wether this is normal?

  • In which table it will store in pricing

    hi gurus, I have a question in prcing procedure determination we create conditon table in v/03 transaction code.  We can find some standard tables also there.  No my question is in which table they will store in abap all those conditon table.  please

  • Name showing on emails

    When I receive emails as part of a CC group on my mobile phone, my name on the CC section of the incoming/replying email is not showing up correctly. When I look at the very same email on my laptop, my name is correct - it shows there as "me", and wh

  • Netscape

    hello I'm trying to execute some applets Java in Netscape, but i heve a error message : " bad version number " how can i solve this problem ??? thanks jeremie