Are there any known issues in setKetWithNext() api. I am generating pdf using dynamic content. When I use KeptWithNext(true) on a textfragment, sometimes that content is not displayed in the pdf.
I am doing similar to this:
TextFragment tf = new TextFragment(“Testing”);
tf.setkeptWithNext(true);
//adding this fragment to page
HtmlFragment hf = new HtmlFragment("
Following paragragh //adding this fragment to page
Here I am trying to keep title and atleast part of paragraph together.
Can you please share complete code snippet and sample output being generated at your end, so that we can test the scenario in our environment. We are sorry for this inconvenience.
Thanks for sharing the sample code. I have tested the scenario and noticed that reported issue, so logged a ticket PDFJAVA-36186 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.