Commit 0f787f91 authored by Fabien Morin's avatar Fabien Morin

- reorganise parameter order to be the same as displayed in the user interface

- remove unused ones 
- add the attribute background_format that permit to change the file format use
  for the background
- remove original_page_height/width because the were always set to 0 and never
  used


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18933 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b162d39
def ERP5Site_createModuleScribus(self, def ERP5Site_createModuleScribus(self,
form_id=None,
module_portal_type=None,
portal_skins_folder=None,
object_portal_type=None,
object_title=None,
module_id=None, module_id=None,
module_portal_type=None,
module_title=None, module_title=None,
selection_index=None,
selection_name=None,
import_scribus_file=None,
import_pdf_file=None, import_pdf_file=None,
import_scribus_file=None,
option_html=None, option_html=None,
desired_height=None,
desired_width=None, desired_width=None,
import_image_1=None, desired_height=None,
import_image_2=None, object_title=None,
import_image_3=None, **kw) : object_portal_type=None,
portal_skins_folder=None,
form_id=None,
selection_index=None,
selection_name=None,
**kw):
""" Creates a module, portal_type and ERP5Form from a scribus and """ Creates a module, portal_type and ERP5Form from a scribus and
PDFForm file""" PDFForm file"""
context = self context = self
...@@ -54,6 +52,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -54,6 +52,7 @@ def ERP5Site_createModuleScribus(self,
desired_height = desired_height desired_height = desired_height
desired_width = desired_width desired_width = desired_width
resolution = 300 # JPS-XXX - hardcoded resolution = 300 # JPS-XXX - hardcoded
background_format = 'jpg' # Fabien - XXX - hardcoded
option_html = option_html option_html = option_html
# DECLARING NAMES # DECLARING NAMES
...@@ -166,10 +165,10 @@ def ERP5Site_createModuleScribus(self, ...@@ -166,10 +165,10 @@ def ERP5Site_createModuleScribus(self,
# used only with option_html == 1 # used only with option_html == 1
# recover image_size # recover image_size
image_size = ManageFiles.setBackgroundPictures(import_pdf_file, image_size = ManageFiles.setBackgroundPictures(import_pdf_file,
object_names,skin_folder,desired_height,desired_width,resolution) object_names,skin_folder,desired_height,desired_width,resolution,
background_format)
page_height, page_width, original_page_height, original_page_width = \ page_height, page_width = image_size
image_size
print " height = " + str(page_height) print " height = " + str(page_height)
print " width = " + str(page_width) print " width = " + str(page_width)
...@@ -213,8 +212,6 @@ def ERP5Site_createModuleScribus(self, ...@@ -213,8 +212,6 @@ def ERP5Site_createModuleScribus(self,
page_id, page_id,
page_height, page_height,
page_width, page_width,
original_page_width,
original_page_height,
width_groups, width_groups,
height_groups) height_groups)
...@@ -238,8 +235,6 @@ def ERP5Site_createModuleScribus(self, ...@@ -238,8 +235,6 @@ def ERP5Site_createModuleScribus(self,
page_iterator, page_iterator,
page_gap, page_gap,
keep_page, keep_page,
0,
0,
properties_page, properties_page,
actual_width, actual_width,
actual_height) actual_height)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment