Skip to content

Commit

Permalink
docs: README v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdur-rahmaanJ committed Dec 15, 2020
1 parent 9d1c761 commit b7b8634
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,62 @@ You can read all about ``z3c.rml`` and see many examples on how to use it,
see the `RML Reference`_

.. _RML Reference: https://github.com/zopefoundation/z3c.rml/blob/master/src/z3c/rml/rml-reference.pdf?raw=true


Install on pip::

pip install z3c.rml

z3c.rml is then available on the commandline as z3c.rml.::

$ z3c.rml --help
usage: rml2pdf [-h]
xmlInputName [outputFileName] [outDir]
[dtdDir]

Converts file in RML format into PDF file.

positional arguments:
xmlInputName RML file to be processed
outputFileName output PDF file name
outDir output directory
dtdDir directory with XML DTD (not yet supported)

optional arguments:
-h, --help show this help message and exit

Copyright (c) 2007 Zope Foundation and Contributors.

Save this file as file.rml::

<!DOCTYPE document SYSTEM "rml.dtd">
<document filename="example_01.pdf">
<template showBoundary="1"> <!--Debugging is now turned on, frame outlines -->
<!--will appear on the page -->
<pageTemplate id="main">
<!-- two frames are defined here: -->
<frame id="first" x1="100" y1="400" width="150" height="200"/>
<frame id="second" x1="300" y1="400" width="150" height="200"/>
</pageTemplate>
</template>
<stylesheet>
<!-- still empty...-->
</stylesheet>
<story>
<para>
Welcome to RML.
</para>
</story>
</document>


Then run::

$ z3c.rml file.rml

The output will be example_01.pdf as defined in the document

Codewise you can do::

from z3c.rml import rml2pdf
rml2pdf.go('file.rml','file.pdf')

0 comments on commit b7b8634

Please sign in to comment.