appy.pod: bugfix while including a PDF file into a document; ease the inclusion of Plone images from a Plone/Zope DB through 'do text from document' statements; appy.gen: added obj.mayAct method that allows to display conditionnally the column 'Actions' when an object is shown in a list (query or ref); improved navigation from sub-objects to parent objects; improved layout.
This commit is contained in:
parent
9c5f92337b
commit
13f3400577
9 changed files with 90 additions and 62 deletions
|
@ -146,7 +146,7 @@ class PdfImporter(DocImporter):
|
|||
if os.path.exists(nextImage):
|
||||
# Use internally an Image importer for doing this job.
|
||||
imgImporter =ImageImporter(None, nextImage, 'jpg',self.renderer)
|
||||
imgImporter.setAnchor('paragraph')
|
||||
imgImporter.setImageInfo('paragraph', True, None, None, None)
|
||||
self.res += imgImporter.run()
|
||||
os.remove(nextImage)
|
||||
else:
|
||||
|
|
|
@ -297,6 +297,9 @@ class Renderer:
|
|||
# Guess document format
|
||||
if isinstance(content, FileWrapper):
|
||||
format = content.mimeType
|
||||
elif hasattr(content, 'filename') and content.filename:
|
||||
format = os.path.splitext(content.filename)[1][1:]
|
||||
content = content.data
|
||||
if not format:
|
||||
# It should be deduced from p_at
|
||||
if not at:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue