11 Replies Latest reply on Apr 28, 2014 9:27 AM by MarkCampbell

    Error Generating PDF with Empty Container Fields

    MarkCampbell

      Summary

      Error Generating PDF with Empty Container Fields

      Product

      FileMaker Pro

      Version

      13.02

      Operating system version

      Windows 7

      Description of the issue

      When I generate a PDF on a record with an empty container field the PDF gives and error and truncates the documnet.

      Details: I am using FileMaker 13.02 on Windows and have a database with a container field with nothing fancy in its attributes. This field may or may not be filled with a diagram image (.jpg) for a given record. I have a layout used to print a report using this field and it slides fields up to adjust for the size of the image (if there is one). I generate PDFs from this report's preview.

      Result: On records with an image in the container this works fine - the PDF generates and is readable for the whole report. On records with nothing in the container the PDF viewer throws the error above and stops displaying anything from that point in the report on.

      Steps to reproduce the problem

      1. Create a database with a container field (nothing fancy in its attributes).
      2. Create a layout with one field.
      3. Create two records - one with an image in the container and one without
      4. Go to the preview of the layout and Save as PDF on each record
      Try to open the PDFs

      Expected result

      You would expect both PDFs to be error free - one with an image and one blank.

      Actual result

      The PDF with the image is error-free
      The PDF without an image throws and error and does not generate anything from that point in the report on (does not generate the footer)

      Exact text of any error message(s) that appear

      Error in the PDF Viewer Dialog:
      "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

      Screenshot attached

      Configuration information

      FileMaker Pro 13 working on FileMaker Server 13

      Workaround

      Paste in blank (white) placeholder images into the container.

      Acrobat_Error.PNG

        • 1. Re: Error Generating PDF with Empty Container Fields
          TSGal

               Mark Campbell:

               Thank you for your post.

               I am unable to replicate the issue.  Here are the steps I took:

               1. In FileMaker Pro 13.0v2 on Windows 7, I created a table with a Text field (Name) and a Container field (Picture).

               2. On the layout, I set the Container field to slide up.

               3. I uploaded the file to FileMaker Server 13.

               4. I then opened the file from my Windows 7 machine, and added a few records; some with JPG files, and others records where the Container field was blank.

               5. With all records found, I pulled down the File menu and selected "Save/Send Records As -> PDF...".  I selected Records being browsed and saved the file as Untitled1.pdf.  The file opens successfully with Adobe Reader.

               6. I then found one record with no entry in the Container field, and went to "Save/Send Records As -> PDF...".  I saved with "Records being browsed" (even though there was only one record being browsed", and it opened again in Adobe Reader.

               7. I went to Save/Send Records As -> PDF... again, and changed this to Current record.  This file (Untitled3.pdf) also opened fine.

               Make sure you are using Adobe Reader XI (11.0.06).

               Let me know what I'm doing differently than you so I can replicate the issue.

               TSGal
               FileMaker, Inc.

          • 2. Re: Error Generating PDF with Empty Container Fields
            MarkCampbell

                 Hmm not sure - can we WebEx and I can show you - or can I email you the PDF files. 

                 Here is what I do:

                 - Go to report layout - Simple report with header, three container fields, footer

                 - Find record 1 (Image, Image, Image)

                 - Preview - click Save as PDF button in toolbar - Save as "Record1.pdf" 

                 - Opens fine. (Have also tried File > Save/Send Record as > PDF - same result)

                 - Repeat with record 2 (Image, Blank, Image) - save as "Record2.pdf" (attached)

                 - Error on opening - header and first image are there; nothing after.

                  

            • 3. Re: Error Generating PDF with Empty Container Fields
              MarkCampbell

                   Oops - looks like I cannot attached a file. Can you contact me and we can WebEx or I can email you the files?Since you are at FileMaker I assume you can look up my info in my account (as opposed to me posting it).

              • 4. Re: Error Generating PDF with Empty Container Fields
                philmodjunk
                     

                          Oops - looks like I cannot attached a file

                     What you can do is upload your file to a file sharing site such as Drop Box and then post the download link here.

                • 5. Re: Error Generating PDF with Empty Container Fields
                  MarkCampbell

                       Here is where you can find the PDF files:

                       https://www.dropbox.com/sh/qlitpgzt8k46xbe/DnkLmAK0PD

                  • 6. Re: Error Generating PDF with Empty Container Fields
                    philmodjunk

                         Curiously, If I open the file from Fire Fox, I do not get an error message. If I down load the files and double click them from Windows 7, I see the error message with the second PDF file.

                    • 7. Re: Error Generating PDF with Empty Container Fields
                      MarkCampbell

                           Hmm interesting - In FireFox do you see the footer line in Record1.pdf or is it truncated?

                      • 8. Re: Error Generating PDF with Empty Container Fields
                        TSGal

                             Mark Campbell:

                             Thank you for the file links.

                             The second PDF file was not complete.  Although it does open in Firefox and Mac OS X.

                             Try creating a new layout with similar settings (do not duplicate the layout).  Does this work?  If not, then I would like to see a clone of your file so I can try it here.  Check your Inbox at the top of this page for instructions where to send the file.

                             TSGal
                             FileMaker, Inc.

                        • 9. Re: Error Generating PDF with Empty Container Fields
                          MarkCampbell

                               On the "second PDF file was not complete" - yup - that is the error I am trying to fix.

                               OK I think you're onto something though. I cloned the layout and still got the error. Then I made a new layout from scratch and the error does not occur for record2. I will start recreating one of my full layouts to see if this resolves it (a pain).

                               Unfortunately I cannot send a copy of the file since it contains a ton of confidential information. If I cannot get the error fixed by rebuilding all the layouts I'll figure out a way to subset & redact the content and post. 

                               Thanks for the help and I'll let you know how the rebuild goes next week.

                               (Any idea what causes this?)

                          • 10. Re: Error Generating PDF with Empty Container Fields
                            philmodjunk
                                 

                                      Unfortunately I cannot send a copy of the file since it contains a ton of confidential information.

                                 You don't have to send the data, just a clone (empty copy) of the database file.

                            • 11. Re: Error Generating PDF with Empty Container Fields
                              MarkCampbell

                                   It looks like rebuilding the layouts from scratch has fixed the problem. Not sure what got horked up but creating a new layout from scratch and then cutting and pasting all the fields over from the original is working. This tells me there was nothing wrong in the database, fields, scripts, for layout configuration itself. Something inside FileMaker's representation of the layout in PDF was broken - but I'll leave the troubleshooting of that up to you guys. 

                                    

                                   Thanks for all the help.