3 Replies Latest reply on Aug 24, 2012 9:48 PM by philmodjunk

    Save PDF on server direct, not network share.

    Stuee

      Title

      Save PDF on server direct, not network share.

      Your post

      Hi i have a issue,

      I have the script below which creates a pdf and saves on the network shared location athen attaches to a email and sends.

       

      my problem is not that when im outside of the network on my laptop or ipad that the shared folder is no longer available.

       

      I would like to keep the copy on the server if possible but thats not too essential.

       

      How would i change the script so it is either processed by the server and saved internally or its temporary saved on the pc / ipad white it emails then deletes afterwards.

       

      any assistance is appreciated.

       

      thanks

       

      Also ive just upgraded to fmp 12 and fms12

       

      ---------SCRIPT--------------

      Is there a was as the file is running from the fmserver that i can save a file direct on the server then attach to a email?

       

      cheers

       

      this is my script............

      Emailpdf-Invoice

      // Allow User Abort [ Off ]

      Go to Layout

      [ “Invoice” (Ordering) ]


      Set Variable

      [ $filePath; Value:"filewin://BP_Server/Work_drive/Important_BP/FM_Invoices/" & Ordering::Order ID & "-Invoice.PDF" ]


      Save Records as PDF

      [ File Name: “$filePath”; Current record ]

      [

       

      Document - Title: "Invoice"; Subject: Ordering::Order ID; Author: "**********"; Compatibility: Acrobat 7 and later ]

      [

       

      Pages - Number Pages From: 1; Include: Specific Pages; Start Page: 1; End Page: 1 ]

      [

       

      Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]

      [

       

      Initial View - Show: Page Only; Page Layout: Single Page; Magnification: Fit Page ]

      [ Restore; No dialog ]

      Pause/Resume Script

      [ Duration (seconds): 6 ]


      Send Mail

      [ Send via SMTP Server;

      To: Clients::Client Email;

      BCC: "emaillogs@**********";

      Subject: Ordering::Order ID& "

      Invoice";

      Message: "Hi "& Ordering::Client Name First& ",¶"&

      "¶"

      &"Attached is your Invoice for your recent order "& Ordering::Order ID& ",¶"&

      "¶"

      &"Your job is ready for collection unless you have already collected it."&"¶"

      &"¶"

      &"If you have any questions dont hesitate to ask."&"¶"

      &"¶"

      &"Thanks"&"¶"

      &"**********"&"¶"

      &"¶"

      &"**********"&"¶"

      &"**********"&"¶"

      &"Geelong"&"¶"

      &"Vic"&"¶"

      &"3220"&"¶"

      &"03 **********"&"¶"

      &"0425 **********"&"¶"

      &"¶"

      &"*BANNERS * A FRAMES * PHOTOCOPYING * BILLBOARDS * FRAMED CANVAS * MESH * FLAGS * MARQUEES * T-SHIRTS *

      STUBBY HOLDERS * KEY RINGS * PUZZLES * A4 FLYERS * A0-A1-A2 POSTERS * INVOICE BOOKS * CALENDARS * CD-DVD

      DUPLICATION * CAR WRAPS * FASCIA SIGNAGE * STICKERS * PROMOTIONAL GIFTS * BUSINESS CARDS * BOOKS * PENS *

      BAGS * GOLF TEES * CUPS * ENVELOPES * NOTEPADS * BINDERY * LETTERHEADS * BOOKMARKS * MENUS * MUGS * THONGS

      * POLO SHIRTS * PULL-UP STAND

      EXHIBITION STAND * STAMPS * CLOCK * BALLOONS * ENGRAVING * LED SIGNS * FRIDGE MAGNETS * VINYL CUT SIGNS *

      DESIGN * INSTALLATION * DISTRIBUTION * PERSONALIZATION"&"¶";

      Attachment: “$filepath”;

      Name: "**********";

      Email

      Address: "info@**********";

      Reply-To Address: "info@**********";

      SMTP Server: "**********";

      Port: 25;

      Authentication Type: Plain Password;

      User Name: "info@**********";

      Password: "**********" ]

      [ No dialog ]

      Go to Layout

      [ “Ordering” (Ordering) ]


      Clear

      [ Ordering::Invoice Emailed ]

      [ Select ]

      Insert Current Date

      [ Ordering::Invoice Emailed ]

      12 March 2012 9:38:57 BP_Main - Emailpdf-Invoice -1-

       

        • 1. Re: Save PDF on server direct, not network share.
          philmodjunk

          You could save to the tempoarary items folder on the local machine. Files in there are not retained so you don't have to delete the file.

          If you save to another location such as documents or the desktop, you can use export field contents with the same path but no field specified to delete a record.

          To save your PDF on the server, you might try inserting the PDF into a container field with the new External storage storage option to get the PDF into a location where other users can access the PDF.

          • 2. Re: Save PDF on server direct, not network share.
            Stuee

            thanks for the reply, i ike the sound of saving on the server as i know a temp folder on the ipad is different to a pc which could cause a issue?

             

            could you let me know how i would save on the server?

            cheers

            • 3. Re: Save PDF on server direct, not network share.
              philmodjunk

              Define a container field in FileMaker 12. In storage options for the field, set up external storage.

              When you save as PDF using a variable for the file path, use the same variable with Insert PDF to insert the PDF into the container field.

              I recommend researching these options in FileMaker Help.