Boxes do not align eventhough page edge detection seems fine

Asked by Anton Farber

Dear Adam,

I'm having bit of a crisis here... My boxes do not align with the scanned documents. This is a very similar problem as described in #246154 but in my case page detection seems to work fine. This is what I've found out so far:

- If I create a new form based on the PDF created by QueXML and my (manually edited) banding XML banding is obviously fine. With any imported form however the boxes do not align. It looks as if the scanned forms (which are a little bit scaled down from the original PDF) are not scaled up. Isn't this what the page corners are for?
- If I create a new form based on a scanned form and my banding XML the boxes are misaligned from the start.

I'm lost here. Page detection seems to be fine, I've played around with various settings like the pade guide bits in the config file but without any success so far.

I'm panicking a little bit here as this used to work (!!). I've already imported around 100 forms before the problem appeared after making a small adjustment to the banding XML. Obviously I've reverted back to the original banding XML but without any success so far.

Any tests were done on the queXF suite for windows (1.16, 1.17 and 1.12) and a separate setup on ubuntu with queXF 1.18 (ghostscript version is 9.15 so looks like I'm not affected by the ghostscript bug).

You can find the generated PDF as well as the banding XML and a sample form at https://www.dropbox.com/sh/8a9wr3pbumgdm8s/AACMBMpRT1xnTBrEfDFf2lTHa?dl=0

Ys, Anton

PS: I've tried the sample form provided with QueXML as well and various scan setting (150 & 300 dpi), nothing seems to help. Page edge detection is correct but the alignment is not.

Question information

Language:
English Edit question
Status:
Solved
For:
queXF Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Zammit
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Zammit (adamzammit) said :
#1

Hi Anton,

Thank you for providing the files needed to look into this issue.

I tested your provided banding file and original PDF file with a fresh install of queXF 1.18.0 on Ubuntu 14.04.

The alignment problem occurred for me too (for the file "scanned form optimised.pdf")

Then I went to "Page Setup" selected "Page setup disabled (click to ENABLE)" then "Copy these settings to all other pages". I then went to "Successfully imported forms" and allows the form to be re-imported.

The form then lined up well. I then exported the banding XML and checked for differences - here is what it reported:

- <tlx>283</tlx>
- <tly>283</tly>
- <trx>2197</trx>
- <try>283</try>
- <brx>2197</brx>
- <bry>3224</bry>
- <blx>283</blx>
- <bly>3224</bly>
+ <tlx>165</tlx>
+ <tly>165</tly>
+ <trx>2315</trx>
+ <try>165</try>
+ <blx>165</blx>
+ <bly>3342</bly>
+ <brx>2315</brx>
+ <bry>3342</bry>

The correct banding is the lines with a + in front of them. The provided banding file has the - in front of them.

It appears there was an error in the banding file - this could be due to page setup not being correct on the system that you exported it from. I suggest you follow the steps I did above and that should resolve the issue.

Regards,
Adam Zammit

Revision history for this message
Anton Farber (afarber) said :
#2

Hi Adam,

sorry for not getting back to you sooner. In the meantime, I was able to set up a working configuration (actually, just a standard install of the complete suite) which is working, don't know why but at least I can continue verifying forms. I followed your instructions on my other system runing Ubuntu 15.04 and queXF 1.18.0 but without any success. I even manually changed the coordinates in the banding file and reimported it. The boxes are still not aligned properly. My guess is, that queXF somehow doesn't always recognise the page borders. Right now I have no idea what could be the problem as my working setup has recognised over 300 forms with only a very few pages not aligned properly. If I import those forms on my Ubuntu setup as described above, those same forms are not aligned properly. Any other hints?

Ys, Anton

Revision history for this message
Anton Farber (afarber) said :
#3

Forgot to add: my Ubuntu setup is running in a VirtualBox VM. If you would like me to I can upload a copy of the VM for debugging purposes

Revision history for this message
Adam Zammit (adamzammit) said :
#4

Hi Anton,

I think making the VM available to me would be the best way to sort this out.

Adam

Revision history for this message
Anton Farber (afarber) said :
#5

Hi Adam,

again, sorry for my delayed response. It took me a while to create two VMs, one which exhibits the "bug" (named "Bad") and one which doesn't ("Good"). As far as I can tell both are setup identically. I've used the same banding files (the original ones, not the ones with the corrected value) and redid the page setup. You can find both VMs at https://drive.google.com/folderview?id=0B8wsREHemAleZU9QbGFPcnZmb00&usp=sharing. Username is "ubuntu", PW "reverse".

Ys, Anton

Revision history for this message
Anton Farber (afarber) said :
#6

Forgot to add: user/PW for QueXF is "admin"

Revision history for this message
Adam Zammit (adamzammit) said :
#7

Hi Anton,

Thank you for taking the time to create these VM's for testing.

I loaded the "Bad" VM. I went to page setup and then clicked on "Page setup ENABLED (click to disable)" then imported the form again and it was aligned correctly. Did this occur for you also?

Adam

Revision history for this message
Anton Farber (afarber) said :
#8

Oh my... I figured out what the problem was, typical PEBCAK: I noticed that when the form is reimported it gets a new id. As I never finished the first import (id=1) it always loaded this first, misaligned version in the verify mode. After verifying the first import I noticed, that all subsequent imports were aligned properly. So it was a problem with the banding from the beginning....

Thank you very much for your kind patience and assistance!

Ys, Anton

Revision history for this message
Anton Farber (afarber) said :
#9

Thanks Adam Zammit, that solved my question.