Page Edge detection fails

Asked by Anton Farber on 2020-02-26

Hello Adam,

I have a really hard time getting quexf to properly detect the edges on my custom form. I've done similar forms in the past (that was however 3 years ago) and the edge detection worked without a hassle. I have uploaded all relevant files to https://1drv.ms/u/s!AuDZgkkOCOnNjCT3T12ldFlB3PoO?e=NOVBbm

I've played around with HORI_WIDTH_BOX / VERT_WIDTH_BOX / PAGE_GUIDE_Y_PORTION / PAGE_GUIDE_X_PORTION as well as moving around the detection boxes on page setup. All to no avail, on the first 3 of the 6 pages quexf fails to align the boxes (=I'm guessing the edge detection failed). I'm using "A-PDF Scan Optimizer" to convert my greyscale scan to 1bit b/w using various thresholds (around 185 seems to deliver the best results). The test questionnaire was printed on an inkjet, the real questionnaires will be printed on a laser. I'm using the same scanner as I used 3 years ago. Do you have any idea, what the problem could be?

I'm hosting Quexf on a FreeBSD server with ghostscript9-agpl-base-9.50, adodb-4.99.2, mariadb104-server-10.4.12, php73-7.3.12, apache24-2.4.41.

Ys, Anton

Question information

Language:
English Edit question
Status:
Solved
For:
queXF Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Zammit
Solved:
2020-02-27
Last query:
2020-02-27
Last reply:
2020-02-27
Best Adam Zammit (adamzammit) said : #1

Hi Anton,

I ran into the same difficulties on my end.

When I converted your scan to be A4 size it worked though. This is a bug as
queXF should handle the paper size - but for now can you please try
scanning in A4 and it should work.

Adam

On Thu, 27 Feb 2020 at 08:32, Anton Farber <
<email address hidden>> wrote:

> New question #689013 on queXF:
> https://answers.launchpad.net/quexf/+question/689013
>
> Hello Adam,
>
> I have a really hard time getting quexf to properly detect the edges on my
> custom form. I've done similar forms in the past (that was however 3 years
> ago) and the edge detection worked without a hassle. I have uploaded all
> relevant files to
> https://1drv.ms/u/s!AuDZgkkOCOnNjCT3T12ldFlB3PoO?e=NOVBbm
>
> I've played around with HORI_WIDTH_BOX / VERT_WIDTH_BOX /
> PAGE_GUIDE_Y_PORTION / PAGE_GUIDE_X_PORTION as well as moving around the
> detection boxes on page setup. All to no avail, on the first 3 of the 6
> pages quexf fails to align the boxes (=I'm guessing the edge detection
> failed). I'm using "A-PDF Scan Optimizer" to convert my greyscale scan to
> 1bit b/w using various thresholds (around 185 seems to deliver the best
> results). The test questionnaire was printed on an inkjet, the real
> questionnaires will be printed on a laser. I'm using the same scanner as I
> used 3 years ago. Do you have any idea, what the problem could be?
>
> I'm hosting Quexf on a FreeBSD server with ghostscript9-agpl-base-9.50,
> adodb-4.99.2, mariadb104-server-10.4.12, php73-7.3.12, apache24-2.4.41.
>
> Ys, Anton
>
> --
> You received this question notification because you are an answer
> contact for queXF.
>

--
Adam Zammit
Director of Operations
Australian Consortium for Social and Political Research Inc.
+61 3 9013 9653
http://www.acspri.org.au/

Anton Farber (antfarb) said : #2

Hi Adam,

as always thank you very much for your quick reply! That did the trick. It's odd because the scanner is already set to A4, however, the dimensions of the scanned pages are slightly off. Any chance to twiddle with the settings of quexf so I could incorporate the odd scan dimensions? Or would it work if I used a scanned form instead of the original PDF when creating a new form?

Ys, Anton

Anton Farber (antfarb) said : #3

Thanks Adam Zammit, that solved my question.

Anton Farber (antfarb) said : #4

I found a nifty little tool which can batch convert PDFs to the correct paper size: http://www.nycmusicservices.com/musicresources/#pdf-utilities (it's called PDF BatchScale), works like a charm!