[reportlab-users] multiple frames on one page
Arkadi Colson
arkadi at smartbit.be
Mon Aug 24 07:27:16 EDT 2009
Robin Becker wrote:
> Arkadi Colson wrote:
>> Hi,
>>
>> Thanks for the quick response. Attached you can see the complete file
>> but it will still not work because a lot of external classes are not
>> there. But maybe you can find the reason this way.
>> I did not start from a working example, I only needed one frame until
>> now.
>>
>> Robin Becker wrote:
>>> Arkadi Colson wrote:
> .......
> Not exactly sure what your' intending, but the two frame stuff appears
> to be just the cover page(s) is that correct? So far as I can tell
> you're doing
>
That's correct, only on the first page, there should be 2 frames.
>
>> story.append( NextPageTemplate('cover') )
>>
>> self.nameTxt = dom.xpath('string(/pdf/cover/nameTxt)')
>> self.name = dom.xpath('string(/pdf/cover/name)')
>> self.vakTxt = dom.xpath('string(/pdf/cover/vakTxt)')
>> self.vak = dom.xpath('string(/pdf/cover/vak)')
>> self.klasTxt = dom.xpath('string(/pdf/cover/klasTxt)')
>> self.klas = dom.xpath('string(/pdf/cover/klas)')
>> self.syTitle = dom.xpath('string(/pdf/cover/syCover)')
>> self.syTxt = dom.xpath('string(/pdf/cover/syTxt)')
>> self.sy = dom.xpath('string(/pdf/cover/sy)')
>> self.logo = dom.xpath('string(/pdf/cover/logo)')
>> self.logoWidth =
>> int(dom.xpath('string(/pdf/cover/logoWidth)'))
>> self.logoHeight =
>> int(dom.xpath('string(/pdf/cover/logoHeight)'))
>> self.logoValid =
>> int(dom.xpath('string(/pdf/cover/logoValid)'))
>> self.ypTxt = dom.xpath('string(/pdf/cover/ypTxt)')
>> self.ypTitle = dom.xpath('string(/pdf/cover/ypTitle)')
>> self.metadataTitle =
>> dom.xpath('string(/pdf/addons/metadataTitle)')
>>
>>
>> doc.setTitle(self.ypTxt+" "+self.ypTitle)
>>
>> ### Cover BEGIN
>> story.append( self.drawCoverInfo() )
>> ### Cover END
>>
>> ### MetaData BEGIN
>> story.append( NextPageTemplate('metadata') )
>> story.append( PageBreak() )
> The NextPageTemplate is intended to prime the interpreter so that the
> next time you change pages you get the referred to template. I suspect
> that since cover is already the first page template you don't need the
> NextPageTemplate append at the beginning. Apart from that it looks
> right although if the content of drawCoverInfo were small you might
> not see any usage of a second template.
>
Correct, so I removed the first NextPageTemplate but no changes.
OK, I added some spacers to the end of the first template and now it
seems to work. I didn't knew this and it is very logic of course.
Thanks a lot for the helping me out of this!!!
>
> Why don't you try tuning on all your showFrames and see where the
> frames actually are.
More information about the reportlab-users
mailing list