Jump to content

Recommended Posts

philfeldman    0

Has anyone found a workaround for Save Records as PDF in web direct? I know this feature is incompatible with direct scripting and I've been trying to think of a workaround.

 

This feature would be great and is needed to generate any sort of reasonable reports, but I've had not luck scripting a workaround so far. 

 

Help!

Share this post


Link to post
Share on other sites
Wim Decorte    456

The two typical workarounds are:

- use a FMP robot machine on the network to do the PDFing

- use a bit of CWP and any of the existing PHP / .NET / Ruby / ... PDF libraries

Share this post


Link to post
Share on other sites
Todd Geist    4

A "robot machine" is desktop computer running FileMaker Pro that has been setup to be automatically running scripts, usually at regular intervals.  

 

Since WebDirect can't save as PDF, you need to use one of these robot machines to do it for you.

 

Hope that helps

 

Todd

Share this post


Link to post
Share on other sites
troutstudio    0

I am trying to work out RoboPrint but I can't get past the first stage, because I can't have 2 Filemaker programs sharing files. Is the answer to turn off Filemaker sharing on the server? I'm confused about this.

Share this post


Link to post
Share on other sites
dwdata    16

It really depends on what type of report you are trying to print. If you want to by-pass the robot machine and are handy with PHP/mySQL, you could the push data to a mySQL DB (via httppost function) and have PHP handle generating the report. Then you can access the PDF report via the Launch URL script step.

I just did this for a client who ran into that limitation with WebDirect and opted not to go the  robot route. It is was a little more coding, but end result was quite acceptable.  In my case, the client wanted an email generated to to access the report later. If you do not need to save the PDF for later, you can do it all with PHP.

My 2 cents...

Edited by dwdata

Share this post


Link to post
Share on other sites
xochi    13

Robot "machine" is also misleading, in that it's perfectly fine to have the robot user be another account on the same machine as the server - we've been doing this with great results for years on our OS X servers.    We set up the robot user to have very limited permissions, so it can't do any harm to the administrator account that is in control.     YMMV of course, but it's a technique that's worth a consideration if you only have one machine.

 

  • Like 1

Share this post


Link to post
Share on other sites
BrentHedden    11

I can vouch for the 360Works RemoteScripter plugin.  This is how I'm creating PDFs - using a robot user/machine/whatever that is sitting there, waiting for a remote call to spring into action. The WD page just has to pass some parameters to the remote (record #, layout, etc), which isn't much different than setting up the Perform Script On Server feature.  It doesn't matter if the client is running on the server machine or a separate one.  I've got a virtual environment, so spawning a separate slice/client just for this purpose was no problems.

As other has stated already, there are several libraries available for PHP and other web languages that can handle this as well.  These solutions are more elegant, but out of the reach/budget of some.  If you've got the available time, I highly recommend learning how to do this.  

Share this post


Link to post
Share on other sites
JerrySalem    5

A solution that worked out great for me is using the MonkeyBreadSoftware Plugin along with DynaPDF library.

You run a script on the server (as a PSOS), that script calls the plugin along with the library.  You build the PDF separately from a layout.  It isn't nearly as easy as 'SaveRecordsAsPDF', but the examples are pretty straightforward.

 

Jerry

Share this post


Link to post
Share on other sites
GisMo    7

Have the Server save The PDF and Email it to you or have the server save PDF file in a dropbox folder or network shared folder. No plugins necessary

Share this post


Link to post
Share on other sites
JerrySalem    5

GisMo

 

The Save as PDF script step is not server compatible.  Thats the issue.  

 

Jerry

Share this post


Link to post
Share on other sites
jbante    141

You could just generate the base 64 for the PDF you want and stick it in a container with Base64Decode.

  • Like 1

Share this post


Link to post
Share on other sites
JerrySalem    5

jbante,

The OP is using WebDirect.  You can't generate a PDF via WebDirect and then base64 it into a container.

Jerry

Share this post


Link to post
Share on other sites
jbante    141

Jerry, you misunderstand my suggestion. I'm suggesting converting base 64 to PDF, not converting a PDF to base 64. The base 64 comes before the PDF. The base 64 text would be generated by scripting and calculations, not by conversion from a source PDF using the Base64Encode function (at least not directly; there could be a template PDF to decode, but that's optional).

Edited by jbante
  • Like 1

Share this post


Link to post
Share on other sites
GisMo    7
16 hours ago, jbante said:

Jerry, you misunderstand my suggestion. I'm suggesting converting base 64 to PDF, not converting a PDF to base 64. The base 64 comes before the PDF. The base 64 text would be generated by scripting and calculations, not by conversion from a source PDF using the Base64Encode function (at least not directly; there could be a template PDF to decode, but that's optional).

Sounds like a fun project...

Share this post


Link to post
Share on other sites
surgite71    0
On 11/4/2015 at 6:38 PM, xochi said:

Robot "machine" is also misleading, in that it's perfectly fine to have the robot user be another account on the same machine as the server - we've been doing this with great results for years on our OS X servers.    We set up the robot user to have very limited permissions, so it can't do any harm to the administrator account that is in control.     YMMV of course, but it's a technique that's worth a consideration if you only have one machine.

 

Xochi...I would be in your boat. I am having the database I'm working on for a client hosted by DataTrium, so it's not my hardware and I don't have a second machine to dedicate to the "robot".  Assuming this is a scenario similar to what you'd mentioned here? Thanks! Joshua

Share this post


Link to post
Share on other sites
xochi    13
1 hour ago, surgite71 said:

Xochi...I would be in your boat. I am having the database I'm working on for a client hosted by DataTrium, so it's not my hardware and I don't have a second machine to dedicate to the "robot".  Assuming this is a scenario similar to what you'd mentioned here? Thanks! Joshua

 

That probably depends on their specific policies.

 

One should note that FileMaker Server 16 can now generate PDF files, so one could probably do this in WebDirect using the "Perform Script on Server" command, and avoid needing a second "robot" user altogether.

  • Like 1

Share this post


Link to post
Share on other sites
surgite71    0
On 7/28/2015 at 10:41 AM, dwdata said:

It really depends on what type of report you are trying to print. If you want to by-pass the robot machine and are handy with PHP/mySQL, you could the push data to a mySQL DB (via httppost function) and have PHP handle generating the report. Then you can access the PDF report via the Launch URL script step.

I just did this for a client who ran into that limitation with WebDirect and opted not to go the  robot route. It is was a little more coding, but end result was quite acceptable.  In my case, the client wanted an email generated to to access the report later. If you do not need to save the PDF for later, you can do it all with PHP.

My 2 cents...

dwdata...

I may need to explore this route however haven't worked much with PHP. Due to hosting costs, I can't move the database I'm developing from FM14 to 16...the hosting/server pricing costs have increased so dramatically, my client will never pay those monthly fees. As such, I'm stuck with FM14 as they're accessing the database via WebDirect only...unless I can find a way to snag a licensed version of FM14 for Windows that I can install on one of their machines, however that seems unlikely.

Do you have a page on your website the would give me some more direction on this PHP/mySQL route you discussed?

Thanks! 

Joshua

Share this post


Link to post
Share on other sites
surgite71    0
On 6/15/2017 at 9:20 AM, xochi said:

 

That probably depends on their specific policies.

 

One should note that FileMaker Server 16 can now generate PDF files, so one could probably do this in WebDirect using the "Perform Script on Server" command, and avoid needing a second "robot" user altogether.

xochi...thanks!

FM16 definitely can do this natively now...however the hosting fees associated in my case (10 users accessing only via WebDirect) in FM16 is astronomical for my client...and I can't afford my own server license.

I spoke with my new hosting provider (FMPHost) and they said it's fine by them having a "robot user"...they have clients do it all the time in FM14.

Given the increased hosting fees...and plugin options...I think this is the route I need to go...seem correct?

Share this post


Link to post
Share on other sites

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


  • Who Viewed the Topic

  • Similar Content

    • By Donald Clark
      I have a FileMaker server 13.v10 database solution that changed somehow during development and now does not display several WebDirect objects properly.
      For starters, the text shows up as white on a white background, which it did not do before.  We have been and are using the Cool Grey theme.
      Other problems with display:
      1.  3 value lists will not display:  One a regular list from a set of values, another list from a related layout, and a third a filtered list from another layout.  Another value list works normally
      2.  A picture in a container field (locally stored, not external yet) does not show.
      3.  A filtered, sorted portal does not show the records, nor are they accessible in the portal. The filtering and sorting are straightforward.
      We have tried several things to correct the issue:
      1.  Made a new layout, grouped everything together and paste it on the new layout.
      2.  Made a new layout and made the fields and portal from scratch.
      3.  Simplified and changed the relationships to the portal
      4.  Substituted simplified relationships for the value lists (just for testing.
      5.  Tried the db on FM Server 16 and made most of the changes above, nothing was different.
      6.  Used Dropdowns, Popups, and radio buttons, no change in behavior
      7.  We had FMDiff examine the db for corruption, but they found no problems, so file corruption is not an issue.  We also compacted the db in order to reindex all indexed fields, but that did not help.
       
      Everything works fine using FM client.  Only WebDirect has problems.
       
       
      A photo showing the problems on WebDirect is attached, as is a photo showing the fields properly displayed in FileMaker Client.  Please forgive the look and feel; the photos show the layout as we made changes and are troubleshooting.
      Has anyone seen this before?  Do you have any ideas how to fix it?
       
      Thanks for your help.


    • By xochi
      Suppose you have a WebDirect database that has both a [Guest] account and regular user accounts.  Is there any way with a special URL or JavaScript to do an automatic [Guest] login that bypasses the filemaker web direct login screen?
       
      Basically, I want to have a Public area of the site which never asks for authentication, and a members-only are which does, but I don't want to confuse the Public by making them click the [Guest] button ever.
    • By Morenomdz
      Hello there, I've set few text boxes per layout that work as "tutorials", with one button called "help" that changes one global field [tutorial] from Yes to No (and vice versa), commits the record.
       
      When the global field "tutorial" is set to yes, all the "text boxes" should hide, when it is set to no they should apear. It works perfectly in the fm client but when I got to the web even if I change the field to Yes or No in the client and save the record, the web still shows all the text boxes.
      It looks like the the "hide when" is simple not working. Using 
      table::tutorial = "yes"
      Did a test having the a tex field for the tutorial showing on the layout, it looks like the webdirect is not seeing the field content at all. It shows as empty on web and Yes or No on the client.
    • By jorfasan
      We have a development that if accessed by regular Filemaker Pro the button (via Open URL) that links to a document (word file) it does open the application (MS word) resulting a very satisfactory behaviour for users.
       
      But the same stuff when running with WebDirect the Chrome gets an 
      "not capable of opening the window; please deactivate the popup window blocker and try again". Well needless to say that that blocker is not active (under preferencies) and the IS manager of the net also verifies it is not blocked at her level. 
       
      Also firefox, same machine, is not able to open the application; in this case with no alarm / action at all. 
       
      Any clues??
       
      Thanks!!
       
       
      Client
      - Windows 7 professional, SP1 
      - Chrome: Versión 41.0.2272.118 m
      - Firefox:  36.0.4
      - FM Server: 13.0.5.520
       
    • By paul.s
      So, We have a unix admin working on our Mac OSX server. I specifically instructed them not to break our Filemaker 13 Apache install. Well it looks like they worked on the machine but broke one thing.
       
      Does anyeone know where I should look to fix this?
       
      What works:
      Webserver servers files fine from the Filemaker HTTP Folders.
      Filemaker WebDirect works fine.
      PHP is working.
      PHP is indicated as ON in FMSA Admin.
      Admin pages at http://localhost:16001/admin-consolework fine.
      Admin screen shows green on Webserver. Indicates PHP is enabled.
       
      This is the only thing that is not working:
      Previous PHP pages which has successfull connection to databases no longer connect to the database.
       
      I assume that a reference to filemaker somehow got removed from one of the php config files, but I don't know where.
       
      Can anyone give me an idea where to look?
×

Important Information

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