Script for printing changed pages only

Does anyone know of a script that will allow the printing of only those pages that have had changes made to them since a previous save? I'm a typesetter doing work only on books and journals and sometimes it's a bit tedious to keep track of the individual pages one works on. thanks,

Ok,
Here is a raw code. All you need to do is edit the script to specify the printer preset you want to use. I don't have a printer my self to debug but I think it should work.
Here is the idml to grab the object styles. Don't forget to apply on objects located onto the pasteboard. The script look for these objects and grab the page name next to them to finally print these pages.
Hope it helps,
Loic
function main(){
          var doc,
          changedArray = [],
          changedStyle,
          unchangedStyle,
          i=0,
          max=0,
          found = [],
          pagerange = [];
          obj,
          vb,
          leftPage,
          leftPageBounds,
          rightPage,
          rightPageBounds,
          pagerange = "";
          if(!app.documents.length){ return; }
          var doc = app.activeDocument;
          changedStyle = doc.objectStyles.itemByName("changed");
          unchangedStyle = doc.objectStyles.itemByName("unchanged");
          if(!changedStyle.isValid ||  !changedStyle.isValid){
                    alert("Problem with object styles. Script requires both \"changed\" and \"unchanged\" styles.");
                    return;
          app.findObjectPreferences.appliedObjectStyles = changedStyle;
          found = doc.findObject();
          max = found.length;
          for(i=0; i<max; i++){
                    obj = found[i];
                    vb = obj.visibleBounds;
                    leftPage = obj.parent.pages[0];
                    leftPageBounds = leftPage.bounds;
                    rightPage = obj.parent.pages[-1];
                    rightPageBounds = rightPage.bounds;
                    if(vb[1]>rightPageBounds[1]){
                              pagerange.push(rightPage.name);
                    else if(vb[1]<leftPageBounds[1]){
                              pagerange.push(leftPage.name);
          app.printPreferences.activePrinterPreset = app.printerPresets.itemByName("my printer preset");
          var oldPrintPrefs = doc.printPreferences.pageRange;
          doc.printPreferences.pageRange = pagerange.join(",");
          alert("Gone printing");
          app.print();
          doc.printPreferences.pageRange = oldPrintPrefs;
main();

Similar Messages

  • Button to 'Print This Page Only to a printer of your choosing'

    I need to create a button to allow my user to print their current page to a printer of their choosing.
    Having them go to file print, etc etc is not an option as it will be used by hundreds of people, and the pdf is hundreds of pages long. (if they just select 'Print' that would be a lot of wasted paper)
    Ive been able to locate a Javascript that prints to the Default Printer, but my users change computers several times per day, and the default printer might located on the other side of town!
    Here is the script for 'Print this page to default printer' if anyone can assist by altering it to choose which printer, that would be amazing..
    Javascript:
    this.print(false, this.pageNum,this.pageNum);
    Even creating a button to open the print dialog box with 'Current Page' pre-selected would be ok.

    You need to use the PrintParams properties to get/set the print UI:
    var pp = this.getPrintParams();
    pp.firstPage = this.pageNum;
    pp.lastPage = pp.firstPage;
    pp.interactive = pp.constants.interactionLevel.full;
    this.print(pp);

  • Change Report Font Size for Printer Friendly Page

    I have a report using a template of 'Reports Region' and I have a link to a printer friendly page. Because the report text is so big I would like to make it smaller. I have already reduced the width of the report region but that has made 2 page reports run into 4 pages. I tried adding tags to the page to modify it but I was only able to make the text at the top of the page smaller and not the report. I tried modifying the theme_V3.css file but I could not find a place to modify text/font size in the report (This was trial and error as I am unfamiliar with css).
    I would like to only have it smaller on the printer friendly page but if I will be forced to change it all the time I would like to know if there is at least an option.
    If the only way to make this happen is to build a custom report then so be it. (But again the printer friendly page only pulls in the current page and I want it to only be small on the printer page)
    I am on V2.2.
    Thanks

    You need to use a print media stylesheet. You'll need to find class(es) or other CSS selector(s) to attach the font size rule(s) to - look at the HTML source for your page.

  • Script for downloading files from pdf placed on web, script for printing for exchange-

    Looking for java script command to set on button in pdf. We have mp3 and pdfs on our web site, example of URL: http://www.uzlicek.cz/download/Pohadky/O_holcicce_ktera_si_prala_byt_dospela.mp3
    By clicking on button/link in reader I would like to appear a dialog box with offer to Safe file as…
    Any suggestion? In case of using “link tool” the file starts downloading to cache and this is not the objective. In case of using “sound tool”, the file does not appear for saving.
    For exchange the script for Print the current page:
       var n = this.pageNum;
        var pp = this.getPrintParams();
        //pp.pageSubset = pp.subsets.all;
        //pp.printContent = pp.constants.printContent.doc;
        pp.firstPage = n;
        pp.lastPage = n;
        this.print(pp);
    Cheers Martin

    It can't be done using only a PDF file - any link to a URL will simply open your web browser, and whatever handler that browser uses when presented with MP3 files will be triggered (download, play, etc.) - nothing in the PDF can override that handler and force a "save" operation.
    Instead you'll need to configure your website to force downloads (using HTTP headers) and link to those URLs instead; which is a subject outside this forum.

  • Keyboard shortcut for printing _current page_ only in Reader 8?

    Hi there,
    I'm working through a large PDF-file, and need to print individual pages while reading through the whole of this PDF file. I don't think that there is a keyboard shortcut for printing _current page_ only.
    I'm aware that CTRL-P gets you to the print menu, but then I always have to opt for clicking on "current page" AND "ok"... With about 50 pages out of a 100-page document this is cumbersome.
    If there isn't such a keyboard shortcut, could Adobe consider giving its users the option to customised shortcuts, and implement this option of printing a current page only?
    Many thanks,
    Pli

    no it doesn't
    it just changes font size

  • JS: How to make a script to print one page at a time and set print job name?

    What I want is to print one page at a time to the printer.
    Document.print(false, app.printerPresets.item(0)) almost get me there. But how do I get it to print page by page? There seems to be no way to set which page to print to printerPreset.
    Also, is it possible to change print job name from the default of using document name?

    >Is there any solution to this other than saving the document to a different name before each page print?
    Here is an altered and abriged version of the script that I use. I use print preset called "PS to PDF" in it, so you should change it to your own.
    if(app.documents.length == 0){
       alert("Please open a document and try again.");
       exit();
    var myFolder = Folder ("~/Desktop");
    var myDoc = app.activeDocument;
    var myNoExtention = getFileNameOnly (myDoc.name);
    var myPrintPrefs = myDoc.printPreferences;
    if (app.printerPresets.item("PS to PDF") == null) {
       alert("Preset \"PS to PDF\" has not been installed");
       exit();
    else {
       myPrintPrefs.activePrinterPreset = app.printerPresets.item("PS to PDF"); 
    myDoc.sections.everyItem().sectionPrefix = "";
    myDoc.sections.everyItem().includeSectionPrefix = false;
       var stop = myDoc.pages.length;
       var w = new Window ( 'window', 'Printing PS-files' );
       var pb = w.add ('progressbar', [12, 12, 300, 24], 0, stop);
       var txt = w.add('statictext');
       txt.bounds = [0, 0, 200, 20];
       txt.alignment = "left";
       w.show()
    for(var myCounter = 0; myCounter < myDoc.pages.length; myCounter++){
       curPage = myCounter + 1;
       pb.value = curPage;
       var myText = String("Page " + curPage + " of " + myDoc.pages.length);
       txt.text = myText;       
       var myPageName = myDoc.pages.item(myCounter).name;
       var cornumber = pagenum(myPageName);
       var myFilePath = myFolder + "/" + myNoExtention + "_" + cornumber + ".ps";
       var myFile = new File(myFilePath);
       myPrintPrefs.pageRange = myPageName;
       myPrintPrefs.printFile = myFile;
       myDoc.print(false);
    w.hide();
    alert("Done!");
    function pagenum(myNumber){
       if (myNumber >= 1 && myNumber <= 9)
       x =  "0" + "0" + myNumber;
       else if (myNumber >= 10 && myNumber <= 99)
       x = "0" + myNumber;
       else if (myNumber >= 100 && myNumber <= 999)
       x = myNumber;
    return x
    function getFileNameOnly (myFileName) {
       var myString = "";
       var myResult = myFileName.lastIndexOf(".");
       if (myResult == -1) {
          myString = myFileName;
       else {
          myString = myFileName.substr(0, myResult);
       return myString;
    Kasyan

  • Script for printing using alternate layout in Word

    I am relatively new to Applescript, but have a basic understanding of commands, etc. I am trying to write a script to print the active document in MSWord in draft quality. I often print large volumes of docs for quick reference but do not need high quality output. I am simply saving ink. How does Applescript access the printing preference settings? The Word script library obviously has no specific commands for the print dialog options, and I don't see any applescript commands to do it either. Since printing is handled by OS X, not by Word, I assume the commands will rest outside of the Word tell block?
    Any help would be super!
    Dual 2.0 G5 PPC   Mac OS X (10.4.8)   1GB DDR GeForce 6800 Ultra Mac Mini 1.4

    It can't be done using only a PDF file - any link to a URL will simply open your web browser, and whatever handler that browser uses when presented with MP3 files will be triggered (download, play, etc.) - nothing in the PDF can override that handler and force a "save" operation.
    Instead you'll need to configure your website to force downloads (using HTTP headers) and link to those URLs instead; which is a subject outside this forum.

  • Publishing changed pages only

    How do I get iWeb to only publish changed pages? It is taking an incredibly long time for my uploads because it is re-publishing my entire site each time I make a change. Also, is there a feature in either iWeb or iPhoto that lets me shrink my picture size? Thanks.

    Like you, I also have iWeb 1.1.1 and publish to .mac as my host. I just did a test and created a test page within my 'Site 1' (Note, names have been changedc to protect the innocent, as Sgt Web used to say). It was the only page/site with the red color. When I clicked publish, the progress window said "Creating welcome", then "Creating Site 1", then "Creating Page 1" (that's first page in Site 1) then "Creating Page 2", etc through all 24 pages in Site 1. Then "Creating Site 2" followed by each of the 5 pages in Site 2. Then "Creating Blog" followed by each of the 4 entries in my blog.
    so I conclude that you must be born under a lucky star, as I'm clearly not experiencing the simpler world that you are. I'm envious!

  • Records missed from DELTA for which changes made only in enhanced fields

    Dear Friends,
    I have enhanced a feild in standard extractor 0UCINSTALLAH_ATTR_2 by adding a z-field in append structure and writing corresponding code in customer exit. In RSA3 also I'm able to see the data getting reflected for enhanced z-fields but when I'm pulling delta those records are not getting extracted for which changes have been made only in Z-FIELDS in R/3 side.
    i.e. if I do not make any changes in std fields of the std. extractor and only change z-fields this record is missed from delta data pulled. Please help urgently.
    Regards,
    Amit Srivastava

    Hi ,
    Some times it happens that the system is not able to capture the delta based on the changes made to the Z - fields :
    You can think of the following options :
    1. You can write a code in the user exit for this thing so that the changes are captured(Not sure how it is done, however had read that it is possible. You may have to explore the same)
    2. Try to change any of the standard fields used for delta along with the custom fields so that the changes get captured.
    3. Extract a full load instead of a delta load. This may depend on various parameters
    I hope you have already checked the extraction.
    Hope the above points help.
    Regards,
    Adarsh Mhatre

  • Officejet 8100e prints test page only

    New computer add to network, windows 8, network printer located on this computer, other work stations xp, installed printer to xp stations over network, prints test page fine, no other software prints to the printer. Updated firmware to printer, updated drivers, installed, reinstalled, installed, same issue. What is missing settings in windows 8?

    Hi Brian,
    I am sorry to hear about your Officejet 8100e not installing properly on your Windows 8 PC. I would like to do my best to help you.
    I understand you have updated the Firmware and uninstalled and reinstalled as well.
    I am going to suggest these steps, in order:
    Uninstalling the printer using this driver removal utility - Level 3
    Restart you PC
    Installing the printer using The Printer Install Wizard for Windows
    I hope this helps!
    Good luck
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • I am trying to crop a portrait photo into 6x4 portrait ready for printing.  Iphoto only crops it landscape and therefore cuts out most of the photo.  Is there any way of resolving this?

    I am trying to crop a portrait photo into 6x4 portrait ready for printing.  I am using Iphoto on a Macbook Pro.  Everytime I try and crop the photo, it crops in Landscape which cuts out most of the photo.  Is there any way of resolving this?  I am new to Macs as I am currently switching from MS.  It is very easy to do this in MS photo editor so I can't believe it can't be easily done in Iphoto!

    These are the two steps that Larry describes:
    #1
    #2

  • AE Setup for printer and Airtunes ONLY?

    If I set up a wireless network on my AE for printing and Airtunes, but my laptop accesses the internet via ethernet, does the AE allow access to that connection backwards through the laptop? (I don't want it to).

    dasharst, Welcome to the discussion area!
    Yes that is possible.
    If your Linksys is a wireless router, simply configure the AirPort Express (AX) to join the wireless network created by the Linksys.
    If your Linksys isn't wireless, simply connect the AX via Ethernet to one of the Linksys LAN ports. Configure the AX to act as a bridge (not sharing a single IP address).

  • Duplex printing for last 2 pages only

    A customer has an invoice report where they want the terms and conditions (which are 2 pages) duplexed while the report itself is not printed that way.  Any ideas if this can be done using native SSRS?
    Sherry

    I am not sure this will work or not, but you could embed the printer code for duplex printing into your stream. 
    For HP printers:
    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-bpl02705-2%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken#top
    Simplex/Duplex operation
    NOTE: This is only
    applicable to duplex capable printers.
    Function
    Parameter
    Command
    Decimal Value
    Hexadecimal
    Value
    Simplex Print
    Simplex
    Ec&l0S (s)
    027 038 108 048 083 (115)
    1B 26 6C 30 53 (73)
    Duplex Print
    Long-Edge Binding
    Ec&l1S (s)
    027 038 108 049 083 (115)
    1B 26 6C 31 53 (73)
    Duplex Print
    Short-Edge Binding
    Ec&l2S (s)
    027 038 108 050 083 (115)
    1B 26 6C 32 53 (73)
    Long-Edge (left) Offset Registration
    # of Decipoints (1/720")
    Ec&l#U (u)
    027 038 108 #...# 085 (117)
    1B 26 6C #...# 55 (75)
    Short-Edge (Top) Offset Registration
    # of Decipoints (1/720")
    Ec&l#Z (z)
    027 038 108 #...# 090 (122)
    1B 26 6C #...# 5A (7A)
    Page Side Selection
    Next Side
    Ec&a0G (g)
    027 038 097 048 071 (103)
    1B 26 61 30 47 (67)
    Page Side Selection
    Front Side
    Ec&a1G (g)
    027 038 097 049 071 (103)
    1B 26 61 31 47 (67)
    Page Side Selection
    Back Side
    Ec&a2G (g)
    027 038 097 050 071 (103)
    1B 26 61 32 47 (67)

  • Hi! how do i change the bleed in indesign for a single page only? thanks

    tryed threw edit >> document setup , but it changed all the pages. is ther a "page setup" or a different way?

    In addition, a document "needs bleed" or it doesn't. Can you explain why your document needs *different* amounts of bleed?
    Modern imposition software can cut off any excess bleed when and where necessary. However, it cannot "add" bleed where required. So more is better (although 5 mm all around usually is enough).

  • I have a problem with a php script for loading dynamic pages using flash as menu bar, but the urls in the flash is not processed by the php script only in firefox

    '''php script:'''
    <?php
    $page = $_GET['page'];
    if ($page)
    include ("inc/".$page.".php");
    else
    include ("inc/home.php");
    ?>
    '''Action script 2.0 in flash:'''
    on(release){
    getURL("index.php?page=new");
    }

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the mozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=25

Maybe you are looking for

  • IMac vs printer sharing

    System Preferences Settings: Firewall: "Allow only essential services" (recently changed from "allow all incoming connections") "Printer Sharing" allowed in Firewall block below. Print & Fax: Proper printer selected, Green button light "on", Printer

  • Query Regarding Oracle SQL Developer

    Hi Guru's, There is a confusion regarding Installing SQL Developer, whether i need to install Oracle Software on my machine so that i use SQL Developer from my machine or i use SQL Developer without installing Oracle Software as i check the documenta

  • Exisable Purchase Item Return problem

    Hello I have Item that only Purchase item & Inventory Item I raised the AP Invoce for that Exisable Item but all material will return so i create goods return then copy to outgoing Exise invoice that time i have a error that the item is not a sale it

  • "Remote service error" question

    If i run my application from Flex Builder then my HTTPService calls work fine. But if i run application using .html file in /bin/ directory then i get the following error: faultCode:Client.CouldNotDecode faultString:'Default decoder could not decode

  • Errors installing Fabric Manager 3.3.x on Linux

    With the 3.3.x version of FM, PostGreSQL is the local DB that gets installed with FM. During an install on Fedora 9 I keep getting errors during the DB install portion. The errors revolve around the inability to find certain libraries. Examples are s