Having dissected the PDF template demo I discovered the
"oxf:pdf-template" processor. I think a description of this nugget should be placed into documentation, probably into the "Document Formats" section. Optionally, a catalog-like addition with entries for every known processor implemented for the OPS platform could be made a part of documentation. All catalog entries should have the same structure to make the info easily accessible. Below is a suggestion for a model for such a catalog entry applied to this particular processor. If there was a form based on such a model available somewhere on the orbeon site, the community could help itself in filling-in holes in the documentation. To control quality of the entries the orbeon guys could insert an approval stage between submission and publishing. As for actual use of the processor - how did you guys determine the coordinates of the placed dynamic objects - trial and error? A. <processor name="oxf:pdf-template"> <vendor> <name>Orbeon</name> <contact>www.orbeon.com</contact> </vendor> <description>The PDF Template processor reads a PDF file (a template) and performs textual annotations on it. The information on the template is not parsed or altered in any way. Instead the new information is overlaid on top of the original page. Only single-page templates are supported (???)</description> <schema> a reference or the actual xsd schema could be placed here </schema> <inputs> <input name="model" presence="mandatory"> <description>The model input contains "config" element. Its child - the "template" element - contains a reference to the PDF template The "field" element is a description of a new text object of the information to be placed onto template. It contains the following attributes: left-position - position of the text object from the left edge of the media-box ??? (or crop-box) of the PDF template top-position - position of the text object from the top edge of the media-box ??? (or crop-box) of the PDF template spacing - inter-character spacing (tracking) font-family - font used to style the text object font-size - font size used to style the text object size - ???? ref - a reference to the text string that makes up the context of the text object </description> <example> <![CDATA[ <config xmlns:claim="http://orbeon.org/oxf/examples/bizdoc/claim"> <template href="oxf:/examples/pdf/pdf-template/schema/dmv14.pdf"/> <field left-position="108.5" top-position="138" spacing="15.9" font-family="Courier" font-size="14" size="20" ref="/claim:form/claim:name/claim:last-name"/> <field left-position="108.5" top-position="171" spacing="15.9" font-family="Courier" font-size="14" size="10" ref="/claim:form/claim:name/claim:first-name"/> <field left-position="287.5" top-position="171" spacing="15.9" font-family="Courier" font-size="14" size="1" ref="/claim:form/claim:name/claim:initial"/> </config> ]]> </example> </input> <input name="instance" presence="mandatory"> <description>Reference to or an actual XML document containing the data to be combined with the template</description> </input> </inputs> <outputs> <output name="data" presence="mandatory"/> <description/> </outputs> <example> <![CDATA[<processor name="oxf:pdf-template"> <input name="data"> <example> <p:processor name="oxf:pdf-template"> <p:input name="instance" href="#instance#xpointer(/*/document/*)"/> <p:input name="model"> <config xmlns:claim="http://orbeon.org/oxf/examples/bizdoc/claim"> <template href="oxf:/examples/pdf/pdf-template/schema/dmv14.pdf"/> <field left-position="108.5" top-position="138" spacing="15.9" font-family="Courier" font-size="14" size="20" ref="/form/name/last-name"/> <field left-position="108.5" top-position="171" spacing="15.9" font-family="Courier" font-size="14" size="10" ref="/form/name/first-name"/> <field left-position="287.5" top-position="171" spacing="15.9" font-family="Courier" font-size="14" size="1" ref="/form/name/initial"/> </config> </p:input> <p:input name="config"> <config/> </p:input> <p:output name="data" id="out"/> </p:processor> </example> ]]> </example> </processor> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Alexander Zatko wrote:
> Having dissected the PDF template demo I discovered the > "oxf:pdf-template" processor. I think a description of this nugget > should be placed into documentation, probably into the "Document > Formats" section. Correct, there is a plan to document this. > Optionally, a catalog-like addition with entries for every known > processor implemented for the OPS platform could be made a part of > documentation. Currently, most of the known processors ship with OPS already. Now there could be a section for separately available third-party processors. A sort of component repository. > All catalog entries should have the same structure to make the info > easily accessible. Below is a suggestion for a model for such a > catalog entry applied to this particular processor. If there was a > form based on such a model available somewhere on the orbeon site, > the community could help itself in filling-in holes in the > documentation. To control quality of the entries the orbeon guys > could insert an approval stage between submission and publishing. To do this, however, we would need to change the way the OPS doc is currently done, i.e. Apache Forrest-based XML files that come with the OPS distribution. In short you need instead some kind of wiki or at the very least something which versions XML documents. This i not awfully complex, but it is still not quite trivial if you have to do it yourself, although this would be a nice example for OPS. If on the contrary you use an existing wiki-style tool, then there is the question of migrating or integrating the current doc. > As for actual use of the processor - how did you guys determine the > coordinates of the placed dynamic objects - trial and error? Yes, or you have a template/@show-grid attribute which you can set to "true" to see a greed with coordinates that should help you quite a bit. -Erik -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |