0
Votes
Undo
  1. marco gaspar
  2. PowerBuilder
  3. Monday, 8 April 2024 11:34 AM UTC

Good morning!
Is it possible to send a text/line directly to the printer using the print() command, without having to use the printclose() command for it to be sent to the printer?

Grateful.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 9 April 2024 16:38 PM UTC
  2. PowerBuilder
  3. # 1

Hi Marco;

  The only way that I have done this in the past is either: A) Calling a specific printer DLL directly (external API) or B) using the FileWrite() PB command (but then you might need to also include the low level printer commands in the binary data stream).

Regards .. Chris

Comment
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Tuesday, 9 April 2024 13:26 PM UTC
  2. PowerBuilder
  3. # 2

I'm guessing that you are looking to control the printer directly rather than spooling the print. The PrintJob methods are all a spooling type approach. I belive that windows print queues are predominantly spooled.

It's been a very long time since we did things like this, but we had to get control of the COM port for the printer and then send characters directly to the printer through that. I remember it being a bag of worms with conflicts between our print process and other prints being sent. So if you have a dedicated printer for th epurpose, I guess you would need to find an API for that printer in order to achieve the control you need.

Hope that helps.

David

Comment
There are no comments made yet.
Shenn Sellers Accepted Answer Pending Moderation
  1. Monday, 8 April 2024 21:18 PM UTC
  2. PowerBuilder
  3. # 3

Would PrintText() work for you?

https://docs.appeon.com/pb2022r3/powerscript_reference/printText_func.html

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 9 April 2024 16:35 PM UTC
Hi Shenn;

I believe that this would still be a "Spooling" operation my the O/S.

Regards .. Chris
  1. Helpful
There are no comments made yet.
marco gaspar Accepted Answer Pending Moderation
  1. Monday, 8 April 2024 13:21 PM UTC
  2. PowerBuilder
  3. # 4
 
I'm sorry, but I don't understand?
Comment
There are no comments made yet.
marco gaspar Accepted Answer Pending Moderation
  1. Monday, 8 April 2024 12:16 PM UTC
  2. PowerBuilder
  3. # 5
 
I'm sorry, but I don't understand?
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 8 April 2024 11:37 AM UTC
  2. PowerBuilder
  3. # 6

Maybe you can have a datastore in which you assign some text to a field and then simply do a Print() ? You would not need printopen / -close.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.