Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
cloudooo
Commits
afa6cd9a
Commit
afa6cd9a
authored
Jun 13, 2011
by
Priscila Manhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added logger to convertion
parent
ab27585d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
cloudooo/handler/pdf/handler.py
cloudooo/handler/pdf/handler.py
+2
-0
No files found.
cloudooo/handler/pdf/handler.py
View file @
afa6cd9a
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
from
zope.interface
import
implements
from
zope.interface
import
implements
from
cloudooo.interfaces.handler
import
IHandler
from
cloudooo.interfaces.handler
import
IHandler
from
cloudooo.file
import
File
from
cloudooo.file
import
File
from
cloudooo.util
import
logger
from
subprocess
import
Popen
,
PIPE
from
subprocess
import
Popen
,
PIPE
from
tempfile
import
mktemp
from
tempfile
import
mktemp
...
@@ -46,6 +47,7 @@ class Handler(object):
...
@@ -46,6 +47,7 @@ class Handler(object):
def
convert
(
self
,
destination_format
=
None
,
**
kw
):
def
convert
(
self
,
destination_format
=
None
,
**
kw
):
""" Convert a pdf document """
""" Convert a pdf document """
logger
.
debug
(
"PDFConvert: %s > %s"
%
(
self
.
source_format
,
destination_format
))
output_url
=
mktemp
(
suffix
=
".%s"
%
destination_format
,
output_url
=
mktemp
(
suffix
=
".%s"
%
destination_format
,
dir
=
self
.
document
.
directory_name
)
dir
=
self
.
document
.
directory_name
)
command
=
[
"pdftotext"
,
self
.
document
.
getUrl
(),
output_url
]
command
=
[
"pdftotext"
,
self
.
document
.
getUrl
(),
output_url
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment