Added a new system for layouting production-ready forms without any HTML coding, many performance improvements and more independence towards Archetypes.
This commit is contained in:
parent
309ea921fa
commit
bfd2357f69
84 changed files with 4663 additions and 3549 deletions
|
@ -45,6 +45,10 @@ class DocImporter:
|
|||
self.svgNs = ns[OdfEnvironment.NS_SVG]
|
||||
self.tempFolder = tempFolder
|
||||
self.importFolder = self.getImportFolder()
|
||||
# If the importer generates one or several images, we will retain their
|
||||
# names here, because we will need to declare them in
|
||||
# META-INF/manifest.xml
|
||||
self.fileNames = []
|
||||
if self.at:
|
||||
# Check that the file exists
|
||||
if not os.path.isfile(self.at):
|
||||
|
@ -142,6 +146,7 @@ class PdfImporter(DocImporter):
|
|||
self.tempFolder, self.ns)
|
||||
imgImporter.setAnchor('paragraph')
|
||||
self.res += imgImporter.run()
|
||||
self.fileNames += imgImporter.fileNames
|
||||
os.remove(nextImage)
|
||||
else:
|
||||
noMoreImages = True
|
||||
|
@ -214,6 +219,7 @@ class ImageImporter(DocImporter):
|
|||
# Compute path to image
|
||||
i = self.importPath.rfind('/Pictures/')
|
||||
imagePath = self.importPath[i+1:]
|
||||
self.fileNames.append(imagePath)
|
||||
# Compute image size
|
||||
width, height = getSize(self.importPath, self.format)
|
||||
if width != None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue