Jump to content

Recommended Posts

Posted (edited)

Hello all!

 

I'm building a catalog utilizing FPRepeatableComponent. Depending on the information in the record, each section can have from 1 to 11 products that flow into the body and overflow pages. Each page can contain up to two products. The issue I'm having is if there is a single product on the page. If I set the text box to vertically align center, I get the one product centered, but I also get a duplicate of the same product aligned to the top (overlapping each other). Instead, I tried using FindTextFrame in OnRecordStart to center the content, and got the same result. If I align the text frame to the bottom, I get one on top and one on the bottom of the same product. Now, if I set the frame to align to the top, I get one product on the page like I should. In short, the alignment works, but always ghosts the same product to the top. How do I bust the ghost?

 

TIA!

~Lisa

 

**Edited to add that the rule does validate correctly, only listing one instance of the final product. Though, if the text box vertical alignment is set to center or bottom, two instances of the final product appear on composition.

 

FusionPro Windows 10.0.26

Edited by LisaHansen
Posted

Thanks for reading. I thought that might be the case, but I was hoping someone had seen this before and knew right away the perfect fix. Ha ha.

 

I'll dummy this up so it can be uploaded today. Thank you!

Posted

Well, this is a cheerful job! :)

 

There seems to be a bug with this particular combination of repeatable components and vertical alignment. I'll enter a case about this and we'll look into a fix.

 

In the meantime, I think it's easier just to insert some extra space manually in the case where there's one repeatable component on the page. This isn't too hard to figure out: basically, if there's an odd number of them, then the last one will be by itself, so we can insert some space before it. And the easiest way to add the space is by simply inserting some blank lines (paragraphs). The attached revision of your template does this.

 

Note that I also reduced some of the extremely repetitive code in the rule, where you're doing something for Product 1, then the same thing for Product 2, then for Product 3, etc., with just an outer "for" loop. I also replaced the "record walker" loop that iterates the whole XDF every time with a call to ExternalDataFileEx.FindRecord. And I moved the call to create the ExternalDataFileEx into that rule instead of in OnJobStart, since FusionPro 10 now caches the XDFs, and doesn't actually re-load it even if you call "new ExternalDataFileEx" repeatedly. So the rule is now much more succinct, and it composes a lot faster too.

AWC REP DUMMY-Dan-6.pdf

Posted (edited)

Dan,

 

Thank you SO much for looking into this. I also appreciate you streamlining my code. I know I wrote that way too repetitively, but that sometimes helps me when I'm troubleshooting. I come from the Prepress world, I learned javascript from you and this forum.

 

I'll put your extra spaces plan into action and will watch for a fix for repeatable components and vertical alignment.

 

Thank you again!

~Lisa

 

p.s. I should have warned you about the project topic. I'm just used to it. Lol.

Edited by LisaHansen

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...