want to check for blank pages in a pdf with Acrobat X
Hello,
im trying to write a short script that will delete blank pages from a pdf using adobe acrobat X standard. it seems to correctly identify blank pages. but for some reason if a blank page is found it deletes every page in the pdf. if i run the script on a 1 page pdf that is not blank it works. the non blank pages have black text on white or blue backgrounds and there are text boxes with red outlines so they are very different from blank pages.
here is the script
from org.sikuli.
Vision.
mmd = Settings.
Settings.
def deleteBlankPage
'''
identifies and deletes blank pages in a pdf
numPages - integer. the number of pages in the pdf
'''
adobe = App('Adobe Acrobat')
adobe.focus()
workReg = find("137061550
# workReg.
searchReg = find("137062069
searchReg.
for i in range(numPages):
try:
except FindFailed: # if blank page not found, go to next page
if __name__ == '__main__':
deleteBlank
thanks in advance for you help
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- rob
- Solved:
- Last query:
- Last reply: