Page setup and formatting aspose.html

I have registered the user for 90 days trail version. I am not able to increase page limit and other formatting in my application.

@rajendrachaudhary

Can you please share a bit more details like sample files and sample code snippet so that we can test the scenario in our environment and address it accordingly.

Actually we are trying to do below items

  1. Adding new page according to content. Currently It is giving only 4 pages.
  2. Setting up page left, right, top and bottom margin.
  3. Hiding watermark in PDF

Wanted to know that for page setup(like page count more than 4) and all other settings do we need to add some logic for the same. If yes where we can get it?
So far we have download the dll after registration and used reference of same dll in application.

@rajendrachaudhary

First of all, please make sure to set the license before using any method of the API so that an evaluation watermark does not appear in the output. After that, you can use below settings to change the page size and set margins of the output PDF:

Aspose.Html.Rendering.Pdf.PdfRenderingOptions pdf_options = new Aspose.Html.Rendering.Pdf.PdfRenderingOptions();
// The PageSetup also provides different properties i.e. FirstPage, LastPage, LeftPage, RightPage and they are used to setup (PageSize, Margin) for every page. 
// In most cases, usage of setup any page is enough, but in some complicated cases, you may need to fine tune page settings. It can be done either by CSS styles or by using rendering options.
// the size for drawing is in pixels
pdf_options.PageSetup.AnyPage = new Aspose.Html.Drawing.Page(new Aspose.Html.Drawing.Size(792, 598));
pdf_options.PageSetup.AnyPage.Margin = new Html.Drawing.Margin(0, 0, 0, 0);