Printing problem

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Printing problem

Postby cjemichael » Wed Feb 25, 2004 2:08 pm

Is there any way you can set a method to print the first page of a document to one paper tray (i.e. letter head) and the remaining pages to another tray (i.e. plain paper).

This would be very useful for printing multipage invoices, form letters etc?

Any ideas?

Chris
cjemichael
 
Posts: 47
Joined: Thu Dec 04, 2003 12:29 pm

Postby Jan Blok » Tue Mar 02, 2004 4:56 pm

This is not possible, the java printing API's from SUN does not support this action... :(
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby WiderGates » Wed Mar 03, 2004 5:40 am

This are very, very bad news.

My customers print about 1000 - 3000 invoices every 1. of a month with 1 to 50 pages each (now in FileMaker, but we want change to Servoy).
The first page should be printed on letter head and the other on plain paper. How can this be done. You donM-4t mean that anyone shall sort this?

Sorry, but if thereM-4s no possibility I canM-4t sell my solution to them.
And IM-4m very sad to say this.
Version R2 2.0 rc8-build 267; Java version 1.4.2_03-b02 (Windows 2000)

Dieter Jekal
WiderGates
WiderGates
 
Posts: 37
Joined: Thu Aug 28, 2003 9:46 am
Location: Schnaittenbach, Germany

Postby Harjo » Wed Mar 03, 2004 9:25 am

Jan, is there a way, to assign print-jobs to different printers?

I have asked this feature for a while ago, don't know where it is on the wishlist!

Like for instance you than install 2 printer drivers pointing to the same printer. One with the default paperfeed 1 and one with the default paperfeed on 2

We also have software, which is not compatible with such feature , and always solved it, this way.

Just thinking!
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Jan Blok » Wed Mar 03, 2004 10:36 am

Thanks for your suggestion HJK, I think that whould work...the only question remains where to store default form printer info?

I think there are 3 options:
1)in the form (not handy when selling to multiple customers having different printers)
2)in the client properties (every end user has to set the default printer per form)
3)in a (separate) property file downloaded by client and editted by developer on the server, containing something like:
printer.crm=hpLJ1000
printer.crm.orders=hp2200
where the first line is the default printer and the second line an exeption for a form

In my opinion option 3 is the best we could provide... in this case WiderGates can print the first page via a form (and specific printer) followed by the other pages via other form (and other printer)

Let us know your thoughts.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Harjo » Wed Mar 03, 2004 10:53 am

3)in a (separate) property file downloaded by client and editted by developer on the server, containing something like:
printer.crm=hpLJ1000
printer.crm.orders=hp2200
But how to handle if the client, is at the other side of the world?
Can you use that property file in a method?
Does it work, if I do a print-preview first and than push the print-button?

I think it would be handy, that if a standard printer (in such file) is not found, that there will be an error-message to catch, you than can provide a method that opens the standard printer-dialog, with the local printer of the client?
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Our 'solution'

Postby cjemichael » Wed Mar 03, 2004 11:41 am

Our 'solution' is to place hi res colour jpg/gif images of the stationery header and footer on the first page header and first page footer of the relavant forms - e.g. estimates, invoices, purchase orders etc.

In a general solution, this can be done by having these images stored in media fields - so it makes it easy to update for each client.

Then the clients print to a colour printer.

Since you can now get a decent networkable colour laser for less than 1500 Euro and the running costs are not too high, this actually works out cheaper than using pre-printed letter head - unless you are talking very high volume.

An added advantage of this is that you can use the same method and form to print to a PDF and email the printed output - thus saving paper (although the receipient will probably still print it out) and postage costs.

Probably not the ideal solution for everyone, but works for us.

Chris
cjemichael
 
Posts: 47
Joined: Thu Dec 04, 2003 12:29 pm

Postby Jan Blok » Wed Mar 03, 2004 12:09 pm

My colleague Jan Aleman had an even better Idea, we add a function controller.setPreferredPrinter(name) which the developer can use to set a prefered printer by name, so the developer can get/store the printer names where he wants (ie. database table/server file retrieved via url) and set the name when he thinks fit the need, based on (security) user group based on office locations etc.

HJK wrote:Does it work, if I do a print-preview first and than push the print-button?

For this you whould need 'onPrintCmd' on a form I guess?
Last edited by Jan Blok on Wed Mar 03, 2004 2:06 pm, edited 1 time in total.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Harjo » Wed Mar 03, 2004 12:13 pm

WONDERFULL! :!: :D

onPrintCmd would certainly do the trick! I think.

Than we also need: getPrinters()?
Or am I wrong?
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Jan Blok » Thu Mar 04, 2004 2:36 pm

controller.setPreferredPrinter(name) will be availeble in Servoy 2.0 rc8

Than we also need: getPrinters()?


whould only deliver the local machine printer names which is of almost no use in large companies with printer for each department...
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Another thing

Postby cjemichael » Thu Mar 04, 2004 6:26 pm

Anyone know how to import grahpics/images (jpg/gif/png) and get them to print at more than 72dpi???

I need to have a client logo printed on a layout at a decent (300dpi) resolution.

Ta

Chris
cjemichael
 
Posts: 47
Joined: Thu Dec 04, 2003 12:29 pm

Postby Jan Blok » Thu Mar 04, 2004 6:40 pm

set form property printScale to 400% to print ~300dpi (normal = 72 dpi)
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby cjemichael » Thu Mar 04, 2004 6:48 pm

Doesn't this mean you have to scale everything on the page by 4x?

This would be a real pain since I have to redo all my print layouts.

Let me know.
cjemichael
 
Posts: 47
Joined: Thu Dec 04, 2003 12:29 pm

Postby patrick » Thu Mar 04, 2004 7:46 pm

I think getPrinters would still be useful, even if it only lists the printers a user has configured. But combined with the other possibilty, we could offer a user "his" printers in a valuelist, store that in a table and use it later with setPreferredPrinter(name).
patrick
 
Posts: 3709
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby Harjo » Thu Mar 04, 2004 7:50 pm

I agree with Patrick!
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Next

Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 4 guests