mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pdfmanipulate: rotate command.
This commit is contained in:
parent
49aec87b59
commit
6c54eca8b3
@ -16,7 +16,7 @@ from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.manipulate import crop, decrypt, encrypt, \
|
||||
info, merge, reverse, split
|
||||
info, merge, reverse, rotate, split
|
||||
|
||||
COMMANDS = {
|
||||
'crop' : crop,
|
||||
@ -25,6 +25,7 @@ COMMANDS = {
|
||||
'info' : info,
|
||||
'merge' : merge,
|
||||
'reverse' : reverse,
|
||||
'rotate' : rotate,
|
||||
'split' : split,
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ from calibre.utils.config import OptionParser
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf, is_encrypted
|
||||
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
||||
|
@ -16,7 +16,7 @@ from calibre.utils.config import OptionParser
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdfs, is_encrypted
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdfs, is_encrypted, is_encrypted
|
||||
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
||||
@ -42,10 +42,10 @@ def print_info(pdf_path):
|
||||
print _('Subject: %s' % pdf.documentInfo.subject)
|
||||
print _('Creator: %s' % pdf.documentInfo.creator)
|
||||
print _('Producer: %s' % pdf.documentInfo.producer)
|
||||
print _('Creation Date: %s' % time.strftime('%a %b %d %H:%M:%S %Y', time.gmtime(os.path.getctime(pdf_path))))
|
||||
print _('Modification Date: %s' % time.strftime('%a %b %d %H:%M:%S %Y', time.gmtime(os.path.getmtime(pdf_path))))
|
||||
#print _('Creation Date: %s' % time.strftime('%a %b %d %H:%M:%S %Y', time.gmtime(os.path.getctime(pdf_path))))
|
||||
#print _('Modification Date: %s' % time.strftime('%a %b %d %H:%M:%S %Y', time.gmtime(os.path.getmtime(pdf_path))))
|
||||
print _('Pages: %s' % pdf.numPages)
|
||||
print _('Encrypted: %s' % pdf.isEncrypted)
|
||||
#print _('Encrypted: %s' % pdf.isEncrypted)
|
||||
try:
|
||||
print _('File Size: %s bytes' % os.path.getsize(pdf_path))
|
||||
except: pass
|
||||
|
@ -18,7 +18,7 @@ from calibre.utils.config import OptionParser
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdfs
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdfs, is_encrypted
|
||||
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
||||
|
@ -18,7 +18,7 @@ from calibre.utils.config import OptionParser
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf, is_encrypted
|
||||
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
||||
|
@ -18,7 +18,7 @@ from calibre.utils.config import OptionParser
|
||||
from calibre.utils.logging import Log
|
||||
from calibre.constants import preferred_encoding
|
||||
from calibre.customize.conversion import OptionRecommendation
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf
|
||||
from calibre.ebooks.pdf.verify import is_valid_pdf, is_encrypted
|
||||
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user