Sections on same page

Hi support,

The Section object has this method :

public void setIsNewPage(boolean newPage)

that "Sets a bool value that indicates whether the section starts a new page. 
The default value is true."

From my tests, the method seem to have no effect, when the boolean is set to "false".
I have three consecutive sections, and I want that the 2nd one to be on the same page as the end of the 1st one.
Please confirm/infirm, I'll appreciate.

Regards,
Milan Cutlac


Hello Milan,

I have tested the scenario and have been able to notice the same issue. I have contacted the concerned department and soon you will be updated with the status.

Hello milan,

the method:
public void setIsNewPage(boolean newPage)
in Section class has no effect. In pdf java version, All Section in Pdf will start in a new page. If you want to add paragraphs on the same page, you can add them in one Section.

We add this method in Section to keep the API compatible with .net version. We are sorry to bring you so much trouble.

Thank you for cosidering our product.

Hi Sandy,



Please confirm if this method shall be supported in a future release of Aspose.Pdf for Java.
One of our product requirements can be 100% accomplished by using different sections on same page.



Thank you,

Milan

Hello millan,

Sorry, we are not planning to support this function in Java version at present. We think maybe you can work it out in another way. For example, you can use the method Paragraph.isFirstParagraph() to get the Paragraph in a new page. If this method cannot resolve your problem, please tell me more information. So we can try our best to find a solution.

Thank you for your patience.

Hy Sandy.Zhang,

As I said in the previous entries (and the post from https://forum.aspose.com/t/126208 has the same target in mind) , I need to have an area to which I can be able to add data wherever I am in the document, and this kind of area can be a section, but the problem is that a section can start only on a new page; what "bothers" me is the empty space between this section and the one before it .If aspose.pdf could support the continuous section break type, that is the possibility of having two or more different sections on same page, then I suppose this issue wouldn't exist.

Best regards,
Milan

Hello milan,

I have check your posts(including Pdf navigation) carefully and think that maybe you can finish your job in one Section. There are two facts about our product:

First, the Paragraph class is the super class of all displayable objects.Text, Table, Image, Graph etc, are all subclass of Paragraph.

Second, there is a Paragraphs member in Section. You can get it through the method Section.getParagraphs(). The Paragraphs is a list of Paragraph, So you can add any Paragraph to any position in it.

In a word, maybe you can find a solution through the class Paragraphs and the method Paragraph.setFirstParagraph().

Hopefully this helps and thank you for using our product.