9 Replies Latest reply on Jun 3, 2014 11:55 AM by philmodjunk

    Can't import PDF on Windows

    JohnBurwell

      Title

      Can't import PDF on Windows

      Post

           I'm having trouble making my PDF bot work on Windows; I can export a PDF, but I can't then import it into a container field. The script works fine on my Mac.

           The idea is to export the PDF, then "Insert PDF" the file into a container field. The exporting step works, and I can find the resulting file. The importing step fails on Windows, however, and I'm not getting an error message. 

           I'm using a "filewin:" prefix in the export step, and an "imagewin:" prefix for the import step, mirroring what I do on the Mac. 

           I tried using DocumentsPath instead of TemporaryPath, but it didn't seem to help.

           I can't tell why WIndows would fail without even telling me why. Does it not handle importing PDFs the same as on a Mac? Is there some Windows setting that interferes with importing files?

        • 1. Re: Can't import PDF on Windows
          schamblee

               I would suggest using the same path to import as you did to export.  imagewin is not a prefix.

               See the following link about making paths and about prefix.

          http://www.filemaker.com/help/html/create_db.8.32.html

          • 2. Re: Can't import PDF on Windows
            philmodjunk

                 Is the same layout current in both cases? Steps that start with the word "insert.." are particularly layout sensitive. The current layout must have the target field on it and the field must be accessible when in Browse mode. Insert PDF also requires that the layout's container field object be optimized for interactive content.

            • 3. Re: Can't import PDF on Windows
              JohnBurwell

                   S Chamblee, for what it's worth, imagemac: and imagewin: and image: are all valid prefixes. In fact, it seems to me they're required for inserting PDFs; in the script step options window, the examples shown are all "image" prefixes rather than "file" prefixes, using the "file" prefixes results in an error on the Mac, and on Windows, nothing happens. At least when I use "imagemac," the operation succeeds as expected without any error on the Mac.

              • 4. Re: Can't import PDF on Windows
                philmodjunk

                     What exact steps/methods are you using to insert or import the PDF?

                     imagemac: and imagewin: are the tags for inserting an image file rather than a PDF such as when you use Insert Picture instead of Insert File or Insert PDF. On Mac systems, you can use insert picture to insert a PDF. You cannot use this menu option/script step to do so on windows. You have to use Insert File or Insert PDF.

                     If you are using a script, I suggest posting that exact script.

                     To post a script to the forum:

                       
                1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
                2.      
                3.           You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
                4.      
                5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                6.      
                7.           If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
                • 5. Re: Can't import PDF on Windows
                  JohnBurwell

                       The step I'm using is "Insert PDF." 

                       Uploading screenshot of the script. 

                  • 6. Re: Can't import PDF on Windows
                    JohnBurwell

                         Uploading screenshot of the resulting $import_path variable and the error code - 3 - "Command is unavailable (for example, wrong operating system, wrong mode, etc.)"

                    • 7. Re: Can't import PDF on Windows
                      JohnBurwell

                           The Bags::Label field is set for Interactive content and can be entered in Browse mode. 

                      • 8. Re: Can't import PDF on Windows
                        JohnBurwell

                             All right, you got me on the right path. "Insert PDF" just doesn't work on Windows, but "Insert File" does, and it works on Mac, too, and it works with the filemac: and filewin: prefixes. I don't get the pretty previews anymore, but I guess I care less about that than having it work at all.

                             Thanks for looking at it.

                        • 9. Re: Can't import PDF on Windows
                          philmodjunk

                               Can you confirm that you are in Browse mode at the time that the Insert PDF step executes?

                               And is this script being run on a FileMaker Pro client of the database or have you published this to the web and this script is being run by a client using a Web Browser?

                          1 of 1 people found this helpful