cos Posted December 8, 2010 Posted December 8, 2010 I have searched exhaustively to find the answer and now feel it must be so simple I just can't see it. Simply have a web viewer on a layout. Want to print the page. On Macs right clicking shows no printing option. Right clicking in Windows Vista it shows perfectly and prints perfectly. Can I not print a web viewer page on the Mac in Filemaker Pro 9, 10 or 11? If it is possible through a plug in or scripting then would appreciate someone giving some info. What am I missing here? Very frustrated that there is so little information on the web to address this. Thanks
mfrapp Posted December 11, 2010 Posted December 11, 2010 try with applescript something like: open -b com.apple.Safari x.html osascript -e 'tell app "Safari" to print window 1 with properties {target printer:"YourPrinterName"}' on windows you could do something like: rundll32.exe mshtml.dll,PrintHTML "c:\x.html"
bruceR Posted December 11, 2010 Posted December 11, 2010 try with applescript something like: open -b com.apple.Safari x.html osascript -e 'tell app "Safari" to print window 1 with properties {target printer:"YourPrinterName"}' on windows you could do something like: rundll32.exe mshtml.dll,PrintHTML "c:\x.html" First of all, that's not applescript. It is a shell script; which can only be performed by using an applescript "do shell script" statement so it isn't clear why you wouldn't just do this in straight applescript. Secondly, it assumes there is a file on the disk. The web viewer does not necessarily point to a physical file. As previously suggested, I don't see why the file:Print menu is not being used for this; unless custom menus have been set up in the file and the print action has been omitted.
mfrapp Posted December 11, 2010 Posted December 11, 2010 But that assumes there is a file on the disk. The web viewer does not necessarily point to a physical file. As previously suggested, I don't see why the file:Print menu is not being used for this; unless custom menus have been set up in the file and the print action has been omitted. i believe he wants to print the html document and not the filemaker layout. exporting the webviewer html content to file is pretty easy with GetLayoutObjectAttribute() and the export field content script step.
cos Posted December 11, 2010 Author Posted December 11, 2010 Thanks all three for your suggestions. File > print does print the entire Filemaker window which is undesirable. This web viewer is in a tab group and down the page a bit. The viewer contains content from a website not in our control and is varying lengths for each record sometimes several pages long. To host the window, we've made the entire layout very long. The content of the web viewer alone is distributed for manufacturing production use in the company. The Applescript idea isn't cross platform and is unreliable across computers in the field. Also couldn't have Filemaker Go support. So we've settled on a solution by adding a button above the web viewer to open the page externally in a browser window and print from there. On the web page there is also one button that is dhtml calling a javascript when clicked. That button doesn't work in Filemaker without scripting and maybe a plugin, but works fine directly in a browser window. I think that Filemaker should be able to add a Print Web Viewer into the mix. I can think of many uses for this functionality. It's especially painful that right click print works perfectly in Windows and is not even an option on the Mac side. Thank you for the help.
Recommended Posts
This topic is 5107 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 accountSign in
Already have an account? Sign in here.
Sign In Now