align to the left and more efficient use of white space

Asked by Anton Farber

Hi Adam,

it's me once again :) I have now finally created my questionnaire and everything is working as planned. I have already made some changes directly in quexmlpdf.php inorder to produce a layout more suitable for my needs. There are however two things which I haven't figured out yet:

- Is it possible to align the answer section to the left? (e.g. question A1)
- I've doubled $singleResponseVerticalAreaWidth to 26 as otherwise longer answers became to tiny to read (e.g. question A7). this has the drawback of wasting quite much space for questions containing only short answers (e.g. A9). Is there a better way, couldn't the height be calculated automatically?

A draft of my questionnaire can be found at https://www.dropbox.com/s/9l7uvbrvqlefc7l/Questionnaire%20with%20custom%20layout.pdf?dl=0

Thank you so much for your answer!

Question information

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

Dear Anton,

The form looks good!

To align the answer section to the left you will need to modify the functions that start with "draw". They make their calculations starting from the right. There isn't a setting for this I'm afraid.

I used a fixed value for singleResponseVerticalAreaWidth due to the way TCPDF calculates the width of cells based on the text inside them. If a width isn't specified then there are issues with text rendering. I guess this could be modified set at the question level instead of the system level so that you could adjust it on a question by question basis if required.

Regards,
Adam Zammit

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

Thank you so much for your quick reply. I will try to modify the corresponding functions.