Is there a way to tell iText 5 to allow page break in the middle of a table cell? - itext

We are using iText 5.13. I am creating a form document using a series of tables, each with a single column, to place one after the other to create the form boxes. In these cells are varying sizes of Paragraphs. When viewing the PDF, if the next table won't fit on the page, we have a large blank space on the bottom half of the page, and the table starts on the next page. If the cell is large enough such that it won't fit on one page, the engine will allow it to page break in the middle of the cell, which is exactly what I want for the cells to do all the time, not just when there is a large cell. I have tried setting table.keepTogether(false), but does not help.
Here is snapshot of the page break occurring too soon at the end of a table, when the next table is too big to fit on the rest of the page

Found the solution over at iText KB: table.setSplitLate(false); answer

Related

How to fit frame to available space in page in JasperSoft Studio/JasperReports?

I have designed a report using JasperSoft and filling it with it JasperReports.
The structure is simple, a header band, a detail band and a footer band.
The problem is in the detail band.
Inside the detail band, there is a table, populated with data from my Java App and when the table ends, I have to insert a frame section that I call "Comments".
Ok, the problem is the next:
Inside the comments frame, i have 2 frames and between them, I want a blank area to separate them. Depending on the table size, I want that blank space to fit the page, if there's more available space in the page, then the blank gap has to grow to fit.
Also, I need a fixed size for that frames.
When there's no space, I need a page break and maximize the gap size in order to fit the entire page.
I append a image to show the schema.
Thanks in advance.
enter image description here

How to get Vertical Scrollbar in Access 2010 on a long form? Seems like a glitch

I have created a large Access Form that spans the form header, all of the detail section 22" and form footer. When viewing the form it will not allow scrolling.
I have copied elements into a fresh database and a new form with the same results. I can send a zip file with this single form to anyone interested in helping.
Ensure that you have the Scroll Bars property set to Both or Vertical Only in the Form Properties:
Seems I figured it out. My Form Header Section was too long. Seems once it gets past 10" it disables the scroll bar on my screen as I was trying to use it improperly to extend the length of my form which is limited to just the 22" . Makes sense that the Header section is not designed to be scrolled, but I had some large images with text boxes between them. Just met a limit of Access

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.

Length of text that can just fit into one screen without scrolling

I find some iphone book apps have such feature:
One screen one page of text without scrolling. The text can just fit into the whole screen with linebreaks and indentations.
I'm curious of how to implement this. How could I decide the length of text that just fit into the screen. And also, given the whole text, I can calculate out the number of pages.
If this is not possible to be done on iPhone(runtime?), then is it possible to process the text before storing it in app? I mean I calculate how many pages I need(how to split the raw text), probably how many lines per page.
I think this is what you are looking for
iPhone SDK: How do you measure the width and height of a string using Quartz?
The accepted answer gives methods you can call on NSString to calculate sizes
What I did for TouchTomes' books was have two iPhone apps. One was the reader that showed up on the App Store. The other was a renderer that calculated what could fit on each page, that only needed to be run in the simulator to create a book DB that the reader could use.
It would throw up a bunch of text, say 100 words, and see if that overflowed or underflowed. If it underflowed, more text was added (say 20 words) and it would binary search until it found exactly how much text would fit. Then it stored in a SQLite DB a row saying "page 12 shows words 100-228" for example. The app would go through this for each font. Another table held all the words in individual rows (!). An optimization step would chop that table down, combining words that always appeared on the same page no matter what font.
I used a Webkit display so the book could include HTML formatting. Now that really complicated the page breakup (e.g. had to keep italics going from page to page) but it let me include some fancier formatting in the text.
Then the reader app had very little to do to display pages; from the page id look up what range of words go on that page, then throw that text up into a webkit view. The user could jump between pages all over the book very quickly, all the hard CPU work had already been done by the rendering app.

Crystal: TOC add dots

I try to add dots between the page title and the page number in Crystal Reports for a table of content. I found http://www.tek-tips.com/viewthread.cfm?qid=1545153&page=1 in the web, but I wonder if there's a more simple and direct way to get the same result.
I'm using CR shipping with VS 2008.
You could draw a dotted line behind the page title and page number fields, bring the fields to the front, and set their backgrounds to white. It wouldn't quite be the periods you're looking for, but it's a bit less baroque than the other method.