Free Support Forum - aspose.com

Default page size/orientation/margins

Certain file types have page size/orientation/margins baked into the file format. Loading these files will load the correct settings.

Other file types (such as HTML) don't have these settings baked into the file format. They load with default values (such as 1" or 1.25" margins).

How can I know if I'm using settings loaded from the file or Aspose defaults?

Can I set Aspose defaults?

Hi there

Thanks for your inquiry.

Could you please clarify which Aspose component(s) you are using? We will look into this issue for you and provide you with some further feedback.

Thanks,

I am using Aspose.Words and Aspose.Cells but this question likely applies to other products as well.

Aspose.Words, for example, has a PageSetup object with page size/orientation/margin properties in each Section of a document . Aspose.Cells also has a PageSetup object.

How do I know if the page setup originated from the file itself or from Aspose's defaults?

Hi

Thanks for your request. Aspose.Words always reads page setup from documents, as well as Aspose.Cells. Defaults are used only if format does not support page setup. For example HTML format as you mentioned.

You can simply check the format of the loaded document and see if the format supports page setup.

No, you cannot change defaults used by Aspose.Words. However, you can easily change page setup after loading the document.

Best regards,

Is there any easy way to test whether the format supports page setup (ie. SupportsPageSetup property) or do I need to keep a list of formats which support it?

Hi

Thanks for your request. No, there is no “easy” way to check this. By the way why this is so important for you?

Best regards,