Manual Banding / XML creation

Asked by Phil White on 2019-02-02

Hi Adam,

Sorry - a couple of questions if you have the time -- both related to the XML banding file.

First (probably a faq), do I need to 'Page Setup' if I have a correct XML file?
I notice that the banding files from those created in queXF differ from those created in limesurvey. Specifically the following are absent from a limesurvey XML file:
<width>, <height>
<TL_VERT_TLX>, <TL_VERT_TLY>, <TL_VERT_BRX>, <TL_VERT_BRY>, <TL_HORI_TLX>, <TL_HORI_TLY>, <TL_HORI_BRX>, <TL_HORI_BRY>, <TR_VERT_TLX>, <TR_VERT_TLY>, <TR_VERT_BRX>, <TR_VERT_BRY>, <TR_HORI_TLX>, <TR_HORI_TLY>, <TR_HORI_BRX>, <TR_HORI_BRY>, <BL_VERT_TLX>, <BL_VERT_TLY>, <BL_VERT_BRX>, <BL_VERT_BRY>, <BL_HORI_TLX>, <BL_HORI_TLY>, <BL_HORI_BRX>, <BL_HORI_BRY>, <BR_VERT_TLX>, <BR_VERT_TLY>, <BR_VERT_BRX>, <BR_VERT_BRY>, <BR_HORI_TLX>, <BR_HORI_TLY>, <BR_HORI_BRX>, <BR_HORI_BRY>, <VERT_WIDTH>, <HORI_WIDTH>
I know what they are, and how to calculate the values, but can these be included within the banding XML file, or must they be generated by queXF during the import process?

Second: How and when is the <rotation> value applied?

Background:
I will be creating a form manually, and then hand-editing the banding XML file to match.
Each form is A5, scanned using an A4 document feeder. Therefore, each scan will be rotated by 90 degrees. So, I would like to understand whether I leave the barcode on the top of the form, or rotate it to be on the top of the scan (and therefore the side of the form).

Many thanks,
Phil

Question information

Language:
English Edit question
Status:
Answered
For:
queXML Edit question
Assignee:
No assignee Edit question
Last query:
2019-02-02
Last reply:
2019-02-04
Adam Zammit (adamzammit) said : #1

Hi Phil,

The elements you note will be imported by queXF if you provide them in the banding XML file.

If they are not provided, the "page setup" function needs to be run in queXF to update and generate the correct values.

"Rotation" refers to how many degrees the page is rotated from the centroid for the purposes of calculating the position of the banding elements. In most cases this should be 0 but it could differ if the original page to band came from a scan of a document that was not aligned.

In the case of the page identifying barcode - currently queXF requires this to be not rotated - as it is the first thing the system looks for before applying any of the banding rotation logic / etc. So it needs to be the "right way up" in the PDF scan. It uses this as a point of truth so all other transformations rely on this.

I have written a small hack in the past that rotates the page 90 degrees up to 3 times and tries to find a barcode. This may be useful but again when it finds the barcode, it will assume everything is "that way up" at the current rotation.

Hope that all make sense.

Adam

Phil White (whitepj) said : #2

Thank you. I think I understand -- will try a couple of experiments when I have a moment, and come back...

Can you help with this problem?

Provide an answer of your own, or ask Phil White for more information if necessary.

To post a message you must log in.