Delete all pages except currently viewed?? Acrobat Javascript

Hello All,
I need to delete all pages in a PDF except the one that is currently being viewed. I thought I had it with this:
var keepPage=this.pageNum
this.deletePages({nStart: keepPage+1, nEnd: this.numPages -1});
var keepPage=this.pageNum
this.deletePages({nEnd: keepPage -1});
But this only works if you are on a page other than the last page.
I appreciate any help.

Thank you so much. I had done this:
var keepPage=this.pageNum
if
(this.numPages -1 > keepPage)
this.deletePages({nStart: keepPage+1, nEnd: this.numPages -1});
var keepPage=this.pageNum
this.deletePages({nEnd: keepPage -1});
Which worked, but would give a:
TypeError: Invalid argument type.
Doc.deletePages:8:App Delete_other_pages:Exec
===> Parameter nEnd.
in the console if you were on page 1.
Yours is clearly done by somebody who knows better. I'll put this in an AcroButton and be in business. Best.

Similar Messages

  • Is there any way to delete all cookies except those used on the home page?

    Is there any setting in Firefox which would permit me the deletion of all cookies on exit EXCEPT those associated with with specific pages? For example, the iGoogle home page requires a cookie to be set which recognizes the session created in a prior access. If all cookies are deleted on closure of Firefox, the user is required to sign in to iGoogle every time to see their home page. Currently you can delete cookies on exit or accept cookies based on exception. I would like to delete all cookies except those from permitted sources. There is no setting for this that I can find.

    You can let all cookies expire if you close Firefox and set an allow exception for domains that you want to keep the cookies from. Don't use [[Clear Recent History]] to clear cookies as that will remove all cookies including ones with an exception, but just let the others expire.
    You can always remove cookies manually, e.g. via a click on the favicon and More Information and View Cookies.
    You can see all permissions of the current domain here: Tools > Page Info > Permissions

  • I just sinced up to an old iphone and it deleted all of my current iphones info and loaded all of the older stuff on it. How do I undo this???

    I just sinced up to an old iphone and it deleted all of my current iphones info and loaded all of the older stuff on it. How do I undo this???

    Hi Khuram1981 - thank you thank you thank you!  All sorted!  dont suppose you know how to fix another problem I have??? for weeks now, since updating to ios5 I think, for some reason every time I have tried to log onto app store it says CANNOT CONNECT TO ITUNES STORE.  It's nothing to do with my computer, and I've been to the Geniius bar but they couldnt help and nothing I seem to do lets me update my Apps and even worse, I cant even buy any more.  Any suggestions?
    Again thank you SO much for helping with other problem = a real relief.
    Chatterwind xx

  • I need to print the footer in all pages except last page.

    Hi,
    I'm working on PO RTF template. I got one probelm, I need to print the footer in all pages except last page.
    Can someone help me in this.
    Thanks in advance.
    Venki.

    This question has been answered already multiple times - please search the forum before posting a question - in case you did and you didn't find it - we added a feature
    in 5.6.2 to solve this problem - It is described in the user guide in the RTF template section search for start@last-page:
    Last Page Support
    XML Publisher now has the ability to show content only on the last page. This is useful for documents such as checks, invoices or purchase orders where you want want content such as the check or a summary in a specific place only on the last page.
    The basic command is:
    <?start@last-page:body?>
    <?end body?>
    http://forums.oracle.com/forums/search.jspa?threadID=&q=%40last-page&objID=f245&dateRange=last90days&userID=&numResults=15&rankBy=9
    Any content above or below these two tags will only appear on the last page of the document.
    Hope that helps,
    Klaus

  • Delete all rows except 10 random rows

    Hi,
    how can I delete all rows from table JOBS except 10 random rows?
    Someone asked it before (not here..): http://stackoverflow.com/questions/10820105/t-sql-delete-except-top-1
    but I didn't understand the answer, and I don't think it will work in PL/SQL.
    If the answer in StackOverflow does works in PL/SQL, I will glad if someone explains me with better example,
    If the answer in StackOverflow does'nt work in PL/SQL, I will glad if someone gives me an example.
    thanks!

    Actually I found a problem in this solution.
    delete from jobs where rowid not in (select rowid from jobs where rownum<=10) ;I used the above code to delete all rows except 10 in JOB_HISTORY table, but for some reason the rows that were chosen were only in the range in which (144<=EMPLOYEE_ID<=146).
    I tried this several times and always i stayed with rows in this range.
    Here are the queries:
    SQL> select employee_id from job_history;
    EMPLOYEE_ID
    144
    144
    144
    144
    144
    145
    145
    146
    146
    146
    146
    146
    146
    146
    147
    147
    147
    147
    149
    149
    149
    156
    156
    156
    156
    156
    156
    156
    158
    158
    158
    158
    158
    158
    158
    158
    159
    159
    159
    165
    165
    165
    171
    171
    171
    171
    46 rows selected
    SQL> delete from job_history where rowid not in (select rowid from job_history where rownum <= 15);
    31 rows deleted
    SQL> select employee_id from job_history;
    EMPLOYEE_ID
    144
    144
    144
    144
    144
    145
    145
    146
    146
    146
    146
    146
    146
    146
    147
    15 rows selected
    SQL>
    Glad if someone can explain me why I get this result.
    Thanks
    Edited by: 998093 on 05:01 05/04/2013

  • HT1923 In trying to delete the Apple file in the Program/Common File I can delete all contents except the Internet Services folder.  Thus preventing me from deleting the Apple FIle.  Error message says I need permission to delete this file.  How do I proc

    Trying to delete the Apple Folder from Program Files/Common Files.  I can delete all the contents except for the Internet Services folder which prevents me from making the deletion.  The error message says "you need permission to delete this file".
    Discovered this problem when trying to upgrade from my 3G iPhone to a new 5S iPhone unsucessfully.

    See note 3 of Troubleshooting issues with iTunes for Windows updates.
    tt2

  • How can i delete all history, except open windows and tabs?

    hi, i can not find any way to delete all my firefox history, except open windows and tabs.
    i could not find any solution about in the web. i did try almost all settings in privacy settings, nothing works. any ideas how to do that, or maybe suggestions for add ons?

    Hello,
    Have you looked in:
    * History (or [[Image: New Fx Menu]] > History) > Clear Recent History...
    You can choose what you want cleared and the time frame.

  • SEARCH operation is a no-op on all pages except the first for no reason

    I have tried everything. I have an application made of up of several read-only reports, one per page. Each page has a report region of type SQL Query (PL/SQL Function Body Returning SQL Query). The first page I did works beautifully. I have a Search item P1_REPORT_SEARCH that is incorporated in the Region Source:
    declare
    l_sql varchar2(32676);
    begin
    l_sql := 'SELECT
    "SW_AUDIT_GAP_ANALYSIS"."PROD_FAMILY" "PROD_FAMILY",
    "SW_AUDIT_GAP_ANALYSIS"."PROD_CLASS" "PROD_CLASS",
    "SW_AUDIT_GAP_ANALYSIS"."ROS_COUNT" "ROS_COUNT",
    "SW_AUDIT_GAP_ANALYSIS"."OTHER_COUNT" "OTHER_COUNT",
    "SW_AUDIT_GAP_ANALYSIS"."TOTAL_INSTALL_COUNT" "TOTAL_INSTALL_COUNT",
    "SW_AUDIT_GAP_ANALYSIS"."PURCHASE_COUNT" "PURCHASE_COUNT",
    "SW_AUDIT_GAP_ANALYSIS"."VARIANCE" "VARIANCE",
    "SW_AUDIT_GAP_ANALYSIS"."KNOWN_LIC_COUNT" "KNOWN_LIC_COUNT",
    "SW_AUDIT_GAP_ANALYSIS"."COMPLIANT_STATUS" "COMPLIANT_STATUS",
    "SW_AUDIT_GAP_ANALYSIS"."COMPLIANT_STATUS_VERIFIED_BY" "COMPLIANT_STATUS_VERIFIED_BY",
    "SW_AUDIT_GAP_ANALYSIS"."COMPLIANT_STATUS_COMMENTS" "COMPLIANT_STATUS_COMMENTS"
    FROM
    "SW_AUDIT_GAP_ANALYSIS"'
    l_sql := l_sql ||' where ';
    l_sql := l_sql ||' (
    upper("PROD_FAMILY") like ''%''||upper(:P1_REPORT_SEARCH)||''%''
    return l_sql;
    end;
    When a search value is entered, it returns the correct result set. All of the other pages are identical to this one in EVERY RESPECT except for differing underlying tables. But no matter what I've tried, I cannot get the SEARCH to return a result set on any of the pages except the first. It doesn't appear to do anything. I'm at my wit's end and totally disgusted. I have spent HOURS and HOURS on this. SOMEONE PLEASE GIVE ME A CLUE!!!!!

    Page 1 and 2 look okay, page 3 has a clear cache process that runs when the page is submitted so that will clear the search item. Page 4 looks like it should work. Page 5 has an unconditional clear cache process, etc.
    You probably don't want to clear the cache unless a reset button is used. The sequence of operations is: Report is shown on page. You enter a search value and press Enter or the Go button. The page is submitted. The page items are cleared by the clear cache process. The page branches back to itself only to show the results of the same query using a null search value. This could go on all day.
    Scott

  • How to apply template page to all pages except for logon page?

    Hi,
    I created a template page with id 0 that contains some copyright and other basic information of my application. Is there a way to apply this to all pages within my application except for the logon page?
    Regards,
    Tamas

    It's possible to make page items or regions conditional on the page not being a page number that you specify.
    Head to your page 0, and look for the relevant item in your conditionals list. Select it and specify your login page number in there and all should be well!
    Ben

  • Delete all users except one?

    hi there,
    I'm in a lab environment where I need to be able to delete all user accounts except "Administrator" on remote machines from ARD that accumulate from unsuccessful syncs, etc.
    Is it possible to run a selective rm -rf command that will do this? I've googled, but the solutions don't seem to work for me.
    Thanks!

    I found this article: http://snippets.dzone.com/posts/show/3908
    It says to use this command:
    find . ! -name "*.ogg" -exec rm -f {} \;
    Adapted for my purposes:
    find . ! -name "administrator" -exec rm -rf {} \;
    I tried this on a folder called "test" on my local machine with folders named 1, 2, and 3 (keeping 2) and it worked, but I want to make sure this is a good idea before I push it out via ARD to 90 workstations. Thanks!

  • How to delete all pages history .

    motorola defy. android. installed ext. Cleary and Quick Fennec. all pages history is not deleted.
    web site history is deleted.

    You can use the Android system's clear data option if you don't mind fully resetting Firefox.
    Android Menu button > Settings > Applications > Firefox > Clear data

  • I can delete all photos except for one album where no trash can appears. How can I get rid of the album?

    I have an album of photos on my IPAD that I can not delete. It was imported from a camera card. I have managed to delete all other photos taken the same way but these appear to be stuck on the IPAD as no trash can icon appears. Also, my other photos appear in the imported folder and also albums. The photos in the album that won't delete only appear in that album?

    You would get more responses from iMovie users by posting in the iMovie community >  iMovie for Mac: iLife: Apple Support Communities

  • How can I import all photos from iPhoto and delete all the ones currently on my iPad?

    I uploaded all of my iPad's photos to iPhoto('08) thinking it would be easier to delete and organize them. Now that I've done that in iPhoto I need help finding out how to delete all the photos from the iPad and have the iPhoto photos imported from iPhoto back to the iPad.

    This workflow may do what you want:
    1 - launch iPhoto with the Option key held down and create a new library.
    2 - connect the iPad to your Mac with the new library open.
    3 - import all of the photos from the iPad into the new library.
    4 - select the option to delete all of the photos from the iPad.
    5 - disconnect the iPad and delete the new library.
    6 - launch iPhoto with the Option key held down and select your original library.
    7 - assemble the photos destined for the iPad so you can easily identify them by album or event which you alread have done.
    8 - launch iTunes and connect the iPad to your Mac.
    9 - go to the photos section for you iPad and synce those particular albums or Events with the iPad.
    That will get those specific iPad photos back into the iPad.
    OT

  • If i deauthorize all computers will it delete all my songs currently on my computer??

    If i deauthorize all computers will it delete all my songs currenty on my library?

    Back them up anyway. Other things, such as hard drive failures, can.
    (83580)

  • How i can keep password for some bookmark folders and delete all cookies excepting some?

    I want to have password for certain book mark folders before choosing them and I want to clear all cookies EXCEPTING SOME SITES, HOW I DO IT.

    You can't protect bookmarks with a password in Firefox.
    You can let all cookies expire if you close Firefox and make an Allow exception for the ones that you want to keep.
    *Tools > Options > Privacy > Cookies: "Keep until": "I close Firefox"
    *Tools > Options > Privacy > Cookies: "Exceptions"
    Make sure that you do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences" (Site Preferences includes the cookie exceptions)
    See also [[Cookies]] and [[Enabling and disabling cookies]]

Maybe you are looking for

  • How to delete a page of a template using Beta

    I am using Beta version of Pages.   Using a template for a newsletter.   An over run created a 3rd page, which I do not want.  How do I delete that page?

  • My Apple TV is a useless brick now.  Ethernet port no longer works.

    Not sure, but it seems after an update, my ethernet port does not work.  I can plug it into the PS3 and works fine.  I HAVE TO use WiFi now or my Apple TV is a useless piece of plastic that looks "oh so Apple Cool."  Yea, whatever Apple.  I have been

  • CPU load alert on Enterprise Manager

    Hi, We have Oracle Database R1 (11.1.0.7.0). We see alerts on Enterprise Manager; "CPU Load is 2164260864, crossed warning (10) or critical (20) threshold."  frequently. Our CPU utilization looks normal; CPU in I/O Wait (%) = 0 but Run Queue Length (

  • Newbie- Java simply put, isn't to me

    I am totally ignorant about computers & how they work. All I know is the problems that I have when I turn on my PC. For instance, the other night I was at a web site and I was playing a game. The next thing I know is I got dropped from the game & I s

  • Lightroom 6 CC, will not launch photoshop cc in "edit in" mode...

    Any help would be appreciated.I uninstalled photoshop and reinstalled no help.  Worked fine in previous version. Checked preferences looks fine....