Hi all! I have a string that is displayed in a td,...
# advancedpdf
r
Hi all! I have a string that is displayed in a td, but it gets cut off on the page due to its length. Do you have any ideas on how to handle this?
p
Usually this requires a macro structure with header, footer and body - pagination can be added as part of that - there are also elements that can force a page break but the idea with the split header-body-footer is to use fixed size for the tables e.g. (you can look up <macrolist> / <macro id=" "> functionality - but essentially: 1. Set up a page header section that includes any fixed content that should appear at the top of every page, such as a company logo or document title. 2. Add a page body section that will contain the dynamic content for each page, such as a list of transactions or customer information. Make sure to leave enough space at the bottom of this section for the footer content. 3. Insert a page footer section that includes any fixed content that should appear at the bottom of every page, such as page numbers or a legal disclaimer. 4. To paginate the content in the page body section, use the "split-by-page-break" attribute on the appropriate element. For example, if you want to split a list of transactions into pages, you could wrap the transaction table in a <table> element with the attribute "split-by-page-break='true'". 5. If necessary, you can further customize the pagination behavior by using the "start-new-page" attribute on specific elements. For example, you could use this attribute to ensure that a new page always starts with a specific section header or a certain type of transaction. 6. Preview your template and adjust the pagination as needed until you are satisfied with the results.
sorry forgot about pagination function, e.g.:
Copy code
<p style="font-size: x pt; text-align: right;">Page <pagenumber/> / <totalpages/></p>
r
Thank so much for your response! I have tried your recommendation of using split-by-page-break in the table as an attribute and/or as a style, but I haven't been able to make it skip the page with the remaining information from the td.
This PDF has the micro ID for header and footer. From the cases I have worked on so far, I have never seen a micro ID for the body. Should it have one?
p
ah sorry, no you would do something like this for the body:
Copy code
<body header="nlheader" header-height="8%" footer="nlfooter" footer-height="12%" size="A4">
and have fixed layout on css for table I guess - also your split by page break I think should not be in the style tag, iirc its a tag of its own - could you try adding it like this:
Copy code
<table class="itemtable" split-by-page-break="true" style=".....;">
I have several such paginations working without that extra tag though, just using macro list, fixed table layout and the body code above