Delete empty pages
Hi experts,
I would like to delete a document all empty pages.
What is the best solution? By storythread or pageitems or something?
A storythread can contain one or more empty page with same tagname
Empty page = the current page contains only empty text or frame graphic and not contain static text.
THX: Károly
I don't think that there is a single integrated command to perform this task.
What constitutes an empty page belongs to your logic.
And you need to encapsulate this logic in a function to delete the pages.
He must know that page elements belong to spread (or more specifically spread layer) and NOT to the page.
If you have a story, it is likely you have a framework for this container.
So, it would not be a bad idea (though according to your use case) to search for items on the page.
So, you can delete a page if there is no element on a page, or even treat the elements of the page to determine cases like block of empty text, empty graphic block, guides, etc..
Review for the implementation:
-> Cover each Board in the document (ISpreadList)
-> For each page of the spread and make ISpread::GetItemsOnPage
-> IPageItemTypeUtils of use to determine what type of page element is a UIDRef.
Page article can be a graphic image, group, text frame, text on path, guide, shape spline, etc..
Tags: InDesign
Similar Questions
-
How to delete empty pages in iBook author
I have a few large iBooks in iBook author. It is necessary to resort to certain paragraphs. By removing parts of a paragraph, there are empty pages and I have no idea how to do to remove them. It is very young, because of the suspension of the empty pages in the book.
Is there someone who knows this problem?
Y at - there someone who can help me?
Sorry for my bad English!
with greetings
pjdi
Use the Edit menu and click on delete.
-
Hello ,.
I'm on W7 using FM11.
My empty pages are not deletion themselves.
I go to Page layout,
Pagination,
Select single-sided,
The value in 1st Page: I select the right
Forward, saving and printing: I select Remove page empty.
He never removes pages remains however. Is it because they have a Master Page assigned?
Hello
FM removes only empty pages if left or right masterpages are applied to this page.
I don't know why this does not work in your case because you have assigned the correct page.
A few weeks ago, I wrote a script that deletes all empty pages, even if the other masterpages are applied.
So it should work in your case. If it is free, use it at your own risk.
Check it out:
http://www.practice-innovation.de/SWATFrameMaker.html
(Sorry website is in German, see the bottom of the page click the download link in the STD column).
(ISIF is the link if you have our installed InstalScriptInFolders plugin).
Hope this helps
Markus
-
How to delete empty pages in the description?
Hi all
How to remove the empty page that can contain the block of text with no content or may be no text frame...
Please give me the script...
Thanks in advance,
Vel...
Hi all
The correct script is the following:
doc = APP.activeDocument;
pageObj = doc.pages.item (0);
txtObj = pageObj.textFrames.item (0);
var temp = doc.pages.length;
for (var i = 0; i)<>
{
If (doc.pages [i].textFrames.Item (0)! = null)
{
if(doc.pages[i].textFrames[0].contents=="")
{
doc.pages [i]. Remove();
I have = i-1;
-Temp;
}
on the other
{
}
}
on the other
{
doc.pages [i]. Remove();
I have = i-1;
-Temp;
}
}
Thank you andRegards,
Vel.
Friends of note:
Forum is for freedom from doubt and the search for a solution by experts. But some people are looking to make money. It's really... *
-
InDesign CS5.5 crashes when you delete empty pages. Help!
Hi all
I'm having a problem with InDesign CS5.5 running on 10.7.5. I have two empty gaps that I need to remove, but every time I try, it asks:
"The affected pages contain objects. Delete pages anyway? »
I click OK and InDesign crashes all the time. There is no object on the page, I applied without a master unhid and unlocked everything and he can not know! Does anyone have a solution?
Thanks in advance!
EddieAltogether. Resave as .indd (preferably with a new name in order to not replace the old file) didn't continue with the new file. Export to .idml has the effect of eliminating a lot of stuf that does not need to open the file (old record data and previews, which is rewritten) then sometimes it removes any minor problem that happens.
-
Hotkey to toggle preferences delete empty Pages
Y at - it a keyboard shortcut to toggle the preference of Type to remove from the blank Page?
Why would I have a shortcut to the an option?
When I change only one option, I always have to see that the State of the other options as well.
Did enable you / disable all the time?
If so: assign a shortcut to this script:
app.activeDocument.textPreferences.deleteEmptyPages =! app.activeDocument.textPreferences.deleteEmptyPages;
-
How to open a new tab, an empty page, instead of the home page?
Currently when I open a new tab, it opens to my home page. I would like a new tab to open an empty page instead, is it possible to have this happen?
I am currently using the beta version of Firefox 18,0 on Windows 7If you still encounter problems, reset Firefox, Firefox Refresh - reset modules and parameters, then try to change the new tab again.
-
can I delete login page so that windows starts automatically when you first start?
can I delete login page so that windows starts automatically when you first start?
Yes, you can.
-
I can't get the file "Delete empty" vacuum. He has worked in the past. I have Vista and use Windows M
-
Mail function 'Delete empty' is not
I can't get the file "Delete empty" vacuum. He has worked in the past. I have Vista and use Windows Mail.
How to remove an Undeletable Message stuck in Windows Mail
http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.htmlIf still no joy, try to repair the database and compaction.
-
original title: empty folders
Cannot delete empty folder
Also, make sure that no other programs (for example, the command line Windows) do not use such a record.
-
Help with excel import and delete the page script
Hello. I will try to make it as simple as possible. I have some data from excel (saved as delimited by tabs) that I need to import in a 5 PDF page. I use the script below to import, and it works fine. All import fields and records the individual (one for each record) PDF. However, I need to extend this functionality by removing some pages before it saves the document by looking at the different boxes. The code below is what I use to import the records.
// specify the filename of the data file var fileName = "/Users/MacMike/Desktop/Test.txt"; // the tab delimited text file containing the data var outputDir = "/Users/MacMike/Desktop/Dump/"; // make sure this ends with a '/' var err = 0; var idx = 0; while (err == 0) { err = this.importTextData(fileName, idx); // imports the next record if (err == -1) app.alert("Error: Cannot Open File"); else if (err == -2) app.alert("Error: Cannot Load Data"); else if (err == 1) app.alert("Warning: Missing Data"); else if (err == 2) app.alert("Warning: User Cancelled Row Select"); else if (err == 3) app.alert("Warning: User Cancelled File Select"); else if (err == 0) { this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf"); // saves the file idx++; } }
As I said before you import works surprisingly well.
My PDF consists of 5 pages (info-registration, p1 = Dir-contract = p0, p2 = contract ndarp-brand, p3 = takes-contract, p4 = agreement must be brand). My idea is that on the import of data, the script will look at a few check boxes and determine which contracts to remove on the PDF and then save. I wrote the syntax of which, in my view, what it should look like. I'm not a programmer and know just a little bit. I looked through the documentation and this is what I came with. I don't know how to combine to work. Here's the code I came up with that.
var dir = this.getField("Associate Director"); // checkbox var aldir = this.getField("Alumni Director"); // checkbox var fac = this.getField("Facilitator"); // checkbox var alfac = this.getField("Alumni Facilitator"); // checkbox var oyb = this.getField("Optimize Your Brain"); //checkbox var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox // Below are all the possible training options. if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") { this.deletePages({nStart:3, nEnd:4}) } else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") { this.deletePages({nStart:3, nEnd:4}) } else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="") { this.deletePages({nStart:2, nEnd:4}) } else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="") { this.deletePages({nStart:2, nEnd:4}) } else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") { this.deletePages({nStart:2, nEnd:2}) } else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="Checked" || poyb.value=="") { this.deletePages({nStart:2, nEnd:2}) } else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") { this.deletePages({nStart:2, nEnd:2}) } else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="Checked") { this.deletePages({nStart:2, nEnd:2}) } else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") { this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages. } else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") { this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages. } else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") { this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages. } else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") { this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages. } else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") { this.deletePages({nStart:1, nEnd:2}) } else (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") { this.deletePages({nStart:1, nEnd:2}) }
How to combine these two so that I can create a document temp import my data, check the boxes to check off and delete the appropriate pages and save the file and then go to the next record? I got the first part done. It imports large and has the right, but I don't know what to do next. Thanks for any help!
Or y at - it another way to do this?
MichaelWow. Ok. I had it works beautifully. There was a lot of trial and error. Because the script as it was would have, would open the original PDF, delete the pages needed, then save the file. While it would be to go to the next record is missing pages in PDF and bomb to open. I hunted and searched for a way to do this. I found "this.insertPages" in the documentation. Finally, what worked was so move the "save under" in the service and put it under every variation of check. So now when checking the boxes, he performs the check, removes the mandatory pages, stops, insertions of back in deleted pages from the original file, leave the service and finally goes to the next record.
Here is my final script:
// This code looks at an excel (tab delimited) file, imports the records into a PDF form 10 Pages long. // Then checks a series of checkboxes and deletes the pages that aren't associated with first page. // After it deletes these pages it reinserts the deleted pages so it can do the checks for the next record in the (tab delimited) file. // variables for importing excel data var err = 0; var idx = 0; var fileName = "/Users/MacMike/Desktop/Test.txt"; // the tab delimited text var outputDir = "/Users/MacMike/Desktop/Dump/"; // make sure this ends with a '/' //Checking a bank of 6 checkboxes and determine which pages need to be deleted, save the file, and the insearch the deleted pages again. function seekandDestroy() { if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") { this.deletePages({nStart:6, nEnd:9}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 }); } else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") { this.deletePages({nStart:6, nEnd:9}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") { this.deletePages({nStart:3, nEnd:9}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Off") { this.deletePages({nStart:3, nEnd:9}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") { this.deletePages({nStart:3, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Checked" && poyb.value=="Off") { this.deletePages({nStart:3, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") { this.deletePages({nStart:3, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Checked") { this.deletePages({nStart:3, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") { this.deletePages({nStart:1, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 }); } else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") { this.deletePages({nStart:1, nEnd:5}) this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 }); } else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") { this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") } else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") { this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") } else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") { this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") } else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") { this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf") } } // Imports records does the above function then go the next record, all the while doing error reporting. while (err == 0) { err = this.importTextData(fileName, idx); // imports the next record if (err == -1) app.alert("Error: Cannot Open File"); else if (err == -2) app.alert("Error: Cannot Load Data"); else if (err == 1) app.alert("Warning: Missing Data"); else if (err == 2) app.alert("Warning: User Cancelled Row Select"); else if (err == 3) app.alert("Warning: User Cancelled File Select"); else if (err == 0) { var dir = this.getField("Associate Director"); // checkbox var aldir = this.getField("Alumni Associate Director"); // checkbox var fac = this.getField("Facilitator"); // checkbox var alfac = this.getField("Alumni Facilitator"); // checkbox var oyb = this.getField("Optimize Your Brain Site Coordinator"); //checkbox var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox seekandDestroy(dir, aldir, fac, alfac, oyb, poyb); //performs the above function idx++; //goes to next record } }
-
I can't delete a page of acrobat reader dc
I can't delete a page of acrobat reader dc
Hi nicoles114440,
You will need Acrobat Adobe Document Cloud application | Adobe Acrobat DC to remove pages from a PDF file, rotate, move, delete and renumber pages in Adobe Acrobat PDF
Not possible with the free player application.
Kind regards
Nicos -
Trying to DELETE a page in Acrobat Reader ms
I can't locate any button anywhere that would delete a page in a pdf with several other pages doc.
Hi leah81955138,
You will need Acrobat free trial download Adobe Acrobat application | Acrobat Pro DC to remove the pages form a PDF file, rotate, move, delete and renumber pages in Adobe Acrobat PDF.
Is not possible using free reader application.
Kind regards
Nicos -
Adobe Acrobat XI Standard stops working whenever I try to delete multiple pages.
I repaired the installation and even removed and re-installed and it still happens. Help, please. And if programs does not work, stop it indicates one or several pages are in use and could not be deleted
Abhishek,
I don't know where to find the Windows preview pane to see if it is enabled. Nevertheless, I got the TerraGo toolbar and so I thought that this could be the problem, so I disabled it. And voila! I was able to delete multiple pages without problem. If I run into it again (oh don't like it), I'll try to close the file Explorer as you suggest. Thank you.
Maybe you are looking for
-
HP Pavilion Desktop PC all-in-one MS213 - battery CMOS RTC
HP Pavilion all-in - One MS213 when removed from the external power supply loses time and date like any other office with a battery in the Lithium CMOS (CR-2032) to address dead. After hours and hours of research looking at the photos of the motherbo
-
Indians kept constantly calling and convinced me to sign up and they would protect my computer for a fee (which I paid by credit card), they were very convincing even had control of my cutsor. After many attempts to communicate with them in different
-
Tried to change the security of all parameters - no luck.
-
Speakers Logitech Z313 stopped working after upgrading to Windows 7
I delayed upgrading to Windows 7 until after I graduated from College just for this reason. I just installed Windows 7 and my Logitech Z313 speakers that worked perfectly well in Windows XP are not recognized as material. There is no yellow! device d
-
Hello There is an "acl" parameter that is not clear to me, it is configured at customer site: Crypto ipsec VPN ezvpn client connect auto Cisco key band EASYVPN client mode peer 10.0.0.1 username cisco password cisco xauth userid local mode ACL 101 Ev