Home | Trees | Indices | Help |
|
---|
|
object --+ | s3rest.S3Method --+ | S3PDF
Class to help generate PDF documents. A typical implementation would be as follows: exporter = s3base.S3PDF() return exporter(xrequest, **attr) Currently this class supports two types of reports: A List: Typically called from the icon shown in a search For example inv/warehouse A Header plus List: Typically called from a button on a form For example ??? Add additional generic forms to the apply_method() function For specialist forms a S3PDF() object will need to be created. See the apply_method() for ideas on how to create a form, but as a minimum the following structure is required: pdf = S3PDF() pdf.newDocument(pdf.defaultTitle(resource)) # Add specific pages here return pdf.buildDoc()
Nested Classes | |
S3PDFOCRForm Extended class of the BaseDocTemplate to be used with OCR Forms. |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Static Methods | |||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
Apply CRUD methods @param r: the S3Request @param attr: dictionary of parameters for the method handler The attributes that it knows about are: * componentname * formname * list_fields * report_groupby * report_hide_comments @return: output object to send to the view
|
Calculate the Damerau-Levenshtein distance between sequences. This distance is the number of additions, deletions, substitutions, and transpositions needed to transform the first sequence into the second. Although generally used with strings, any sequences of comparable objects will work. Transpositions are exchanges of *consecutive* characters; all other operations are self-explanatory. This implementation is O(N*M) time and O(M) space, for N and M the lengths of the two sequences. >>> dameraulevenshtein('ba', 'abc') 2 >>> dameraulevenshtein('fee', 'deed') 2 It works with arbitrary sequences too: >>> dameraulevenshtein('abcd', ['b', 'a', 'c', 'd', 'e']) 2 |
This will create a new empty PDF document. Data then needs to be added to this document.
|
|
Produces OCR Compatible PDF forms |
Method to extract a generic title from the resource using the crud strings
|
Method to set the margins of the document
To Do: make this for a page rather than the document |
Method to set the orientation of the document to be portrait To Do: make this for a page rather than the document |
Method to set the orientation of the document to be landscape To Do: make this for a page rather than the document |
Method to create a table that will be inserted into the document
|
Method to convert the HTML generated for a rHeader into PDF |
Method to create a rHeader table that is inserted into the document
|
|
Method to create a paragraph that may be inserted into the document
|
Add a spacer to the story |
Add an overlay to the page |
Add square text boxes for text entry to the story |
Method to force a page break in the report |
Method to force a page break in the report |
Method to create a simple table |
Method to calculate the dimensions of the table |
Add special styles to the text in a cell |
Add special styles to the text in a table |
Method to add a banner to a page used by pageHeader |
Method to generate the basic look of a page. It is a callback method and will not be called directly |
Method to generate the basic look of a page. It is a callback method and will not be called directly |
Method to build the PDF document. The response headers are set up for a pdf document and the document is then sent @return the document as a stream of characters @todo add a proper template class so that the doc.build is more generic |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Mar 15 08:51:50 2019 | http://epydoc.sourceforge.net |