How to delete empty pages in in-design document?

Hi All,
       How to delete empty page which may contains text frame with no contents, or may be no text frame...
Plz provide me the script...
Thanks in advance,
Vel....

Indesign CS5.
My script is,
doc=app.activeDocument;
pageObj=doc.pages.item(0);
txtObj=pageObj.textFrames.item(0);
var temp=doc.pages.length;
for(var i=0;i<temp;i++)
    if(doc.pages[i].textFrames.item(0)!=null)
            if(doc.pages[i].textFrames[0].contents!=null) // here, i used "contents" instead of "lines". but also not working well...
                alert(doc.pages[i].textFrames[0].contents);
                alert("True");
            else
                doc.pages[i].remove();
                i=i-1;
                temp--;
    else
      alert("False");
      doc.pages[i].remove();
      i=i-1;
      temp--;
I've a sample document which contains a empty page without a text frame and another empty page with text frame with no contents on it... but my script remove only the empty page and not the empty page with txt frame...
pLZ HELP JONGWARE...

Similar Messages

  • How to delete a Page in the portal

    Hello gurus,
    Could you please tell me how to delete a Page in the portal?
    Thanks in advance for any helps.
    Regards,
    Niki Nguyen

    I've tried that procedure, but it keeps giving me a message below, so it won't allow me to delete the Page, what is the next step?  Please advice.
    MESSAGE:
    An error occurred. Objects could not be deleted.
    Objects in the selected folder or object are currently locked
    Thanks in advance for any helps.
    Regards,
    Niki

  • How to delete a page in a adove file

    how to delete a page in a adove file

    You probably mean a PDF file. You need Acrobat; it cannot be done with the free Reader.

  • How to delete a page without deleting more than one

    how to delete a page without deleting more than one in pages

    Hi alldogsgotoheaven,
    Method 1.
    Menu > View > Show Thumbnails
    Click on a thumbnail.
    If it shows a yellow border around all the pages, they a part on a single section.
    Click in your document at the beginning of the page you want to delete, and Menu > Insert > Section Break.
    Insert another Section Break at the end of that page.
    The page is now isolated in its own section and you can delete its thumbnail.
    Regards,
    Ian.

  • How do I add page numbers to my document without the page numbers automatically changing. I do not want the page numbers the software automatically places into my document.

    How do I add page numbers to my document without the page numbers automatically changing? The title page is blank, I can type in 1 on the 1st typed page, but the #1 automatically goes into the next page and will not change.

    Click at bottom of the first page:
    Menu > Insert > Section break
    Click somewhere in the 2nd page (not the header/footer)
    Inspector > Layout > Section > Page Numbers > Start at 1 > Configuration > uncheck use previous headers and footers
    Click into the header or footer of the second page:
    Menu > Insert > Auto Page Numbers…
    If there is anything in the header or footer on the first page that you don't want just select it and delete it.
    If you really wanted to manual place page numbers on each page you will have to use a section break between each and every page. I can't imagine that would be useful.
    Peter

  • How do I add page numbers to a document in Pages 5.2

    How do I add page numbers  to a document in Pages 5.2?   I'm sure there's some way to do this but it's less obvious than in the previous version of Pages.

    Click on one of the Header or Footer fields and you will get a pop-up asking if you want to add page numbers, and a choice of formats.
    You also may use Insert > Page Number.
    Jerry

  • Can i delete a page from my pdf document?

    can i delete a page from my pdf document?

    Hi eyrunner1000
    Yes, if you're using Adobe Acrobat you can do it...
    To Delete a page please see the below link : http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7ec9.w .html#WS58a04a822e3e50102bd615109794195ff-7ec3.w

  • How to get total pages from a Word Document?

    I want have created a program with ABAP, It'll print the cover page with form, the detail infomation is in a word document on a file server. I want to display the total pages in the cover page, how can I do? In another word, how to calculate the pages for a word document in sap ?

    I don't know how to use it. My test codes:
    REPORT print_via_ole_example .
    INCLUDE ole2incl .
    DATA: gs_word TYPE ole2_object ,
    gs_documents TYPE ole2_object ,
    gs_newdoc TYPE ole2_object ,
    gs_actdoc TYPE ole2_object ,
    gs_application type ole2_object,
    gs_document type ole2_object ,
    gs_docproperty type ole2_object,
    p_pages type p .
    START-OF-SELECTION .
    CREATE OBJECT gs_word 'WORD.APPLICATION'.
    SET PROPERTY OF gs_word 'Visible' = '0' .
    CALL METHOD OF gs_word 'Documents' = gs_documents.
    CALL METHOD OF gs_documents 'Open'
    EXPORTING #1 = 'd:\test.doc' .
    CALL METHOD OF gs_word 'ActiveDocument' = gs_actdoc .
    get property of gs_actdoc 'Application' = gs_application .
    get property of gs_actdoc 'BuiltinDocumentProperties' = gs_docproperty .
    get property of gs_docproperty 'wdPropertyPages' = p_pages.
    CALL METHOD OF gs_actdoc 'PrintOut' .
    CALL METHOD OF gs_documents  'CLOSE' .
    CALL METHOD OF gs_word 'Quit' .
    new-line.
    END-OF-SELECTION.
    FREE: gs_word, gs_actdoc, gs_documents, gs_newdoc .
    When run it, I can not get the total pages, and winword.exe hung up, can only be terminated in Task Manager.
    Could you help me to modify this test code?
    Thank you .

  • How to delete a page in thumbnail veiw when all connected in yellow box

    How do I delete a page from thumbnail view if they are all locked in one yellow box? Never happend before. What do I need to turn off?
    Why did it group the three pages? I added a page to the document and it grouped all three together.
    J

    Here is the deal with this nonesense. It is again a Pages fault to over design. In order to delete a complete page within a series of pages in your document. You must leave the view thumbnail, goto Sections and delete the page out of sections. Why? Likely because you can add page break, additional pages in sections but not in thumbnail. EASIER PAGES/MAC SOLUTION: Click on the page in the thumbnail veiw and hit delete, but that would be to simple for the mac/pages software developers. Still a great tool to use though.

  • 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?

    Remove the "overrun" including any unseen characters (blanks paragraphs and other keystroke results).

  • How to delete some pages in a document in pages without deleting all the pages

    How do I delete some pages in a document?  I have 7 pages listed and I want to delete the last two pages of the document and when I do the thumbnail to delete the pages it wants to delete all the pages in the document.

    akaLegal wrote:
    Thanks Peter,
    Yes, I just wanted to tell Jerrold that I tried his suggestion and it worked.  I tried many times until I came across his suggestion.  As far, as my comment about the points, I thought there was a way to rate the responses and the person providing the response would receive some points from Apple.  (See the Legend banner above discussing points).  If I am correct in this assessment, I just wanted to ensure he got credit for solving my problem.
    Have a great day!  Thanks for responding!
    Lora
    Lora,
    I appreciate the feedback. The Points issues aside, if you had posed your question in a new thread, your use of the Solved tag would alert others searching the Discussions that you had a positive result. This thread, Marilyn not having marked it, doesn't stand out as a solved one. Maybe Marilyn is satisfied, and maybe not. It would be nice to know.
    Jerry

  • How to delete blank page in smat form

    Hi Expets,
    In output display one extra blank page, how to delete it, I am using logic like this in smart form
    Main Window
    --> Header Loop.
           ---> Text
                ---> Table (item loop)
                       ---> Command Line
    In output it display Document Number header and items in a single page. but last one blank page also display.
    Regards,
    Sreedhar.

    hi sreedhar
    check this
    Re: Smart forms : display of second page .Displays blank when not required
    it might be helpful to you
    thanks
    SAchin
    Edited by: Sachin Gupta on Mar 5, 2009 10:18 AM

  • How to delete empty element in popup list

    I have a question about a suspicious behaviour in Forms Builder 10.1.2.0.2.
    When I have a list object (pop up list) I can define some values in the attribute palette of the object.
    So you can set a shown name and a value behind. In this little window to set the items of the popup list you get automatically a white empty item at the end of the list. When I click now on this empty item (you do so, when you want to add an item) Forms Builder automatically adds an new empty item at the end.
    When I click this new empty item, Forms Builder adss another empty one ... and so on.
    It´s very suspicious because, when I end this dialog with "OK", it will be saved and when I open the form (over web) I have at the end of the list one, two (or more) empty elements in list.
    But I can´t delete this empty ones from the list in Forms Builder.
    So my question:
    how can I delete empty items in a popup list??
    I try it with hit "del" button at keyboard or delete the set value for the item (I hope Forms Builder delete items without value). But all does not help.

    Thanks jwh for this great solution! :)
    On my german keyboard it is:
    ctrl+< for deleting a line
    ctrl+> (= ctrl+shift+<) for adding a new line
    Thanks! :)
    I have another question (you can maybe help me, too?).
    On this popup lists you can have several items. When you open a form (via web) and the list has more than x items (maybe 5 or 6) the form shows a scroll bar on the right side.
    Is there any poosibility to set how much items has to show and only show a scroll bar when there are more items in the list?
    Or other way: set the maximum of shown items so big, that there will be no scroll bar.
    Message was edited by:
    ulfk

  • InDesign CS5.5 crashes when deleting empty pages. Help!

    Hello all,
    I'm having an issue with InDesign CS5.5 running on 10.7.5. I have two empty spreads that I need to delete but everytime I try to, it prompts:
    "The affected pages contain objects. Delete the pages anyway?"
    I click Okay and InDesign crashes all the time. There are no objects on the page, I've applied no master, unhid and unlocked everything and can't figure it out! Does anyone have a solution?
    Thanks in advance!
    Eddie

    Hi Peter!
    Thanks for the speedy reply! I exported my "corrupt" InDesign file to .IDML and re-openned it. I was able to delete the extra pages which had some .psd files on it that I couldn't see earlier.
    My question is can I just re-save this .IDML file back as a .indd file? What changes happen in between .IDML and .INDD if any? Everything looks the same to me but I was wondering if anything changed. Thanks!

  • How to delete empty Last Import albums on Ipad2

    This is both a question and a partial solution to anyone who has found empty Last Import albums on their Ipad2 after upgrading to IOS 5.1.  I ended up with three Last Import albums on my Ipad under the Photos App after the upgrade to 5.1 and Iphoto app.
    I could not delete them no matter what I tried.  Even turned off Photo sync in Itunes and had it remove all photos from the Ipad and the empty folders are still there.
    I ended up trying a round about way of getting rid of the empties.  I reasoned that the Camera Connection kit had created this mess and maybe it could fix it.
    Solution:   (Only practical with a few empty folders)
    Shoot some photos with a digital camera using a SD card.
    Put the SD Card in the Camera Connection Kit and connect to the Ipad.  Import the images but keep them on the card.
    Disconnect the CCK and hook up to your Mac with Iphoto running. Import the images and delete from the Ipad when asked.
    Delete photos from Iphoto.
    Repeat several times and you should notice that each time one more Last Import album vanishes from the Ipad.
    Hope this helps someone else with this problem and Apple comes out with a better solution to this.

    I found a solution! I added a comment over on the shimworld blog (http://shimworld.wordpress.com/2011/11/02/how-to-remove-empty-photo-import-event s-on-your-ipad-2/#comment-18392), I'll repost it here:
    I ran into this same issue on my new iPad(3rd gen) after upgrading from iPad 2, I had a few hundred empty events(it took at least 30s of scrolling as fast as I could to reach the bottom). I use the camera connection kit as well as the EyeFI app to import photos constantly so it was a bit of a mess. I’m doing a road trip to SF area soon and needed space for new photos so I need to figure something out. After a bunch of digging around on the internet and looking into tools from my earlier jailbreaking days, I found a solution to do a full reset on the Photos.app. This does NOT require a jailbreak!
    First I imported all photos to my mac using Image Capture. Then I turned off iCloud’s PhotoStream, turned off photo syncing in iTunes and let a the iPad do a full sync and backup. Next I ran DiskAid and deleted the photo related folders under the File System -> Media area(see below). This removed EVERYTHING from the Photos.app. Then I rebooted the iPad. The Photos.app was empty just like on a new device! I snapped a couple pics with the camera and it created the camera roll, I turned PhotoStream back on, synced some photos from iTunes. Everything seems to be working great now, just like new!
    BEWARE: THIS WILL DELETE ALL PHOTOS STORED ON YOUR DEVICE in Photos.app!!! MAKE A BACKUP!!!!
    Connect iOS device with USB and fire up DiskAid. In DiskAid click File System, then click Media. READ WARNING and accept.
    Delete these folders:
    PhotoData (this has all the photos, database, etc synced from iTunes)
    DCIM (this is the camera roll)
    Photos (I think this is just the data to determine which iTunes library its synced with)
    PhotoStreamsData (iCloud Photo Stream data)
    Reboot iPad(probably not required but doesn’t hurt)
    Enjoy a fully reset Photos.app!
    DiskAid: I used v5.12 on my Mac Mini(10.7.3)
    http://www.digidna.net/products/diskaid

Maybe you are looking for

  • Since the latest IOS update, my new iPad Air is freezing and glitching badly. Typing is delayed.

    Since the latest IOS update, my new iPad Air is freezing and glitching badly. Typing is delayed.

  • Network Drives inaccessible

    I have now updated to Version 10049, after a fresh install of 10041, since the update from 9926 didn't work.   I have found that this version and 10041 both have a problem with seeing the local network drives.   I can assign  drive letters to the par

  • SUP Hybrid Web container Offline Mode

    Hello, I tried out a workflow example on blackberry simulator(using hybrid web container),but when i am in offline mode,the example doesnot work,so i had a doubt whether hybrid webcontainer supports offline mode,or do we need to do anything in the co

  • Recapitalization of assets

    Dear Guru's We changeover our system,  on 01.01.2008 from old ERP to SAP R-3, ECC-6. that time we upload the 50-60 assets asset on various,  as leagcy asst transfer with Accumlated balance accordingly that we take depriciation on F.Y.2007-2008 as per

  • Ipod  via iphone??

    Is it possible to get on the internet with an ipod touch via the iphone when NOT in a wifi area? What if I signed up for AT&T's tethering - than could I do it? Thanks!