Printing only certain colors to Postscript [JS, CS3]

Is there a way, via a script, to only output certain ink colors when printing to a Postscript file? When doing it manually you can choose which colors to output, but I haven't been able to find any way to do that through a script. Any ideas?

Well I believe I have this working now. Here's the code:
// This script works by doing a few things. First, it will delete any ink that isn't actually on the document and in use.
// Then it will prompt the user to choose what inks they want to output. Once the script has those ink choices,
// it will decide, via four if statements, what colors to output. There are four if statements to handle all the combinations
// of cyan and black outputs. The other colors checked (red, blue, etc.) will be printed from within all the ifs.
// Once it knows what colors to output it creates a preset based on those criteria, and then uses that preset to
// output the file. After the file is printed to Postscript it deletes the preset and saves and closes the file.
// If the preset doesn't get deleted for some reason, it will simply be overwritten the next time the script runs.
// I figured it would be cleaner if it would delete it each time.
if (app.documents.length == 0)
alert("No document is open.")
exit();
var myDocument = app.activeDocument;
v =myDocument.unusedSwatches.length-1;
while (v >= 0)
  try {
   myDocument.unusedSwatches[v].remove();
  } catch (_) { }
  v--;
inklist = myDocument.inks.everyItem().name;
checklist = [];
//creates dialog box
var inkDialog = app.dialogs.add({name:"F4 2up LH", canCancel:true});
with (inkDialog.dialogColumns.add())
        with(dialogRows.add())
            var choiceText = staticTexts.add({staticLabel:"Choose ink(s) to output:"});   
        with(dialogRows.add())
            with(dialogColumns.add())
                for (i=0; i<inklist.length; i++)
                with(dialogRows.add())
                //.push adds items to an array
                checklist.push(checkboxControls.add({staticLabel:inklist[i], checkedState:false}));
//Display the dialog box
var myDialog = inkDialog.show();
if(myDialog == true)
    for (m=0; m<checklist.length; m++)
        if(checklist[m].checkedState == true)
            myDocument.inks[m].printInk = true;
        else
            myDocument.inks[m].printInk = false;
else
    inkDialog.destroy();
    exit();
//check to see if cyan is checked and black is not
if((checklist[0].checkedState == true) && (checklist[3].checkedState == false))
    var myPreset = app.printerPresets.item("tempPreset");
try
    myPreset.name;
catch(myError)
    myPreset = app.printerPresets.add({name:"tempPreset"});
with(app.activeDocument.printPreferences)
    pageRange = PageRange.allPages;
    myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
    myPreset.printer = Printer.POSTSCRIPT_FILE;
    myPreset.ppd = "PlateStream";
    myPreset.colorOutput = ColorOutputModes.SEPARATIONS;   
    myPreset.paperSize = PaperSizes.custom;   
    myPreset.pagePosition = PagePositions.UPPER_LEFT;
    //myPreset.screening = ("110 lpi / 1200 dpi");
    myPreset.cyanFrequency = 110;   
    myPreset.cyanAngle = 15;
    myPreset.printCyan = true;
    myPreset.magentaFrequency = 70;
    myPreset.magentaAngle = 15;   
    myPreset.printMagenta = false;
    myPreset.yellowFrequency = 70;   
    myPreset.yellowAngle = 0;
    myPreset.printYellow = false;
    myPreset.blackFrequency = 70;   
    myPreset.blackAngle = 45;
    myPreset.printBlack = false;
    mydpp = myDocument.printPreferences;
    mydpp.activePrinterPreset = "tempPreset";
    f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
    mydpp.printFile = f;
    myDocument.print(false, undefined);
    myPreset.remove();
    myDocument.save();
    myDocument.close();
//check to see if cyan is unchecked, but black is checked
if((checklist[0].checkedState == false) && (checklist[3].checkedState == true))
    var myPreset = app.printerPresets.item("tempPreset");
try
    myPreset.name;
catch(myError)
    myPreset = app.printerPresets.add({name:"tempPreset"});
with(app.activeDocument.printPreferences)
    pageRange = PageRange.allPages;
    myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
    myPreset.printer = Printer.POSTSCRIPT_FILE;
    myPreset.ppd = "PlateStream";
    myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
    myPreset.paperSize = PaperSizes.custom;
    myPreset.pagePosition = PagePositions.UPPER_LEFT;
    //myPreset.screening = ("110 lpi / 1200 dpi");
    myPreset.cyanFrequency = 110;
    myPreset.cyanAngle = 15;
    myPreset.printCyan = false;
    myPreset.magentaFrequency = 70;
    myPreset.magentaAngle = 15;
    myPreset.printMagenta = false;
    myPreset.yellowFrequency = 70;   
    myPreset.yellowAngle = 0;
    myPreset.printYellow = false;
    myPreset.blackFrequency = 70;   
    myPreset.blackAngle = 45;
    myPreset.printBlack = true;
    mydpp = myDocument.printPreferences;
    mydpp.activePrinterPreset = "tempPreset";
    f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
    mydpp.printFile = f;
    myDocument.print(false, undefined);
    myPreset.remove();
    myDocument.save();
    myDocument.close();
//check to see if black AND cyan are checked
if((checklist[3].checkedState == true) && (checklist[0].checkedState == true))
    var myPreset = app.printerPresets.item("tempPreset");
try
    myPreset.name;
catch(myError)
    myPreset = app.printerPresets.add({name:"tempPreset"});
with(app.activeDocument.printPreferences)
    pageRange = PageRange.allPages;
    myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
    myPreset.printer = Printer.POSTSCRIPT_FILE;
    myPreset.ppd = "PlateStream";
    myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
    myPreset.paperSize = PaperSizes.custom;   
    myPreset.pagePosition = PagePositions.UPPER_LEFT;
    //myPreset.screening = ("110 lpi / 1200 dpi");
    myPreset.cyanFrequency = 110;
    myPreset.cyanAngle = 15;
    myPreset.printCyan = true;
    myPreset.magentaFrequency = 70;
    myPreset.magentaAngle = 15;   
    myPreset.printMagenta = false;
    myPreset.yellowFrequency = 70;   
    myPreset.yellowAngle = 0;
    myPreset.printYellow = false;
    myPreset.blackFrequency = 70;   
    myPreset.blackAngle = 45;
    myPreset.printBlack = true;
    mydpp = myDocument.printPreferences;
    mydpp.activePrinterPreset = "tempPreset";
    f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
    mydpp.printFile = f;
    myDocument.print(false, undefined);
    myPreset.remove();
    myDocument.save();
    myDocument.close();
//otherwise, neither cyan nor black are checked
else
    if((checklist[3].checkedState == false) && (checklist[0].checkedState == false))
        var myPreset = app.printerPresets.item("tempPreset");
try
    myPreset.name;
catch(myError)
    myPreset = app.printerPresets.add({name:"tempPreset"});
with(app.activeDocument.printPreferences)
    pageRange = PageRange.allPages;
    myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
    myPreset.printer = Printer.POSTSCRIPT_FILE;
    myPreset.ppd = "PlateStream";
    myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
    myPreset.paperSize = PaperSizes.custom;   
    myPreset.pagePosition = PagePositions.UPPER_LEFT;
    //myPreset.screening = ("110 lpi / 1200 dpi");
    myPreset.cyanFrequency = 110;
    myPreset.cyanAngle = 15;   
    myPreset.printCyan = false;
    myPreset.magentaFrequency = 70;
    myPreset.magentaAngle = 15;
    myPreset.printMagenta = false;
    myPreset.yellowFrequency = 70;   
    myPreset.yellowAngle = 0;
    myPreset.printYellow = false;
    myPreset.blackFrequency = 70;   
    myPreset.blackAngle = 45;
    myPreset.printBlack = false;
    mydpp = myDocument.printPreferences;
    mydpp.activePrinterPreset = "tempPreset";
    f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
    mydpp.printFile = f;
    myDocument.print(false, undefined);
    myPreset.remove();
    myDocument.save();
    myDocument.close();
inkDialog.destroy();
So far it's been working quite nicely. Thanks for all the help everyone. If there is anything that looks like it should be changed please let me know. It's been a while since I did anything like this.
Nate

Similar Messages

  • OfficeJet 6500 A Plus Won't print on certain color paper

    When I try to print on certain colors of pastel paper I get an error message saying there is a mismatched page size. This is a refurb unit because the original printer wouldn't print all colors of ink consistently and replacing the printhead didn't correct the problem.
    After an hour on the phone with tech support we were able to get it to print on pastel paper if I set it to draft quality but it still won't print in normal quality. Tech support blames it on the brand of paper I have despite the fact that I didn't have this problem with the same paper (even from the same ream) with the original printer. The only solution available to me is to use draft quality or use HP brand paper (and that is simply what I was told, I haven't bought their paper to see if this works - haven't even found their color paper).
    Anyone have a real explanation/solution to this problem since HP clearly isn't standing behind this product? (Yes, they have replaced the printhead, the printer and now are replacing the duplexer, but having to replace all these parts and still telling me I have to use draft quality does not bode well for the quality of this product.)
    Thanks for any help/suggestions.

    I have the same problem. The printer seems to sense the paper before printing and if it's pastel, is feeds that sheet through and every other one until it finds a pure white one, then it prints. I tried different paper type settings under printer properties before printing but no luck.
    I got tired of wasting paper and ink so in the end I took a print out on plain white paper and photocopied it onto the pastel paper. That worked fine.
    This tells me that the printer driver is messed up or I did not manage to hit on the right paper type setting for the paper I was trying to use.
    Photocopying onto your specialty paper is a suitable work around if you are printing just a few pages but not for larger runs.
    Irv

  • Print only primary colors

    Hello there, 
    I just bought 2 new cartridges for my printer HP Photosmart c4600 All-in-one series and tried to print docs in color.  
    - 1 HP 300 (CC640EE) Remanufactures High Capacity Black Ink cartridge
    - 1 HP 300 (CC643EE) Remanufactures High Capacity Colour Ink cartridge. 
    However, it only print in blue, pink and yellow (no orange or other or so). Could you let me know how I can solve this? 
    We use it for our social entreprise and have many posters and flyers to print on daily basis and the quality is very bad. 
    Many thanks for your help, 
    Caroline

    Hi @Caroline1985,
    Welcome to the HP Forums! 
    I understand that your HP Photosmart c4600 is only printing primary colors. I am happy to help!
    Please see the following guides:
    Can I Refill The Ink In My HP Ink Cartridge?
    Fixing Print Quality Problems for the HP Photosmart C4600 and C4700 All-in-One Printer Series.
    I would also suggest using HP Genuine ink cartridges, not remanufactured cartridges, as it is a possibility the issue could lie with those cartridges.
    Hope this information helps, and have a good day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Print button that prints only certain pages

    I am using Acrobat Pro, and have a large document, the first four page section of which can be a stand alone document.
    I have set up one print button which uses Execute a menu item > File > Print, for users who want to print the whole document.
    I would like to create another button that prints only the first four pages - is this possible?
    Thanks in advance

    You need the Acrobat Pro forum

  • Special effect to make only certain colors "glow"

    Is there an effect that I can use that will allow me to select a certain color and then make it have a glowing type effect? Thanks

    The Color Corrector filters are fundamentally chromakeyrs. They create a color-specific, masked set of pixels that are processed with overlays and curve tweaks according to the settings of the CC filter. I've never done it myself but I've been told you can export the alpha mask form the CC independently.
    In the olden days in After Effects, we'd use various keyers to extract the alphas and then apply colorization and blurs or rays to the imported or nested movies.
    bogiesan

  • How to print only certain parts of a page based on form input

    I need to know how to do the following.
    I have a PDF with a listing of five addresses. I need to be able to use radio buttons, check boxes, or something similar in order to select certain addresses, and have only those print. But, I need to keep all the addresses available in the electronic copy, and the addresses can't be editable by others. Other people can only choose to print the sheet showing just the addresses they want, such as 1, 2, and 5.
    Is this possible? If so, how?
    Your help is appreciated!

    One way is to set up five buttons, one for each address. Create a separate PDF for each address and use them as the icon source for each button. To set up a button to use an icon, set its Layout to something other than "Label Only".
    The buttons should be set to be read-only, and not have a background or border color. When the corresponding check box is selected, the address button would get set to be printing, and non-printing if deselected. Use something like the following as the Mouse Up JavaScript for each check box.
    // Mouse Up script for check box
    var f = getField("Address1_button");
    f.display = (event.target.value === "Off") ? display.noPrint : display.visible;
    Replace "Address1_button" with the actual name of the corresponding button.
    Instead of using buttons to display the addresses, you may be able to use text fields. It just depends on the formatting you need.

  • How can i print only certain cells

    I'm trying to print just a portion of my large spreadsheet.  Is there a way I can only print, for instance, Cells A45 through F96?
    Thank you SO MUCH in advance!
    John

    Hi John,
    I'll agree with Barry on the easiest method...
    Select
    Command-C
    Preview
    Command-N
    Command-P
    Return
    A more sophisticated approach that you might prefer if your printout needs some annotation beyond the contents of the selected range or if you want to add some graphic touches, is the following:
    Select your Cells requiring Printing and Command-C.
    Insert > Sheet and Delete the empty default Table from the New Sheet.
    Edit > Paste Values to Paste your Selected Table segment from the original Sheet to the new Sheet.
    Option-Command-P to Show Print View in your new Sheet.
    Now you can assign Header and Footer Columns and Rows to your copied data, add data descriptions, position things the way you like, etc. Then Command-P, Return.
    Jerry

  • Printing Only Certain PDF Pages?

    I have a PDF which contains about 42 pages. I began printing using my laser printer but I think the toner either gave out or just got too hot. Of those 42 pages only 25 printed correctly. Now I wish to print pages 25-42 but can't figure out how to do that.
    Help? Thanks a lot.

    When the print dialog comes up, look for a little blue triangle next to the printer's name toward the top right of the dialog. Click that and the full options page for the print dialog will show. It's just that the default print dialog has only a few settings. Once you show the full settings in any app, they'll appear each time.

  • Is there a way to delete certain colors in a layer only?

    I am wondering if it is possible to delete only certain colors out of a layer, if I were to go over the color using color picker or something? Thanks guys

    select menu.... see 'select colour range'.
    Then you can use an adjustment layer that is 'attached' to that layer by putting the cursor on the line between the layer and adjustment layer and click the option key then the adjustment will only affect that layer and will be live, ie you can fine tune it later or undo it.

  • Print only pages that are checked on page one??? Hidden is possible?

    Please help. I know a little about java and acrobat but not enough to do everything I want.
    I am making a form that has many pages but not all the pages apply to every event. So what I want to do is put a number of check boxes near the top of the form. When I print I only want the pages that are represented by the checked boxes to print.  Even better, I would like those pages not visible at all just print. For example: Page one is a form that one would fill out: name, address, phone number, etc. Near the bottom that person would check all that apply: page A, page B, etc. That’s all he would see but when printed, it prints out the form and any of the pages that are checked.
    Am I asking too much?
    Thank you for any and all help.

    It's possible to use a script to print only certain pages, but any contiguous page ranges have to be sent as a single print job. For example, to print pages 1-5, 10-20, and the single page 50, you would have to issue 3 separate print statements.
    It's possible to have non-visible pages (templates), but it's not possible to print them until they are displayed. Since Reader 11 now supports templates, it would be possible to display the selected pages in the order that you want, which would presumably be a single continous range of pages, which would then require just a single print statement, as opposed to multiple ones as described above.

  • Color Laserjet 2605dn prints only grayscale in Windows 7

    Over the weekend I upgraded 2 PCs to Win7.  I downloaded the most recent Universal Printer Driver from the HP website (dated Feb 18, 2011).  The problem?  From some applications, the printer now prints only in grayscale.  For instance, all output from CorelDraw X5 is grayscale.  In MS Word 2010, most output is grayscale, but curiously "Word Art" prints in color even when all else prints in grayscale.  Opening a bitmap (photo, for instance) in MS Picture Editor, it will print in full color, but the same photo opened in CorelDraw X5 or imported into MS Word will print only in grayscale.
    I have uninstalled the printer driver package (using Microsoft Management Console) and reinstalled it, with the same results.
    Help!

    I do not know of any availability of a previous driver for Windows 7 32bit for this printer. Did you try both drivers from this page:
    Drivers for 2605dn
    The drivers listed for PCL6 and Postscript, are different in size, maybe one will fix the problem. Make sure to uninstall one before trying the other.
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

  • Epsom R2400 Printer - turning off color adjustment in CS3

    Printing very well with R2400 in CS2 but.....
    In Photoshop CS2 there was a button to allow Photoshop to control the color printing by selecting it and later to select 'no color adjustment' This worked out great.
    In Photoshop CS3 I can also select Photoshop to control the color management but the images come out wrong. Cannot find ' no color adjustment button.' CS3 Help says "turn off color management for printer profile settings.' Where or how do I do this?
    Thanks for any help you can provide. Roy

    HI Ramon, After PRINT and in the Epsom R2400 dialogue box (layout page) there are only the following selections offered:
    Color matching (nothing available to select)
    Paper Handling
    Paper Feed
    Cover Page
    Printer Features (use for my selections but no ability to to turn off color management)
    Summary
    In CS2 there was a color management Dialogue Box and I selected NO Color management and printed with confidence,
    Am I missing something here? Do you use Match Print Colors?
    Falling behind in my work and appreciate your time, Roy

  • I have HP Deskjet 3510 connected wireless - problem is that it wants to print only black and white - is there a color button I am missing?  The print quality report is fine in color etc.

    I have a HP Deskjet 3510 and it wants to print only in black and white. 
    The Print Quality Report is fine and in color.
    Is there a color button I am missing?

    In the Print & Scan system preferences, does it indicate it is using a generic printer driver or a Gutenprint driver?
    Also, if you click on Options & Supplies, you might want to check and see if has to be enabled. That kind of sounds odd though.
    Another thing is it might not be showing. If the bottom of the print dialog has a button that says "Show Details," click it. Then, you can change settings in the popup menu.

  • Why does 3522 prints only in black and white not in color

    my 3522 hp printer will print only in black not in color.i have new color carttridges #564 and the black is not low.any help would be appreciated.

    The troubleshooting steps in the document here may help resolve color not printing on your Deskjet 3522.   If this does not resolve the issues please provide some further details - what is the operating system on your computer?  Does the printer make color copies properly?

  • OfficeJet J4550 All-In-One not scanning or copying; only prints from certain sites

    I have a HP Pavillion Slimline 400 and my will not scan or copy, and only prints from certain sites.  I have uninstalled and installed the software driver numerous times and still get a "scanner not working" message.  I have also unplugged and turned off and replugged in the USB and the power cords several times.  Currently, I have uninstalled the printer software, so I have no recognizable printer on my PC.  Help!!

    Hello bran1288,
    Welcome to the HP Forums.
    I see that you are having an issue with scanning and printing from a select few sites.
    I have a few steps that we can try to troubleshoot this issue.
    First off, please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector.
    As for printing from web pages, please make sure that you have your firewall or anti virus settings turned down as well as the Pop-up blocker disabled.  If this does not resolve the issue, maybe try another web browser such as Mozilla fire fox or Google Chrome.
    As for the scanning issue,  so I can better assist you, please respond with which Operating System you are running:
    Which Windows Operating System am I running?
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    Please write me back when you have time and I will be happy to help.
    Cheers, 
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

Maybe you are looking for