6 Replies Latest reply on Feb 24, 2012 3:16 PM by willrollo

    export a pdf in preview mode

      Title

      export a pdf in preview mode

      Post

      I have worked out how to export a specific layout no problem. But I want the pdf to appear as the layout appears in preview mode as it contains an invoice and if it isnt in preview mode, only the first line appears from the List table...

      I have added a 'change to preview mode' in the script but it doesnt have any effect..

        • 1. Re: export a pdf in preview mode
          philmodjunk

          Saving to PDF and preview should show the same report and printing should also produce the same result. And changing to preview mode before saving as PDF or printing will have no effect on what is produced.

          You'll need to describe the design of your layout and exactly which method you used to create the PDF to see why this is not working for you.

          • 2. Re: export a pdf in preview mode
            philmodjunk

            Hmmm perhaps you did not specfiy "records being browsed" when saving as PDF?

            • 3. Re: export a pdf in preview mode

              That was it  - thanks. Thought it was something simple.

              I have another question. 

              I want to put an address at the top of this invoice. This will be a text box which consists of merged fields.

              For example:

              <<Customers::Address 1>>

              <<Customers::Address 2>>

              <<Customers::Address 3>>

              <<Customers::Address 4>>

               

              If there is no Address3, for example, is there a way I can have address 4 shift up to fill the space? Should i have seperate text boxes with a merged field in each or keep at as one big text box?

              Also, the invoice has the line items, and underneath is the subtotal, VAT etc as merged fields. When in preview mode, there is a large gap between the lines and the totals. Despite playing around with the sliding, but it hasnt really made any difference..

              Thank you

              • 4. Re: export a pdf in preview mode
                philmodjunk

                As long as it is not in the header, you can set this block of merge fields to slide up and resize to remove unused space due to empty fields. If you have this in the header, it won't slide and you'll have to use other methods such as putting the text in a leading grand summary or using a calculation field to combine all the address data.

                When in preview mode, there is a large gap between the lines and the totals.

                Are these "lines" rows of a portal? If so, fields within a portal row cannot slide. For better results use a layout based on the portal's table to print this invoice.

                Key facts about sliding layout objects:

                1. It's only visible in preview mode and when you print/save as PDF...
                2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
                3. Objects in headers and footers will not slide.
                4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
                5. Container fields will slide only if Top, Left alignment is specified for it in the data formatting section of the Inspector's data tab.
                6. Consistent side borders are difficult to achieve with sliding fields.
                • 5. Re: export a pdf in preview mode

                  Hi Phil

                  Ihave done as you suggested. THis has fixed the problem of the line totals (not using a portal).

                  But i still have a gap from a merged field - I have removed the contents of z record's address 2 field. On preview there is still a gap where it would be.I have converted the header and footer into trailing/leading grand summarys..

                  thx

                  • 6. Re: export a pdf in preview mode

                    sorted it - I had seperated the merged fields into individial text boxes, instead of tpeing them all into one big one...