We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.PDF questions about Aspose.Pdf XSD


I have downloaded the XSD from http://www.aspose.com/Products/Aspose.Pdf/Intro/Aspose.Pdf.xsd and it seems that does not conform to the example you provide in the site. That means, that you provide an example that uses the attribute PageWidth=“11inch” but the XSD defines the value of it as float which in that case it does not validate if the inch keyword is entered. Also, I have noticed that the attributes WordsSpace, CharSpace are declared to have a value of int. Is this correct or it should be float?

Hi there,


Thanks for your inquiry. Please check the documentation link for sample code snippet/XML for setting Page size. XSD will support the attribute PageWidth with keyword cm and inch, please check complete description against PageWidth attribute. Moreover, basic measuring unit in Aspose.Pdf is point. One inch consist of 72 points.

Please try Aspose.Pdf and let us know if you found any issue. We will be more than happy to help you.

Best Regards,

Thanks for the reply. I use PageWidth and PageHeight attributes, but in the XSD the values of these attributes are set to be float. That means that the validator will alert if we add a value like “5cm”. Maybe, I have old XSD version.

Hi there,


Thanks for your inquiry. Can you please share your sample XML template and error message here? So we look into it at our end and provide your more information accordingly.

Sorry for the inconvenience faced.

Best Regards,

Thanks for the reply.

I have used XMLSpy to create the XML to bind with Aspose PDF in order to create a simple PDF. When I’m trying to add a value to PageWidth or PageHeight (that happens and to other elements that normally accept a ‘16cm’ for example value) then the XMLSpy reports validation error since the XSD defines those values as float instead of string so when the ‘cm’ is appended to the number (like 16cm) then there is a validation error in XMLSpy. But the PDF is being build normally.

Hi there,


Thanks for your feedback. Its good to know you have managed to get your desired results. Aspose.Pdf XSD accepts subjected values with inch and cm string.

Please feel free to contact us for any further assistance.

Best Regards,

Thanks for your reply.

The example you provide contains PageWidth = “20cm”, but as you can see above in the attribute definition in the XSD its type is ‘xsd:float’!

So you get validation errors if you use the example PageWidth = “20cm”. Allowed values are numbers (floats) only without the ‘cm’.

Perhaps the XSD file should be updated?

Hi there,


Thanks for your feedback. We are looking into the issue and will update XSD file accordingly to avoid any confusion.

Best Regards,