14 Replies Latest reply on Mar 5, 2009 3:12 PM by TSGal

    Book or zine format export from FM

    BobSchwenkler

      Title

      Book or zine format export from FM

      Post

      I'm working in FM9 and am trying to figure out a way to export a series of pages so that they'll end up ordered properly.

       

      The pages I want to export are horizontal with two columns. Each of these pages will be folded in half on the vertical axis to form a zine sized booklet (5.5" x 8.5"). The full 8.5x11 pages would need to export such that on the left column might be the first page and on the right column might be the last page, etc.

       

      Hopefully this description is clear. This seems like a task for a more specialized graphics layout program but I thought I'd ask. 

        • 1. Re: Book or zine format export from FM
          TSGal

          Bob Schwenkler:

           

          Thank you for your post.

           

          Are the pages to be printed double-sided?  Or, only one-sided?

           

          If double-sided, you need to put the odd pages on the right side.

           

          Are there more than one record per page?

           

          The trick is to find out how many records/pages you are going to print.  Then, a calculation that determines what page a specific record will print.  For single-sided, the formula would be:

           

          If (Total Pages/2 > Printed Page ; Printed Page ; 2 * (Total Pages + 1 - Printed Page) + 1/2 )

           

          (For double-sided, you subtract 1/2 at the end). 

           

          For example, for those pages 1 through 16, the results of the calculation for each page is shown below:

           

          1 - 1

          2 - 2

          3 - 3

          4 - 4

          5 - 5

          6 - 6

          7 - 7

          8 - 8

          9 -  17/2

          10 - 15/2

          11 - 13/2

          12 - 11/2

          13 - 9/2

          14 - 7/2

          15 - 5/2

          16 - 3/2 

           

          When you sort these, you get:

           

          1 - 1

          16 - 3/2

          2 - 2

          15 - 5/2

          3 - 3

          14 - 7/2

          4 - 4

          13 - 9/2

          5 - 5

          12 - 11/2

          6 - 6

          11 - 13/2

          7 - 7

          10 - 15/2

          8 - 8

          9 - 17/2

           

          ----------

           

          This should put you on the right track.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Book or zine format export from FM
            BobSchwenkler
              

            I'll check this out. Thanks.

             

            And going one step further, ideally we'd have two different layouts being exported to this booklet. One would be a full page display for our products, and the second would be a half page (2 records/pg) for products we distribute. Our selection of products would be the first section of the booklet, followed by our distributed products.

             

            The pages would need to be two sided as you mentioned above.

            • 3. Re: Book or zine format export from FM
              BobSchwenkler
                 I'm realizing that I'm not clear as to where this calculation is entered. Is it in a script, or is there a print dialog that allows the result to be calculated?
              • 4. Re: Book or zine format export from FM
                TSGal

                Bob Schwenkler:

                 

                The calculation would be entered into a Calculation field.  You would then sort by this calculation field.

                 

                For double-sided, the calculation would be a bit different.  Let's take the first page.  For 16 pages, Page 16 would be on the left and Page 1 on the right.  However, when you turn the page over (double-sided), Page 2 will be on the left and Page 15 on the right.  Therefore, the print order would be 16 - 1 - 2 - 15, 14 - 3 - 4 - 13, 12 - 5 - 6 - 11, 10 - 7 - 8 - 9.

                 

                If (Total Pages / 2 > Printed Page; Printed Page + Mod (Printed Page ; 2 ) / 2 ;

                   Total Pages + 1 - Printed Page + Mod (Printed Page ; 2 ) / 2 )

                 

                The sorted results are as follows:

                 

                16 - 1

                1 - 3/2

                2 - 2

                15 - 5/2

                14 - 3

                3 - 7/2

                4 - 4

                13 - 9/2

                12 - 5

                5 - 11/2 

                6 - 6

                11 - 13/2

                10 - 7

                7 - 15/2

                8 - 8

                9  - 17/2

                 

                You can enter this calculation into a calculation field "DoubleSide".  Then, sort by "DoubleSide".

                 

                In the previous post, put that formula into a calculation field "SingleSide" and sort by that. 

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: Book or zine format export from FM
                  BobSchwenkler
                     Ok, I get it. Thanks so much.
                  • 6. Re: Book or zine format export from FM
                    BobSchwenkler
                       So I'm trying to sort by the returned calculation (which is contained in an unstored calculation field) and it just isn't sorting. Is there something I might be missing, or can unstored calculations not be used to sort?
                    • 7. Re: Book or zine format export from FM
                      TSGal

                      Bob Schwenkler:

                       

                      I had to double-check this, but this is working for me.  On another note, I did find a mistake in the calculation.  The > sign in the first line of the calculation should actually be ≥ .  That is:

                       

                      If (Total Pages / 2 ≥ Printed Page; Printed Page + Mod (Printed Page ; 2 ) / 2 ;

                         Total Pages + 1 - Printed Page + Mod (Printed Page ; 2 ) / 2 )

                       

                      What results are you getting when you sort by this calculation field?

                       

                      TSGal

                      FileMaker, Inc. 

                      • 8. Re: Book or zine format export from FM
                        BobSchwenkler
                          

                        Hi,

                         

                        So I think at first I may have been sorting by a similarly named (and incorrect) field. 

                         

                        I'm trying it now and my sort order is coming out as 16, 4, 7, 1, 14, 8, 10, 9, 6, 11, 12, 5, 3, 13, 16, 2

                         

                        The calculated field is producing the correct results though.

                         

                        On another note, I was trying to troubleshoot it some and still didn't figure it out, but the above eqation only works for even total pages numbers. With odd total pages it supplies equal numbers for the first and last, second and second last, etc.

                         

                        I feel like I must be doing something wrong with the sorting but I can't see what it could be. I'll keep trying to figure it out. 

                        • 9. Re: Book or zine format export from FM
                          BobSchwenkler
                            

                          Ok, I figured out how to make the formula work for odd total page numbers. Here is the final formula (with my field names)

                           

                           

                          If (Mod ( printFoundCount ; 2 ) ≠ 0;

                          //ODD

                          If (Mod ( printRecordNumber ; 2 ) ≠ 0;

                           

                          If (printFoundCount / 2 ≥ printRecordNumber; printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 ;

                          printFoundCount + .9 - printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 );

                           

                          If (printFoundCount / 2 ≥ printRecordNumber; printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 ;

                          printFoundCount + 1.1 - printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 )

                          );

                          //EVEN

                          If (printFoundCount / 2 ≥ printRecordNumber; printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 ;

                          printFoundCount + 1 - printRecordNumber + Mod (printRecordNumber ; 2 ) / 2 )

                          )

                           

                           

                          Now I just need to figure out why the heck it isn't sorting right. Thanks so much for the help so far. I don't know if I could have ever figured this out all on my own.

                          • 10. Re: Book or zine format export from FM
                            comment_1
                               In order to print a booklet, you must first make sure you have enough records. To print 2 records per side, your record count must be a multiple of 4. Use a temp printing table to import your records and create additional dummy records if necessary.

                            See also:
                            http://fmforums.com/forum/showtopic.php?tid/157845/


                            • 11. Re: Book or zine format export from FM
                              BobSchwenkler
                                

                              Is there a way to print or export as PDF directly into another FM table? I'm experimenting with some options but it doesn't seem like this is possible.

                               

                              Reason I ask is because I'm going to want to export multiple formats of page layouts and then have them all apporopriately ordered/printed. 

                              • 12. Re: Book or zine format export from FM
                                TSGal

                                Bob Schwenkler:

                                 

                                Yes, you can print to PDF or export to PDF using the "Save Records as PDF" under the File menu.  However, your post is a bit confusing when you say you want to export as PDF directly into another FileMaker table.  You can put the PDF file in a container field.  If you have a script, you could send the records to a PDF file, switch to another table and insert the newly created PDF file. If you are going to create several PDF files, then add the New Record/Request script step so that you don't overwrite the old file with a new file.

                                 

                                TSGal

                                FileMaker, Inc. 

                                • 13. Re: Book or zine format export from FM
                                  BobSchwenkler
                                    

                                  What you're talking about is what I was wondering about. I know you can use the set field step for data but I didn't know if a PDF could be generated and placed into a container field without having to save the file to the OS and reimport it.

                                   

                                  Does Filemaker have the ability to automatically create file names as I'm exporting PDFs? I need to create separate files for each page since Filemaker appears to only be importing the first page from a PDF document. As it is, I've developed a loop script and am manually saving the pages as individual files to test this whole thing out.

                                  • 14. Re: Book or zine format export from FM
                                    TSGal

                                    Bob Schwenkler:

                                     

                                    Yes, a PDF file by definition is a file.  Therefore, the PDF is saved to a directory and then you can use the Insert File command into the container field.

                                     

                                    Here is a sample script that creates sequential PDF files:

                                     

                                    Go to Record [ First ]

                                    Set Variable [ $counter ; 1 ]

                                    Loop

                                       Set Variable [ $path ; "File" & counter & ".pdf" ]

                                       Save Records as PDF [ No dialog ; $path ; Current Record ]

                                       Set Variable [ $counter ; $counter + 1 ]

                                       Go to Record/Request/Page [ Next ; Exit after last ]

                                    End Loop

                                     

                                    --------

                                     

                                    This will create sequential PDF files each time through the loop (File1.pdf, File2.pdf, etc.), so you don't need to pause for each record.

                                     

                                    TSGal

                                    FileMaker, Inc.