Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Printing to local printer from EWB
Mon, Jul 13 2020 5:22 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi All,

Hope all are safe and healthy.

I need to print a label in custom size (64mm wide, 12mm height) from ewb
to a label printer. I have designed the label in reportbuilder and it
prints fine from delphi app.To print the same label/report, I've made a
module where the same report are sent to the serverrequest but it's
received as pdf and when printing (because of pdf) the print are not the
same. Does anyone had success printing labels from EWB?

Thanks in advance.

Regards,
Huseyin
Tue, Jul 14 2020 9:56 AMPermanent Link

Michael Dreher

Huseyin Aliz wrote:

   // Does anyone had success printing labels from EWB?

Hi,

We also use the ReportBuilder for label printing from EWB applications.
But instead sending a PDF document to the browser...

   // ppReport1.DeviceType := 'PDF';
   // SendCustomStream(....)

we send the label to the local printer directly.

   // ppReport1.DeviceType := 'Printer';
   
M. Dreher
Tue, Jul 14 2020 10:27 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Michael,

Thanks for the input. I have following working (shows the print dialog)
running under EWB IDE:

IDLabel.Device:=dvPrinter;
IDLabel.ShowPrintDialog:=True;
IDLabel.ShowCancelDialog:=False;
IDLabel.ModalCancelDialog:=False;
IDLabel.ModalPreview:=False;
IDLabel.Print;
// Request.SendContent('OK');
// RapportprintStream(Request,IDLabel);
IDLabelQuery.close;

But when it's deployed to the server, no dialog are showed. Another
report sent back as PDF shows fine from same module.

Maybe properties of the report doing something wrong?

Thanks in advance.

Regards,
Huseyin


Den 14-07-2020 kl. 15:56 skrev Michael Dreher:
> Huseyin Aliz wrote:
>
>      // Does anyone had success printing labels from EWB?
>
> Hi,
>
> We also use the ReportBuilder for label printing from EWB applications.
> But instead sending a PDF document to the browser...
>
>      // ppReport1.DeviceType := 'PDF';
>      // SendCustomStream(....)
>
> we send the label to the local printer directly.
>
>      // ppReport1.DeviceType := 'Printer';
>    
> M. Dreher
>
Tue, Jul 14 2020 10:35 AMPermanent Link

Raul

Team Elevate Team Elevate

On 7/14/2020 10:27 AM, Hüseyin Aliz wrote:
> Hi Michael,
>
> Thanks for the input. I have following working (shows the print dialog)
> running under EWB IDE:
>
> IDLabel.Device:=dvPrinter;
> IDLabel.ShowPrintDialog:=True;
> IDLabel.ShowCancelDialog:=False;
> IDLabel.ModalCancelDialog:=False;
> IDLabel.ModalPreview:=False;
> IDLabel.Print;
> // Request.SendContent('OK');
> // RapportprintStream(Request,IDLabel);
> IDLabelQuery.close;
>
> But when it's deployed to the server, no dialog are showed. Another
> report sent back as PDF shows fine from same module.
>
> Maybe properties of the report doing something wrong?

You can't have server module do any prompts or open dialog - it has to
direct print to printer from server (meaning server has to have printer
defined and configured etc)

Raul
Tue, Jul 14 2020 10:41 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Raul,

Thanks for the input. What you say makes sense, but what's the options
if web client has the printer to print the label, and server and client
are located different places?

Thanks in advance,
Regards,
Huseyin

Den 14-07-2020 kl. 16:35 skrev Raul:
> On 7/14/2020 10:27 AM, Hüseyin Aliz wrote:
>> Hi Michael,
>>
>> Thanks for the input. I have following working (shows the print
>> dialog) running under EWB IDE:
>>
>> IDLabel.Device:=dvPrinter;
>> IDLabel.ShowPrintDialog:=True;
>> IDLabel.ShowCancelDialog:=False;
>> IDLabel.ModalCancelDialog:=False;
>> IDLabel.ModalPreview:=False;
>> IDLabel.Print;
>> // Request.SendContent('OK');
>> // RapportprintStream(Request,IDLabel);
>> IDLabelQuery.close;
>>
>> But when it's deployed to the server, no dialog are showed. Another
>> report sent back as PDF shows fine from same module.
>>
>> Maybe properties of the report doing something wrong?
>
> You can't have server module do any prompts or open dialog - it has to
> direct print to printer from server (meaning server has to have
> printer defined and configured etc)
>
> Raul
Tue, Jul 14 2020 12:10 PMPermanent Link

Walter Matte

Tactical Business Corporation


"Thanks for the input. What you say makes sense, but what's the options
if web client has the printer to print the label, and server and client
are located different places?"

Then that is more difficult.

I imagine (I have not tryed this - but in the far past working directly with dot matirx printers I used to) you have to send the report back in the langauge of the printer.

Is there no way for you to format the job as a PDF and when they view the PDF send it to that printer.

I am guessing this is some kind of receipt printer?

Walter
Wed, Jul 15 2020 4:06 AMPermanent Link

Matthew Jones

Hüseyin Aliz wrote:

> received as pdf and when printing (because of pdf) the print are not the same

What size is the PDF that is generated? In my experience, a PDF of a certain size prints to the printer if also set to the same size. More detail about what you are downloading and what actually happens would help assist you.

But I also do something similar to Michael - I have a local Windows Service that polls my Azure server every 30 seconds to ask if there is a label to print. If so, it is given the details and it generates the label. As part of the poll, it also gets told if someone is on the label printing page of the EWB application, and if so it polls faster, thus giving a better response time.


--

Matthew Jones
Wed, Jul 15 2020 4:39 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Walter,

It's a label printer (citizen cl-703 to be exact), and i have tried to
send the label back as pdf from the module, but printing it makes the
size and orientation wrong on the paper, maybe 3rd party software are
needed to adjust the pdf to label size before print.

Regards,
Huseyin

Den 14-07-2020 kl. 18:10 skrev Walter Matte:
> "Thanks for the input. What you say makes sense, but what's the options
> if web client has the printer to print the label, and server and client
> are located different places?"
>
> Then that is more difficult.
>
> I imagine (I have not tryed this - but in the far past working directly with dot matirx printers I used to) you have to send the report back in the langauge of the printer.
>
> Is there no way for you to format the job as a PDF and when they view the PDF send it to that printer.
>
> I am guessing this is some kind of receipt printer?
>
> Walter
>
Wed, Jul 15 2020 4:46 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Matthew,

The report size of the label are (6,4cm wide / 1,2cm height), but when
sent as pdf to the local printer size of the label are ignored and the
print comes out wrong. As i wrote to Walter, maybe 3rd party software
exists which can help with this.

I am also interested in more details about your solution about polling
the server for print jobs Smile

Thanks and regards,
Huseyin

Den 15-07-2020 kl. 10:06 skrev Matthew Jones:
> Hüseyin Aliz wrote:
>
>> received as pdf and when printing (because of pdf) the print are not the same
> What size is the PDF that is generated? In my experience, a PDF of a certain size prints to the printer if also set to the same size. More detail about what you are downloading and what actually happens would help assist you.
>
> But I also do something similar to Michael - I have a local Windows Service that polls my Azure server every 30 seconds to ask if there is a label to print. If so, it is given the details and it generates the label. As part of the poll, it also gets told if someone is on the label printing page of the EWB application, and if so it polls faster, thus giving a better response time.
>
>
Thu, Jul 16 2020 4:30 AMPermanent Link

Matthew Jones

Hüseyin Aliz wrote:

> when sent as pdf to the local printer size of the label are ignored and the print comes out wrong

That's where I'd focus. The PDF should be specified to be made at the label size. That is, when opened in a viewer, it should look small, with the border in the right places.

If that occurs, then the rest is a matter of training - have the user select the right "paper size" when printing.

My printing solution is too custom, but it's just a Delphi service that sits there and uses a component to call an API on the server that tells it if there's something to do. This means that I can control the printer options precisely, and get what is needed.

--

Matthew Jones
Page 1 of 2Next Page »
Jump to Page:  1 2
Image