PDF - Stacking tables

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PDF - Stacking tables

Patrick Larkin-2
Hello -

Lasso 8.5

I'm having a strange issue with the PDF generation tags and am wondering if there is something fundamental I'm missing.  

I'm generating a PDF with size "Letter" with a series of tables of varying length depending on the content, one after another.

Seemingly, every time it gets to page 2, it prints about 20% of the page and then starts a new page leaving a giant amount of white space.  Since the content varies in length, I can't start a new page manually in the code.  Its seems that the amount printed on Page 2 is the same amount in the header area on page 1 before I start stacking tables.  

This is a sample table and all are essentially the same (forgive the colon syntax):

-------

                [var:'MyTable'=(PDF_Table:
                -Cols=2,
                -Rows=4,
                -Spacing=0,
                -Padding=2,
                -Width=100,
                -BorderWidth=0.25,
                -ColWidth=(Array:'10.0','90.0')
                )]
       
                [var:'text'=(PDF_Text:'(3b) Questions have high cognitive challenge and are forulated by both teacher and students with high levels of student participation.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
                [$MyTable->(Add:$text, -Col=0, -Row=0, -Colspan=2, -Rowspan=1)]
                [$MyTable->(Add:$3b1,-col=0, -row=1, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
                [var:'text'=(PDF_Text:$3b1_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
                [$MyTable->(Add:$text,-col=1, -row=1)]
               
               
                [var:'text'=(PDF_Text:'(3b) The teacher asks students to justify their reasoning, and students are able to do so.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
                [$MyTable->(Add:$text, -Col=0, -Row=2, -Colspan=2, -Rowspan=1)]
                [$MyTable->(Add:$3b2,-col=0, -row=3, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
                [var:'text'=(PDF_Text:$3b2_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
                [$MyTable->(Add:$text,-col=1, -row=3)]

        [$MyFile->(Add:$MyTable)]


The content above this series of tables is an Add:Text then an Add:Table and then another Add:Text.  Then the stacked tables start - about 9 of them.

Am I correct in thinking the PDF should generate sequentially or is there some Lasso magic making the page breaks?  

 



Patrick Larkin
Information Systems
Bethlehem Area School District
https://www.beth.k12.pa.us





#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF - Stacking tables

Patrick Larkin-2
Here's an example of the weird output.

https://www.beth.k12.pa.us/test/131205_1212_1156_Dropin-15.pdf



On Dec 5, 2013, at 3:45 PM, Patrick Larkin <[hidden email]> wrote:

> Hello -
>
> Lasso 8.5
>
> I'm having a strange issue with the PDF generation tags and am wondering if there is something fundamental I'm missing.  
>
> I'm generating a PDF with size "Letter" with a series of tables of varying length depending on the content, one after another.
>
> Seemingly, every time it gets to page 2, it prints about 20% of the page and then starts a new page leaving a giant amount of white space.  Since the content varies in length, I can't start a new page manually in the code.  Its seems that the amount printed on Page 2 is the same amount in the header area on page 1 before I start stacking tables.  
>
> This is a sample table and all are essentially the same (forgive the colon syntax):
>
> -------
>
> [var:'MyTable'=(PDF_Table:
> -Cols=2,
> -Rows=4,
> -Spacing=0,
> -Padding=2,
> -Width=100,
> -BorderWidth=0.25,
> -ColWidth=(Array:'10.0','90.0')
> )]
>
> [var:'text'=(PDF_Text:'(3b) Questions have high cognitive challenge and are forulated by both teacher and students with high levels of student participation.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
> [$MyTable->(Add:$text, -Col=0, -Row=0, -Colspan=2, -Rowspan=1)]
> [$MyTable->(Add:$3b1,-col=0, -row=1, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
> [var:'text'=(PDF_Text:$3b1_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
> [$MyTable->(Add:$text,-col=1, -row=1)]
>
>
> [var:'text'=(PDF_Text:'(3b) The teacher asks students to justify their reasoning, and students are able to do so.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
> [$MyTable->(Add:$text, -Col=0, -Row=2, -Colspan=2, -Rowspan=1)]
> [$MyTable->(Add:$3b2,-col=0, -row=3, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
> [var:'text'=(PDF_Text:$3b2_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
> [$MyTable->(Add:$text,-col=1, -row=3)]
>
> [$MyFile->(Add:$MyTable)]
>
>
> The content above this series of tables is an Add:Text then an Add:Table and then another Add:Text.  Then the stacked tables start - about 9 of them.
>
> Am I correct in thinking the PDF should generate sequentially or is there some Lasso magic making the page breaks?  
>
>
>
>
>
> Patrick Larkin
> Information Systems
> Bethlehem Area School District
> https://www.beth.k12.pa.us
>
>
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF - Stacking tables

stevepiercy
In reply to this post by Patrick Larkin-2
Without seeing the full code, it's hard to say.  However I did
run across something similar at one time.  It's iText stuff.  
Tables that extend beyond the height of one page and continue on
to the next will then have a page break after them.

The key is to make sure no table is taller than a page, and to
add a page after the end of the table.

--steve


On 12/5/13 at 3:45 PM, [hidden email] (Patrick Larkin) pronounced:

>Hello -
>
>Lasso 8.5
>
>I'm having a strange issue with the PDF generation tags and am
>wondering if there is something fundamental I'm missing.
>I'm generating a PDF with size "Letter" with a series of tables
>of varying length depending on the content, one after another.
>
>Seemingly, every time it gets to page 2, it prints about 20% of
>the page and then starts a new page leaving a giant amount of
>white space.  Since the content varies in length, I can't start
>a new page manually in the code.  Its seems that the amount
>printed on Page 2 is the same amount in the header area on page
>1 before I start stacking tables.
>This is a sample table and all are essentially the same (forgive the colon syntax):
>
>-------
>
>[var:'MyTable'=(PDF_Table: -Cols=2,
>-Rows=4,
>-Spacing=0,
>-Padding=2,
>-Width=100,
>-BorderWidth=0.25,
>-ColWidth=(Array:'10.0','90.0')
>)]
>
>[var:'text'=(PDF_Text:'(3b) Questions have high cognitive
>challenge and are forulated by both teacher and students with
>high levels of student participation.', -Type='Paragraph',  
>-Font=$Helv9Bold, -Leading=10)]
>[$MyTable->(Add:$text, -Col=0, -Row=0, -Colspan=2, -Rowspan=1)]
>[$MyTable->(Add:$3b1,-col=0, -row=1,
>-VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
>[var:'text'=(PDF_Text:$3b1_evidence, -Type='Paragraph',  
>-Font=$Helv8, -Leading=8)]
>[$MyTable->(Add:$text,-col=1, -row=1)]
>
>
>[var:'text'=(PDF_Text:'(3b) The teacher asks students to
>justify their reasoning, and students are able to do so.',
>-Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
>[$MyTable->(Add:$text, -Col=0, -Row=2, -Colspan=2, -Rowspan=1)]
>[$MyTable->(Add:$3b2,-col=0, -row=3,
>-VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
>[var:'text'=(PDF_Text:$3b2_evidence, -Type='Paragraph',  
>-Font=$Helv8, -Leading=8)]
>[$MyTable->(Add:$text,-col=1, -row=3)]
>
>[$MyFile->(Add:$MyTable)]
>
>
>The content above this series of tables is an Add:Text then an
>Add:Table and then another Add:Text.  Then the stacked tables
>start - about 9 of them.
>
>Am I correct in thinking the PDF should generate sequentially
>or is there some Lasso magic making the page breaks?
>
>
>
>
>Patrick Larkin
>Information Systems
>Bethlehem Area School District
>https://www.beth.k12.pa.us
>
>
>
>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: PDF - Stacking tables

Patrick Larkin-2
I was afraid of that.  With the variable size of the content in the tables, it's impossible to predict how large or small any one of the tables may be.  

I guess I might have to completely rewrite the form without tables.  

Thanks.

Sent from my iPhone

> On Dec 5, 2013, at 4:33 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
>
> Without seeing the full code, it's hard to say.  However I did run across something similar at one time.  It's iText stuff.  Tables that extend beyond the height of one page and continue on to the next will then have a page break after them.
>
> The key is to make sure no table is taller than a page, and to add a page after the end of the table.
>
> --steve
>
>
> On 12/5/13 at 3:45 PM, [hidden email] (Patrick Larkin) pronounced:
>
>> Hello -
>>
>> Lasso 8.5
>>
>> I'm having a strange issue with the PDF generation tags and am wondering if there is something fundamental I'm missing.
>> I'm generating a PDF with size "Letter" with a series of tables of varying length depending on the content, one after another.
>>
>> Seemingly, every time it gets to page 2, it prints about 20% of the page and then starts a new page leaving a giant amount of white space.  Since the content varies in length, I can't start a new page manually in the code.  Its seems that the amount printed on Page 2 is the same amount in the header area on page 1 before I start stacking tables.
>> This is a sample table and all are essentially the same (forgive the colon syntax):
>>
>> -------
>>
>> [var:'MyTable'=(PDF_Table: -Cols=2,
>> -Rows=4,
>> -Spacing=0,
>> -Padding=2,
>> -Width=100,
>> -BorderWidth=0.25,
>> -ColWidth=(Array:'10.0','90.0')
>> )]
>>
>> [var:'text'=(PDF_Text:'(3b) Questions have high cognitive challenge and are forulated by both teacher and students with high levels of student participation.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
>> [$MyTable->(Add:$text, -Col=0, -Row=0, -Colspan=2, -Rowspan=1)]
>> [$MyTable->(Add:$3b1,-col=0, -row=1, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
>> [var:'text'=(PDF_Text:$3b1_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
>> [$MyTable->(Add:$text,-col=1, -row=1)]
>>
>>
>> [var:'text'=(PDF_Text:'(3b) The teacher asks students to justify their reasoning, and students are able to do so.', -Type='Paragraph',  -Font=$Helv9Bold, -Leading=10)]
>> [$MyTable->(Add:$text, -Col=0, -Row=2, -Colspan=2, -Rowspan=1)]
>> [$MyTable->(Add:$3b2,-col=0, -row=3, -VerticalAlignment='Center', -HorizontalAlignment='Center',  -Font=$Helv12Bold)]
>> [var:'text'=(PDF_Text:$3b2_evidence, -Type='Paragraph',  -Font=$Helv8, -Leading=8)]
>> [$MyTable->(Add:$text,-col=1, -row=3)]
>>
>> [$MyFile->(Add:$MyTable)]
>>
>>
>> The content above this series of tables is an Add:Text then an Add:Table and then another Add:Text.  Then the stacked tables start - about 9 of them.
>>
>> Am I correct in thinking the PDF should generate sequentially or is there some Lasso magic making the page breaks?
>>
>>
>>
>>
>> Patrick Larkin
>> Information Systems
>> Bethlehem Area School District
>> https://www.beth.k12.pa.us
>>
>>
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

RE: PDF - Stacking tables

Rick Draper-2
Hi Patrick,

> I guess I might have to completely rewrite the form without tables.  

A technique I have used in the past is to build the pages of the pdf to effectively calculate space requirements and then split the content at applicable locations.  It adds time to the process, but is very doable.

Very best regards,

Rick



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>