Forum How do I...?

PDF to run across multiple pages:

jknepper
Hi, I am having difficulty getting my content to run across multiple pages. It adds a lot of padding to the top and is displayed on the second page. However, it also cuts off the content. I have tried multiple prince-supported CSS properties for the page class such as flow and content, position... I have a header and footer - could these be cutting off the content? Also, the content is from an iframe in the origional source-HTML. Not sure if this is a part of the reason for the cutoff, but adjusting the height value seems to have no effect on the content being displayed. Only if I change it to something very small or a much larger page size can I see the remainder of the content, but it seems that the iframe stuff wants to stay on one page. Could someone kindly inform me of a standard way to get this stuff to span multiple pages with a header and footer? This is what I have for the styling as of now:

1
2 @page {
3 size: US-Letter;
4 margin: 1.00in 0.50in 1.10in 0.50in;
5
6 prince-flow: normal(page);
7
8 @top {
9 margin-top: 0.50in;
10
11 vertical-align: top;
12 content: flow(header_visit);
13
14 }
15
16 @bottom {
17 margin-bottom: 0.50in;
18
19 vertical-align: bottom;
20
21 content: flow(footer_visit);
22 }
23 height: 1500px !important;
24 }
25
26 /* Our first page has an inline header (header_visitinfo), override @page */
27 @page:first {
28 margin: .50in 0.50in 1.10in 0.50in;
29
30 @top {
31 content: normal;
32 }
33
34 @bottom {
35 margin-bottom: 0.50in;
36
37 vertical-align: bottom;
38
39 content: flow(footer_visit);
40 }
41 content: flow(page);
42 }
43
44
45 /* Pull header and footer elements from content and push onto static flows */
46 .header_visit {
47 flow: static(header_visit);
48 }
49
50 .footer_visit {
51 flow: static(footer_visit);
52 }
53
54 .heading {
55 page-break-after: avoid;
56 }
57
58 .end_of_section {
59 page-break-before: avoid;
60 }
61
62
63
64 .manifest_table {
65 width: 80%;
66 height: auto;
67 border-top: 1px solid maroon;
68 border-right: 1px solid maroon;
69 border-bottom: 1px solid maroon;
70 border-left: 1px solid maroon;
71 margin: 3em auto !important;
72 }
73
74 .manifest_table div {
75 float: left;
76 font-size: 2em;
77 height: 25%;
78 width: 100%;
79 font-weight: bold;
80 color: black;
81 border: 1px solid maroon;
82 padding: .5em 0 .5em 2em;
83 }
84
85 .manifest_table div:not(:first-child) {
86 border-top: 0;
87 border-bottom: 0;
88 border-left: 1px solid maroon;
89 border-right: 1px solid maroon;
90 }
91
92 .manifest_table div:last-child {
93 border-top: 0;
94 border-bottom: 1px solid maroon;
95 border-left: 1px solid maroon;
96 border-right: 1px solid maroon;
97 }
98
99 .first {
100 float: left;
101 font-size: 2em;
102 height: 25%;
103 width: 100%;
104 font-weight: bold;
105 color: red !important;
106 border: 1em 0 solid maroon;
107 padding: .5em 0 .5em 2em;
108
109 }
110
111 /* END MOD - 10.30.13. */
mikeday
Currently I think iframes cannot be split across multiple pages; can you put the content in the top-level document instead?
jknepper
Hi, mikeday - thanks for the response! I do, but it seems I lose just about all styling when that happens. Is there a reason that the iframe keeps the styling, but the top level loses it? Much thanks!
mikeday
I don't know, it's difficult to tell without seeing the markup and CSS involved.