Free Support Forum - aspose.com

Page Break in Aspose 2.4

Hi Aspose Team

Can you all please tell us how to add a page break in Aspose 2.4 ? This is our prodcution version and we can not upgrade it only to fix the Page Break.

We are planning to upgrade it later in the year, but for now we need if there is a way to have a page break in java PDF.

Hi Sandeep,


Thanks for using our products.

Please try using #$NP to add page break. For further information, please visit Replaceable Symbols.

The current release version of Aspose.Pdf for Java is 3.3.0 but I am not entirely certain if the replaceable symbols will work with v2.4.0. However if you face any issue, please feel free to contact.

Hi

Thanks for the link. I am tryuing to insert pagebreak by using the following code snippet,

section.getParagraphs().add(new Text(section,“page $p of $P #$NP”))

It prints this text on the pdf instead of interprething these special symbols.

Can you please share some code snippet to insert line break.

Please find attached the sample program I am using. Please chagne the extn from .txt to .java.

If you can help me in fixing this issue will help us lot as we are nearing a production release and this is the last minute change requested by business which requires Page Break functionality. At this point of time we can not upgrade as well.

Any kind of help is highly appreciated!!!

FYI - #$NL works but #$NP is not working…


let me know if you need any more details.

Hi Sandeep,


I have tested the scenario using Aspose.Pdf for Java 3.3.0 and as per my observations, #$NL and #$NP are properly being rendered. For your reference, I have also attached the resultant PDF which is generated over my end. Can you please try upgrading to latest release version and in case the problem still persists, please feel free to contact. We are sorry for this inconvenience.