I am trying to create an application where data from a database table is printed onto documents that have
been saved as jpg files.
the actual data and the (x,y) coordinates are stored in the database.
basically the image is sent to the printer object and then the text is printed on top of it
I have this application working but i face one challenge:
Since not all the forms are the same the user needs to adjust the coordinates for new forms and save
these to the database.
How i have attempted to overcome this is by using a form that lists all the fields that are to be printed.
Next to each label i have positioned two text boxes, one for the (x) coordinate and one for the (y) coordinate
the user maunually types in the two values and then clicks on a button which shows a print preview.
(The location of where the field will be printed is determined by the values supplied in the two text boxes)
An image of what will be printed is now shown, the user now decides whether the text is in the correct
place or not, if not he has to close the printpreview and adjust either the (x) or (y) coordinate or both
and then repeat the process by clicking on the print preview button.
He will continue this procedure until the coordinates are at the correct values to ensure that
the text is printed in the desired position on top of the jpeg image.
This procedure works but as you can imagine it is time consuming and a huge task!
What i would like to try and do is to have a printpreview dialog owned by my form which is permanently visible.
As the user makes changes to the coordinates in the text boxes, the printpreview is immediately refreshed to
show the new position of the text on the image, this would prevent the user from continually having to open
the printpreview dialog to see the result of his changes.
What would be the perfect solution would be to be able to drag the text onto the print preview and using
the mouse place it in the required position but i dont think that this would be possible.
I have attempted showing the image in a picture box and then trying to calculate the ratio of pixels in the picture
box to millimetres on the A4 page to be printed but there were 2 problems with this:
1. Although the text appeared to be in the correct position when viewed in the picture box it was never in the
correct position on the printpreview and obviously the actual print.
2. The jpeg image in the text box was too small to see clearly and even sizing the picture box as large as possible
did not help, I don't know if there is a way of zooming the image in the picture box???
I would appreciate any assistance as to how to overcome this problem.
Sorry for the large essay but i had to explain my dilemma
been saved as jpg files.
the actual data and the (x,y) coordinates are stored in the database.
basically the image is sent to the printer object and then the text is printed on top of it
I have this application working but i face one challenge:
Since not all the forms are the same the user needs to adjust the coordinates for new forms and save
these to the database.
How i have attempted to overcome this is by using a form that lists all the fields that are to be printed.
Next to each label i have positioned two text boxes, one for the (x) coordinate and one for the (y) coordinate
the user maunually types in the two values and then clicks on a button which shows a print preview.
(The location of where the field will be printed is determined by the values supplied in the two text boxes)
An image of what will be printed is now shown, the user now decides whether the text is in the correct
place or not, if not he has to close the printpreview and adjust either the (x) or (y) coordinate or both
and then repeat the process by clicking on the print preview button.
He will continue this procedure until the coordinates are at the correct values to ensure that
the text is printed in the desired position on top of the jpeg image.
This procedure works but as you can imagine it is time consuming and a huge task!
What i would like to try and do is to have a printpreview dialog owned by my form which is permanently visible.
As the user makes changes to the coordinates in the text boxes, the printpreview is immediately refreshed to
show the new position of the text on the image, this would prevent the user from continually having to open
the printpreview dialog to see the result of his changes.
What would be the perfect solution would be to be able to drag the text onto the print preview and using
the mouse place it in the required position but i dont think that this would be possible.
I have attempted showing the image in a picture box and then trying to calculate the ratio of pixels in the picture
box to millimetres on the A4 page to be printed but there were 2 problems with this:
1. Although the text appeared to be in the correct position when viewed in the picture box it was never in the
correct position on the printpreview and obviously the actual print.
2. The jpeg image in the text box was too small to see clearly and even sizing the picture box as large as possible
did not help, I don't know if there is a way of zooming the image in the picture box???
I would appreciate any assistance as to how to overcome this problem.
Sorry for the large essay but i had to explain my dilemma