GisMo

Insert From URL - posting files to PHP script

2 posts in this topic

I have a php script that takes two PDF files and merges them into one file. I am using this in conjunction with the insert from URL script step. 

The way the script works is it takes two PDFs in container fields and base64encode each files. Then, those two base 64 strings are POSTed via insert from URL.

I've tested the script forwards and backwards and it does combine the PDF files reliably. The issue is when posting from FileMaker. What typically happens is the first page is combined twice and that's my resultant PDF. 

My php script checks that both inputs are different and throws an error is they are identical. I don't get any errors there.

Is there a way to POST a file from insert from URL?

Share this post


Link to post
Share on other sites

I concatenate 2 PDF files using ghostscript on the Mac, not sure how to do that on Windows, should be a similar way.

If you like your PHP approach I do recommend looking into the way I write about in my blog: http://wethecomputerabusersamongst.blogspot.com/2013/10/execute-php-script-from-filemaker-with.html?q=mercutio

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

  • Similar Content

    • By Ali A.
      Hi.
      I have a search field, a user types his customer number in it.
      I want to when a user types his customer number and press inter-script run.
      how can I do this work? I use on object keystroke but when I want to type number script run and user can't type phone numbers.
      how can I fix this?

    • By Jason Mundok
      I have a website that is displaying FileMaker data using the PHP API. Is there a way for the web site to display the basic text formatting from a FileMaker field? For example, a few words in the comments field are bold in FileMaker and I would like them to also be bold on the website. Thanks for any ideas.
    • By BradDuns
      In one of my layouts I have created an ID Card like view that has a persons image and layered over the top of it I have some fields. 
      Is there a way to export that composite as an image?
      I was thinking something like if I grouped the composite and gave it a name I could export it as a script step but searching came up with mostly how to copy layout objects to a different layout...
      Currently it works to screenshot the composite but I would like to automate the process a little bit.
      Thanks for any help
    • By AbsoluteVoice4u
      I'm looking to create a script and place it in a button to exist on two layouts (BACKUP and MAIN), to accomplish the following when activated from either layout:
      Copy current ACCTNUMBER
      If current layout is MAIN
      then go to BACKUP layout and show the same ACCTNUMBER record.
      else if
      current layout is BACKUP
      then go to MAIN layout and show the same ACCTNUMBER record.
       
      ....I'm sure it's a no brainer but right now I'm totally missing some small step to start the script ....help?
       
       
    • By 123
      Hey,
      I have a Tab-Separated Text File which I want to import to a database that I just created in FileMaker Pro 15. The text file essentially is a log of events, for instance, one line describes an order, another line describes a payment that has been made. The problem is that I somehow need to import all these lines into different tables. I want all lines in the log file that describe a payment in a table called Payments, and all lines that describe an order in a table called Orders for example.
      I'm just starting out with FileMaker so forgive me if there is an obvious solution that I'm not aware of. I have a background in software development, so the only solution that I can think of is writing a small program myself that does all the parsing for me and creates separate text files that contain all the orders and payments and other events that have been logged in the file. Then I could simply import each file into the table I need all the data in. 
      So to sum everything up, my main question is if there is a way to somehow parse the text file before importing it. I know that you can create custom scripts in FileMaker but I'm not sure if what I need to do can be done just with that.
      Thanks in advance,
      Mike