Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Setting print options for unknown printer


This topic is 8017 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have several layouts from which I print, and have set buttons with scripts which store the print set-up and print options. So on some layouts I am printing the records being browsed in portrait orientation and on others it's just the curent record being printed in landscape view. All this in Windows. OK.

But what happens when my files are used by colleagues elsewhere and I have no idea what printer they are using? Aren't the options used specific to the printer selected at the time the options are set? In this case, how do I set paper size, orientation, number of records to be printed etc. for an "unknown" printer?

Posted

Hello Alison,

Settings for one driver are often transferrable to another - at least as far as common attributes such as orientation are concerned. So long as your page margins are set within the bounds of the printable area on all the printers that will be used, there is a reasonable chance that the settings you requrie will be generic enough to survive the migrations between printers.

It can be worth setting a custom margin of between 3/8 and 1/2 in all the way around your printable layouts, so as to allow for printer variations in this regard.

If you want a high level of precision and you are reasonably confident that you can identify the range of printers which will be used, it is in fact possible to save the various print set-ups into a series of sub-scripts, and then call them selectively depending on the current user name, or a preference setting (user configurable). However for most situations this is more trouble than it is worth - and will require regular updates as printers and driver versions change - so overall, the generic approach (despite its compromises) is usually best.

Posted

Thanks Cobalt Sky, but I cannot get this to work.

To test this, I've set margins within the printable area - with a 1/2 in all the way round. I'm using a Canon and an HP printer, both of which I know print the document OK with 'dedicated' settings. Drivers for both exist on the computer I'm using. The script has the HP settings stored to print on LPT1, but the Canon is attached to LPT1 and is set as the default printer. It doesn't 'see' the print command and nothing happens - well, actually the print status is counting down the pages as though they were printing, but they're not. What am I doing wrong please?

Posted

Hi Alison,

Hmmmn... Not sure you're doing anything 'wrong' as such...

There are a lot of different print drivers out there. Some respond to generic settings, others don't (and there are some that partially respond but trip on certain particulars). Sounds like you're not striking lucky with the drivers you have installed. You may not be any more fortunate with the drivers at your client's site.

That leaves you with several options:

1. Force the users to go through page set-up when they print,

2. Create separate sub-scripts for each printer and a prefs setting (user settable) which is referenced by the script (in an If[ ] sequence) and selectively applied.

3. A utilitarian approach with a generic set-up and a show/don't show preference setting, and a script sequence along the lines of:

1. [color:"white"]....If ["UserPrefs::ShowPrintSetUpDialogPrefs = "Don't Show""]

2. [color:"white"].......Page Setup [Restore, No dialog]

3. [color:"white"]....Else

4. [color:"white"].......Page Setup [Restore]

5. [color:"white"]....EndIf

4. A full-featured approach which caters for all known printer drivers as per 2 above, and includes prefs for each report, with specific printer selections plus an 'Other' category (which, if selected, invokes the dialog along the lones of the script example at 3 above).

If you're going with the latter approach, you would perhaps also be interested to look into third party options such as ProPrint from Afeina:

http://www.afeina.com/proprint.php

...which will enable you to control printer/port selections along with setups.

Whichever way you go, I'm afraid there is a fair amount of work involved. The more work you do up front, the less work the client/user will have to do in the course of normal interaction with your solution. And of course, in this equation it is frequently a question of what the client is prepared to pay for upfront, as to how much it is reasonable for you to deliver.

Posted

Enormously helpful Ray - many thanks. In this case I think I can get my colleagues to determine which printer they'll use and set up accordingly. But it does show what a minefield this is.....guess I'll start looking at ProPrint!

Posted

Setting up FileMaker to print to "any" printer is not that hard. I do it for all of my files and have had no trouble from over 12,000 users worldwide. (Except for a 48 inch HP pen-based CADD plotter - but who is going to print a database on that?) The only real print problems I've had to deal with have been bad/corrupt print drivers and/or corrupt print spoolers.

When FileMaker is first opened, the system default printer becomes the default printer for FM. If you change the printer in FM via the Print Setup menu option, it will remember it until it is changed - even when FM is closed and re-opened. This is true for both Windows and Macs. You, the developer, have no control over this - and you shouldn't - so don't worry and concentrate on what you do have control over.

1. Set all layouts that might be printed to have fixed page margins of 1/2 inch on all sides - this will ensure the page will print on even the oldest printers - even 20 year old printers.

2. For each type of layout and record printing, create a separate script that does a print setup:

(you can only have one print setup per script, if you have more than one, they both will inherit the same setup options)

Landscape - Current Record

Landscape - Records being browsed

Portrait - Current Record

Portrait- Records being browsed

Each script will have only one step:

Print Setup (Restore, no dialog)

3. Manually do a print setup and a print, then open the script and click 'OK' and select Replace Print Setup. Repeat this for each setup script, changing parameters accordingly. It does not matter what printer you use for this. Don't forget to define the paper size if needed also. If a printer does not support a function defined, it will ignore it.

4. For each Go to Layout script, call the appropriate print setup script for that layout. The down side of this is you will need a script (and button to launch it) for each layout you want your users to access.

5. If your application will be cross-platform, open the file on the Mac side and repeat step 3 for each print setup script created. FileMaker will remember the print setup for both platforms in the same script step.

6. TEST TEST TEST - test your file on different computers - not necessarily different printers - that seems to be the key.

That's all there is to it. This setup will allow printing to virtually any printer.

  • 2 weeks later...
Posted

Meant to come back and thank you for this earlier.

I set up exactly as you recomended and the key seems to be point 6. - TEST TEST TEST. A lot of work, but guess what.....absolutely no problems - Yay!

This topic is 8017 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.