Beispiel #1
0
 def crop(id):
     '''crop pdf file in books/new/${id}.pdf'''
     srcPath = os.path.join(os.path.curdir, 'books', 'new', id+'.pdf')
     destPath = os.path.join(os.path.curdir, 'books', 'new', id+'.cropped.pdf')
     DuoPdf.cropWH(destPath, srcPath, 500, 666)
     os.remove(srcPath)
     os.rename(destPath, srcPath)
Beispiel #2
0
 def crop(id):
     '''crop pdf file in books/new/${id}.pdf'''
     srcPath = os.path.join(os.path.curdir, 'books', 'new', id + '.pdf')
     destPath = os.path.join(os.path.curdir, 'books', 'new',
                             id + '.cropped.pdf')
     DuoPdf.cropWH(destPath, srcPath, 500, 666)
     os.remove(srcPath)
     os.rename(destPath, srcPath)
Beispiel #3
0
 def cropSingle(src):
     '''crop pdf file'''
     srcPath, ext = os.path.splitext(src)
     destPath = srcPath + '_c' + ext
     DuoPdf.cropWH(destPath, src, 500, 666)
Beispiel #4
0
 def cropSingle(src):
     '''crop pdf file'''
     srcPath, ext = os.path.splitext(src)
     destPath = srcPath + '_c' + ext
     DuoPdf.cropWH(destPath, src, 500, 666)