It is currently Tue Sep 29, 2020 10:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: DefaultPrinter() not working in LinuxMint 19.3
PostPosted: Wed Jan 29, 2020 5:38 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 580
Hi

I am using PB 5.71 Linux with LinuxMint and the following code does not send a print job to the printer. Nothing is displayed in the print queue. The printer is a Canon MG5700 series (system default destination: Canon_MG5700_series
device for Canon_MG5700_series: dnssd://Canon%20MG5700%20series._ipp._t ... 128B2C641F). It works fine with PrintRequester().

Simon

Code:
;
; ------------------------------------------------------------
;
;   PureBasic - Printer example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

;If PrintRequester()
If DefaultPrinter()

  If StartPrinting("PureBasic Test")
 
    LoadFont(0, "Arial", 30)
    LoadFont(1, "Arial", 100)
 
    If StartDrawing(PrinterOutput())
     
      BackColor(RGB(255, 255, 255)) ; Uses white as back color, usuful when printing on a white sheet
      FrontColor(RGB(0, 0, 0)) ; Use black for standard text color
     
      DrawingFont(FontID(0))
      DrawText(100, 100, "PureBasic Printer Test")
     
      DrawingFont(FontID(1))
      DrawText(100, 400, "PureBasic Printer Test 2")
   
      If LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/PureBasic.bmp")
        DrawImage(ImageID(0), 200, 600)
      Else
        MessageRequester("Error","Can't load the image")
      EndIf
     
      Box(200, 1000, 100, 100, RGB(255, 0, 0)) ; Draw a red box
       
      StopDrawing()
    EndIf
   
    StopPrinting()
  EndIf
EndIf


_________________
Simon White
dCipher Computing


Top
 Profile  
Reply with quote  
 Post subject: Re: DefaultPrinter() not working in LinuxMint 19.3
PostPosted: Fri Jan 31, 2020 6:03 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 580
Hi

I just setup a new Linux workstation with OpenSuse 15.1 and the DefaultPrinter() function works. So I do not know why a new LinuxMint 19.3 does not work.

Simon

_________________
Simon White
dCipher Computing


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye