Print multiple page ranges based on radio button group choices

Hi ... I have a PDF that is a combined application form made up of 6 separate forms. On the front page, I have 6 groups of "Yes / No" radio buttons.
If the radio button for one or more of these groups is selected as "Yes" then when the Print button (on the page) is clicked then the appropriate page ranges will print.
It is desireable, though not essential, for these to be printed in one print job.
The Code I have been adjusting to try and achieve the result is below but I have tied myself in knots now and any help would be greatly appreciated:
Many thanks
//<AcroForm>
//<ACRO_source>PrntForms:Annot1:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:PrntForms:Annot1:MouseUp:Action1 ***********/
var nButton = app.alert({
cMsg: "Your selected forms will be sent to your default printer.\n\nIf you require to print to an alternative printer, press cancel and select 'Print' from the 'File' menu.",
cTitle: "Submit Forms for Printing?",
nIcon: 1, nType: 1
// array for button responses
//var aResponse = new Array("OK", "Cancel");
if(nButton == 1)
{    this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1 });
} else
if(nButton == 0)
{    this.Exit
var a_app;
if(this.getField("AppForm1”).value=="Yes"){
    a_app = "1, 1";
} else a_app = "0, 0"
var b_app;
if(this.getField(“AppForm2”).value=="Yes"){
    b_app = "2, 2";
} else b_app = "0, 0"
    var pp = this.getPrintParams();
          pp.interactive = pp.constants.interactionLevel.full;
          pp.printRange=[[a_app], [b_app]];
          this.print(pp);
//</ACRO_script>
//</AcroForm>

Hi Gilad D
The 'printRanges.push' function works well on my Mac using Adobe Acrobat Pro XI however when it is used on the systems that the form users will be working on (which runs Adobe Reader 9.4.0.195) the ranges are not pushed to the printer dialogue box and the 'printRange'
in the dialogue is still selecting the 'All Pages' radio button.
Is the printRanges.push function a new and non-backwards-compatible function or is my code the problem
//<AcroForm>
//<ACRO_source>PrntForms:Annot1:MouseUp:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: AcroForm:PrntForms:Annot1:MouseUp:Action1 ***********/
var printRanges = [];
if (this.getField("RBG10").value=="Yes") printRanges.push([0,2]);
if (this.getField("RBG1").value=="Yes") printRanges.push([3,18]);
if (this.getField("RBG2").value=="Yes") printRanges.push([19,27]);
if (this.getField("RBG3").value=="Yes") printRanges.push([28,38]);
if (this.getField("RBG4").value=="Yes") printRanges.push([39,42]);
if (this.getField("RBG5").value=="Yes") printRanges.push([43,54]);
if (this.getField("RBG6").value=="Yes") printRanges.push([14,16]);
if (this.getField("RBG7").value=="Yes") printRanges.push([55,56]);
if (this.getField("RBG8").value=="Yes") printRanges.push([57,65]);
if (this.getField("RBG9").value=="Yes") printRanges.push([66,71]);
if(printRanges.length>0){
   var pp = this.getPrintParams();
            pp.interactive = pp.constants.interactionLevel.full;
            pp.printRange=printRanges;
            this.print(pp);
}else app.alert("No page ranges are selected");
//</ACRO_script>
//</AcroForm>
Any assistance is greatly appreciated.
Many thanks

Similar Messages

  • Javascript Code to Print Multiple Page Ranges in Acrobat

    Hi All,
    I am very new to Javascript (used it for the first time this morning) and was looking for some help.
    I have built a fillable pdf form in Acrobat that I am required to print on a very regular basis.
    However, when I print it, there are only particular pages that I need to print as opposed to the entire document.
    I have put in a Print button that executes the below code when pressed:
    this.print (true, 1, 25) ;
    this.print (true, 27, 28) ;
    This allows me to print two different page ranges, but it separates them into two different print jobs.
    Is there a code that will allow me to put them into the same print job, so that it selects pages 1-25, 27-28 rather than doing them separately?
    I am currently using Adobe Acrobat X Standard.
    Any input would be much appreciated.
    Thanks!

    Acrobat/Reader 11 allows you to use the printRange property of the PrintParams object that's used with the print statement: http://livedocs.adobe.com/acrobat_sdk/11/Acrobat11_HTMLHelp/JS_API_AcroJS.89.1013.html
    See the sample code included at the link above.

  • Add multiple repeating subforms based on radio button

    I have a form with a hierarchy like this:
    Action
    Survey
    Recommendation
    I do not want the Action or Recommendation visible until a radio button on the survey selecting yes is performed. Multiple Recommendations can be added by clicking an "Add" button. Everytime a recommendaton is added, a summary table is also added in the "Action" subform. This is, so far, working.
    My problem is that the user then has the ability to add another instance of the Survey and once again can select the radio button for yes with more Actions and Recommendations. What I cannot get it do is keep the Actions from the first Survey and start adding the additional ones from the new Survey Recommendations.
    I have tried hiding the Action subform until the radio button yes is selected and I have tried setting the instance to 1 when it is selected. But nothing I've tried is working correctly. It either won't added the recommendations from the second survey or resets the Actions back to 1.
    Would a better solution possibly be to have all of the actions compile in a table at invisibly at the end of the form after all the instances have been done? I really wanted them to appear as a sort of summary at the beginning?
    Please, any help!!!

    Hi Satish,
    I have seen some funky behavior with radio buttons and dynamic subforms. Make sure you are testing with Acrobat or Reader version 7.0.5. Earlier versions have some know quirks with radio buttons and dynamic subforms. As for the radio button not populating when merged with data, I haven't seen that problem before in any version. If you can post your form somewhere, I'd be glad to have a look for you.
    Jared Langdon
    J. Langdon Consulting, Inc.

  • Print different page ranges of a document without, each time, having a print dialog?

    Hello,
    Would need your valuable help on that one.
    I have a large PDF File, of which I want to print different page ranges, based on the checkboxes that have been checked by the User.
    Ideally, clicking a "print" button would generate the page ranges, based on the checkboxes that are checked and open one print dialog with the pages ranges already indicated in it. Like this, the User can enter once the printer settings (e.g. booklet or duplex) he wishes, which should then be valid for all the pages contained in all the page ranges.
    Thank you in advance for any tip!
    Cheers
    Serge

    PrintParams.constants.flagValues.duplexTypes.DontCare
    PrintParams.constants.flagValues.duplexTypes.Simplex
    PrintParams.constants.flagValues.duplexTypes.DuplexFlipLongEdge
    PrintParams.constants.flagValues.duplexTypes.DuplexFlipShortEdge

  • Trouble printing multiple pages with HP ENVY 5531

    I am printing wirelessly from a Windows 8 machine.  If I only print one page it works fine every time.  If I try to print multiple pages then on the 2nd or 3rd page it always cuts off the bottom portion of the page.
    There was another post that had a similar problem but the problem went away when they connected up the USB cable from the computer to the printer.  I need to print over wireless so that isn't a good solution for me.

    Hi,
    Try following the steps below and check if that may help:
    - Open the HP software by clicking the HP ENVY 5530 icon within the Desktop or the Start Menu, then click the Printer Home Page (EWS) link.
    - Click the Network tab.
    - Depending on your printer model click on Networking and then on Network Address (IP) or click on IPv4 within the active network connection type.
    - Click on Manual IP , and then click Suggest a Manual IP Address . A manual IP address, Subnet Mask, and Default Gateway displays.
    *Be sure to take a note of the IP address and Confirm the changes, then close the EWS page.
    - Click the HP ENVY 5530 icon within the Desktop or the Start Menu and click the Utilities tab, then click on Update IP Address.
    - Type the manually configured IP address, click on Save and confirm.
    - Open the control panel and go to Devices and Printers.
    - Right click the HP ENVY 5530 icon and select Printer Properties.
    - Open the Ports tab.
    - Click the Add Port button, select Standard TCP/IP and click on New Port.
    - Follow the steps by typing the manually configured IP address and confirm the changes.
    Now try printing and check if the issue been resolved.
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Used to be able to print multiple page pdf files on my HP 7310 all in one and then it stopped and would only print the curent page. This is tedious for long PDF docs. I am on 10.6.8 .

    Used to be ablert to print multiple page pdf files on my HP 7310 all in one printer and now I can only print the current page and therefore it takes forever printing them one by one. I am in version 10.6.8. Tried printing as image using the advanced click and that did not work either.  I have Adobe 9.0 reader installed.

    I tried this earlier, and I tried it again today.  Both times it said "Software Missing!"  and "HP Software required to connect to your printer over the network could not be found on this computer."  But when I tried to install the software (AIO_CDB_Net_Full_Win_WW_130_141.exe, which I downloaded from HP's web site), it wouldn't install, as described above.  In the diagnostic utility, I clicked "skip", and it said "Connection Verified!", and "The printer is connected to the network and the services related to the network connections have been verified and reset to a normal operating state.  Everything appears to work fine at this point.  Please doa test print to verify that the issue is resolved or click Skip to move to the next step."  I clickedthe "Test Print" button, and immediately it popped up a box that said "Test Print Failed."
    I tried again to install the HP software, and it installed, detected the printer, and asked me to select it.  I selected the printer, clicked "next", and it did its network diagnostics.  Then it said "Problem(s) found with your network" and "Problem(s) may exist with the network functions of your printer . . ."  I continued the installation without connecting to the printer.  Then I ran your network printer diagnostic tool again, and got the same result - "HP Software required to connect to youir printer over the network could not be found on this computer."

  • No Scaling when Printing Multiple Pages per Sheet

    I'm trying to print a pdf document but with 2 pages per sheet. I tried to scale up the document by 10% (in the page setup tab) but it actually scaled down about 30%. Any idea what could be going wrong? Can Adobe even scale up and print multiple pages on the same sheet?

    Are you using the Multiple button under the Page Size & Handling section of the Reader Print dialog? This section allows you to determine how many pages are printed per sheet. The scaling is pre-determined by the number of sheets you have selected.

  • Trouble printing multiple pages, not multiple images per page

    I have just upgraded to PS Elements 10 and am having a challenging time printing multiple pages of the same document (image).  These are labels that will be run, so we do 300 of the same image at a time, one per page (label).  From the open Elements .psd file I choose print and set the printer settings, and then choose the amount of labels to print.  No matter what number I put in for the Print X copies of each page, it still only prints one.  When I convert it over to the organizer it seems to work with printing multiple copies.  Having to move each file over especially if we are just wanting a quick test run is very time consuming and troublesome.  It seems like there should be a simple fix that I am missing in the Elements program.

    Hi,
    Try following the steps below and check if that may help:
    - Open the HP software by clicking the HP ENVY 5530 icon within the Desktop or the Start Menu, then click the Printer Home Page (EWS) link.
    - Click the Network tab.
    - Depending on your printer model click on Networking and then on Network Address (IP) or click on IPv4 within the active network connection type.
    - Click on Manual IP , and then click Suggest a Manual IP Address . A manual IP address, Subnet Mask, and Default Gateway displays.
    *Be sure to take a note of the IP address and Confirm the changes, then close the EWS page.
    - Click the HP ENVY 5530 icon within the Desktop or the Start Menu and click the Utilities tab, then click on Update IP Address.
    - Type the manually configured IP address, click on Save and confirm.
    - Open the control panel and go to Devices and Printers.
    - Right click the HP ENVY 5530 icon and select Printer Properties.
    - Open the Ports tab.
    - Click the Add Port button, select Standard TCP/IP and click on New Port.
    - Follow the steps by typing the manually configured IP address and confirm the changes.
    Now try printing and check if the issue been resolved.
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Simple Statement w/ subreport prints multiple pages

    Hello all,
    I have a CR 2008 migrated from older version (CRW 32 6,0,1,135  with VB6 driving the report) that is printing multiple pages when it should be only printing 1 page.
    This report is a Statement that shows customer info and account balances. It has a subreport that typically prints 1 line of report data on each Statement. However, some customers can have 2 or 3 records printed in the subreport. And in the past this all worked fine - it printed 1 page for the Statement even if there were more than 1 record in the subreport.
    After converting to CR 2008 (I did successfully implement SP1 then SP2 after a lot of confusion, then joined this forum - thanks much!) the Statement now prints multiple (identical) pages based on how many records are in the subreport data. I've played with it by testing with customers who had 3 records in the subreport and it generates 3 pages. I've tried modifying the Section control values like "Keep together" and others with no success. We are using VB.Net 2008 now to drive the report.
    If anyone has any ideas or suggestions, I really would appreciate your input. I'm not an expert with CR by any means but I have developed about 40 or so reports over the years and have a decent working knowledge.
    Thanks for anything you may be able to offer.
    Chris

    That's a big jump from CR 6 to 2008.
    It may be easier to just rebuild your report from the beginning rather than trying to fix this one.
    Typically most update a few versions at a time and the import portion of the code can handle the updating relatively the same version. Cr 2008 is now UNICODE and completely different file format.
    Thank you
    Don

  • Print multiple pages on one page in Preview?

    I tried to print a PDF in OSX Lion and I was unable to find the option to print multiple pages on one Page. Instead there is an option to print multiple copies of pages on one page. Does anybody know where I can find the old option from (as in Snow Leopard, Leopard, Tiger..)? (See screenshot.)
    Thanks!
    roboter

    Look under the "Vorschau" menu for the Layout menu, and then choose "Seiten pro Blatt."
    Hope this helps.

  • How do you get rid of white space when you are printing multiple pages to one sheet of paper?

    How do you get rid of extra white space when you are printing multiple pages to one sheet of paper?  When printing multiple pages to one sheet of paper Acrobat won't let you select the "zoom" for printing.
    Thanks

    Take a look at Quite Imposing.

  • How do I print multiple pages (2) to one A4 page?

    Hi folks,
    How do I print multiple pages (2) to one A4 page (as you can in a PDF) ?
    There is no option when I try to print & I have checked advanced etc. I have tried opening as a PDF. I have tried printing to PDF but it won't allow.
    Any ideas or suggestions would be greatly welcomed - I don't fancy printing the whole 188 pages, but I need them all!
    Thanks,

    Hi Chris,
    Try this, and if you have any trouble get back and we'll trouble shoot, but I think it will work for you.
    Open System Preferences.
    Select Print & Scan
    Click on your printer under Printers in the left pane
    Click "Open Print Queue", on the right
    The print queue app will appear on your Dock
    Open a Finder window containing your files to be printed and select them all
    Drag the files from Finder to Print Queue icon in Dock
    Regards,
    Jerry

  • Print multiple pages on a single page in word or from a PDF

    I need to print multiple pages on a single page from a PDF (ie: pages 1 and 2 onto a single page, pages 3 and 4 on a single page etc.)
    Does anyone know how to do this? Thanks

    (near the middle in a pull down menu - if you have the small print window click on the triangle next to the printer name to expand the window
    In preview the menu shows "preview" until you open it to see more - and
    if you have the small print window click on the triangle next to the printer name to expand the window
    LN

  • Any way to get more than 100% zoom on print jobs when printing multiple pages?

    I know how to increase the size of a print job, when I am printing one page at a time. But when I go to print 2 pages at once (the multiple page print function), there are always large margins around the page. I'm ok with saving paper and printing up two pages, but it seems silly to see small print and wide blank margins. Is there any way to increase the print zoom, when printing multiple pages per sheet of paper?

    I once overshot the limit by marking too many photos to fit within 99 pages, but I could never figure out how to fool the application and had to give up trying to add those 14 extra photos.
    I asked a friend (who practically lives in Terminal) if he had any way of modifying that limit, but he reminded me that if their printing services are set up to bind books and bill for only 99 pages, fooling the application might be useless if the service only prints me a 99 page book and discards the additional pages.
    I can understand that you wouldn't want to let people print 1000 page books, but I sent feedback anyway to allow me to increase the limit. Anyone know of any service that lets you print beyond iPhoto's limits?

  • Error in smartform when printing multiple pages

    Hi,
    I m using a smartform which have two pages in it,
    i m able to save and activate it without any error message and when i run the function module generated to chk my smartform
    it runs fine and diplays two pages i m using.
    but as i m attaching this form with my driver program it is giving an error message while running . the error message is " No other output defined in main window."
    Please help me out to resolve the issue.

    Re: error in smartform when printing multiple pages
    dharani tadikonda
    Thanks for this answer. It is absolutely correct.

Maybe you are looking for

  • Find my iPad with 3G but not signed up for service

    Hi, Has anyone been able to get the "Find my iPad" feature from MobileMe to work on a 3G iPad that isn't signed up for 3G service? I supposed I should just enable my 3G, but I wasn't going to bother until I needed to use my iPad outside of WiFi areas

  • No Subscriptions for copy of R/3 site creation in SMOEAC

    Hi, I have a R/3 site in SMOEAC for replicate customers and B2C processes to ECC. And subscriptions for this Site are : BUPA_MAIN, BUPA_REL and BUS_TRANS_MSG. But now I need to transfer BUPA_MAIN and BUPA_REL from another RFC connection to ECC. I cop

  • Album track order different on iPhone?!

    Hi, I bought a single on iTunes and then later completed the album. Now if I select the album through 'albums', the single track always appears on the last position. On iTunes and my iPod nano it's on position 3, where it's supposed to be according t

  • Capture GUI as an Image

    Hi I want to capture the Frame or a diaog using a program, as an Image and later use it in the application.

  • Find/Change resources

    Where are the files stored which you saved in the Find/Change window. I can't find them in the Preset folder.