set the printersettings is not working

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
minicooper97de
Posts: 4
Joined: Mon Sep 23, 2013 12:59 pm

set the printersettings is not working

Post by minicooper97de » Tue Sep 27, 2022 4:50 pm

hi forum,

i am on mac mojave with lc9-6-8 - i am stucking with the printersettings - they do not work.

after saving and loading the prefs - the print is not the same...

can some one tell me what is wrong??? or is it a bug?

best, andi

Code: Select all

  on mouseUp
   breakpoint
   reset printing
   put the printerName into tprinterName
   answer page setup -- select something other than default fe A6 - landscape !!!
   answer printer -- select something other than default fe other tray or grayscale !!!
   put the printerName into tprinterNameSelected
   print this card
   put the printerSettings into url ("binfile:" & specialFolderPath("desktop") & "/printerpref")
   answer "prefs saved"
   put the printername into printernameSave
   reset printing
   -- read the settings...
   set the printerSettings to url ("binfile:" & specialFolderPath("desktop") & "/printerpref")
   
   put the printerName into tprinterNameAfterLoadSettings -- not the one i selected
   set the printername to printernameSave
   print this card -- printed, but not with the loaded prefs
   answer page setup -- not the loaded prefs
   answer printer -- not the loaded prefs
end mouseUp

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: set the printersettings is not working

Post by dunbarx » Tue Sep 27, 2022 6:18 pm

Hi.

I am not sure what you are asking. Your handler opens a lot of dialogs, and stores the values of variables and settings. Then you reset printing and do sort of the same things again. Where did you change any of the settings?

If I just run your handler, I get two identical printed pages.

Craig

minicooper97de
Posts: 4
Joined: Mon Sep 23, 2013 12:59 pm

Re: set the printersettings is not working

Post by minicooper97de » Sat Oct 08, 2022 9:45 am

hi dunbarx,

yes you are right. if you only use the default pinter and change nothing you will get the same result. but if you do change the settings (as I wrote in my code-comments) you perhaps get the same issue.... can you please try again ?

greetings, andy

Post Reply