Jump to content
Server Maintenance This Week. ×

Print Setup & PDF


javabandit

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

Recommended Posts

Hi All, (this is a bit of a long post)

My Basic Issue:

I'm concerned about the reliability of the Print Setup step in my report script.

The Background:

I'm developing a financial database that's hosted on FileMaker Server. We run only Windows computers, and have many clients that connect to the database and can print to many different networked printers. The db in question has a layout in List View that displays a lot of "columns" of data. So, for ordinary 4:3 screens, the users have to scroll side-to-side to see it all, but the main users have wide screen monitors, and it's no issue for them.

The Task:

I need to allow users to print the layout to PDF so that they can save a "snapshot" of the data they are currently viewing.

My Solution:

I'm using the "Save Records as PDF" script step to do this. But, at first I had a lot of trouble with it because it wanted to always make an 8.5x11 (Letter) size PDF in Portrait Mode. This only displays a small portion of my layout. Instead I wanted to make a C-size PDF in Landscape mode. After much reading on this forum and the FileMaker Help files, I managed to get things to work. Here is the relevant part of my script:

Print Setup [Restore; No dialog]

Save Records as PDF [Restore; No dialog; "$path"; Automatically open; Records being browsed]

Print Setup [No dialog]

I'm using the first Print Setup step to set up C-size paper in landscape mode. But, to do this, I need to specify a printer that all users would have available. So, for my case, I used the "Microsoft XPS Document Writer", which is a print-to-file printer that everyone has by default. Next, the Save Records as PDF step creates a nicely formatted PDF, saves it to $path that I defined earlier in the script, and opens it in the default pdf viewer. Finally I use another Print Setup step to revert the "default" FileMaker printer to whatever the user had before they ran this script.

I've tested this on several computers in the office, including some remote logins, and it works perfectly, just as I want. So, why am I writing?

My Question:

I'm very concerned about this first Print Setup script step. Like I said, it is working just as I want. But, if I go into my script, and double click on the first Print Setup script step, it does NOT show the "Microsoft XPS Document Writer" that I had set up in there. Instead it shows me the print setup for the most recent printer used on the the computer. So, my concern is that even though it's working as I want it to work, it's not doing what is says it should do. Why? And, how can I know for sure that it's going to continue to work? It bothers me that the script is doing something different than it says it will... even if it is doing what I want it to do.

Any insight or help with this will be much appreciated.

Thanks in advance for your time.

Link to comment
Share on other sites

Just for curiosity... is anyone willing to try and replicate the problem?

Create a script with the three steps above, and then go back and edit the first Print Setup step. Is it the same as when you first set it? Or, does it change on you too?

Thanks in advance...

Link to comment
Share on other sites

  • 1 month later...

I find PDF printing a little cranky and hard to manage too.

If you change the first print setup step so it displays the print dialog, I would expect to see the XPS printer settings with the C-sized page in landscape mode when you run the script. Is this what you see - if so, your settings are being stored correctly.

If you want to set up a simple test file with the print setup step set with your settings, I'll run it through my Vista Business and XP Pro PCs and eMail you the results.

HTH

Brian

Link to comment
Share on other sites

  • 4 weeks later...

I'm finally able to get back to this.

Thanks for your suggestions. I can confirm that the settings are being stored correctly. It's a little unnerving that I can't see that when I edit the script, but any type of test that I run confirms that they are being stored as I wanted.

One thing that helps is doing a "Database Design Report..." Here is the relevant part from the report:

#First, use Print Setup to set "Microsoft XPS Document Writer" to C-size Landscape.

#Next, Save Records As PDF to create the file (on C-size PDF)

#Finally, use a generic "Print Setup" to revert to the users' default printer setting

Print Setup [ Orientation: Landscape; Paper size: 17" x 22" ] [ Restore; No dialog ]

So, at least here I can see that the Print Setup script step is indicating a 17x22 paper.

I'm going to close the case on this one. Thanks for your offer to test, but I don't think it will be necessary. I'm now happy that everything is working as planned.

Thanks again.

Link to comment
Share on other sites

This topic is 5156 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.