10 Replies Latest reply on Feb 5, 2014 6:28 PM by user19752

    Runtime - Creating PDF in MAC issue

    hjvanes

      Dear FM PPL especially MAC users,

       

      This question is regards PC vs MAC scripting if any change is really required.

       

      I do not have a mac but a pc. The MAC environment I have setup on my PC is through VMWARE so testing this issue in the mac environment is not conclusive for me.

       

      The solution will be a runtime so I needed to get around the 'save as pdf' function to email a pdf. Did this simply with :

       

      Set variable $output with a value being file name and ".pdf"

      print setup [restore; no dialog]

      print [restore: Adobe PDF; no dialog]

      set variable [$attachmentpath; value (and decide whether mac or pc] & "filename.pdf"]

      set field [attachment; $attachmentpath]

      Then I export the file to a folder for own records but also for container purpose and the container is there as a record for all emails including pdfs sent

      Set variable $output2; value with a value being file name and ".pdf"

      set field [table::attachment2; $output2]

      exprt field contents [table::attachment; $output2]

      sendmail [via email client.....and attachment has $output2

       

      This works for PC. It will look at print setup and see that it has been assigned to ADOBE PDF to print as pdf. This is regardless of default system printer it will select ADOBE PDF print driver. The rest of the script picks up value and attaches to email. No problems.

       

      Howevere, when I executed this on a mac air, no pdf had been generated. None in the exported folder, even though the folder had been created and in turn as a consequence nothing to attach.

       

      I understand that the mac has something inbuilt to be able to print pdfs and therefore does not require the ADOBE PDF print driver to do so.

       

      Is there something I need to change in the print setup to allow it to be able to print as a pdf for mac computers regardless of the default printer or do I need to do an if mac system do this else script to differentiate regards print setup followed by print statement???

       

      Again not too sure about MAC part on this and why pdf is not being generated in the mac but it does on the PC.

       

      Any help is much appreciated.

       

      regards,

      HJ

       

      Script in word doc attached