Hi
for (int i = 0; i < docFiles.Count; i++)
{
String name = inputDir + “\cleanup\doc” + i + “.pdf”;
var doc = new Aspose.Words.Document(docFiles[i]);
doc.Save(name);
Hi
Hi Emil,
Yes, you can do that. Please check Page Setup and Section Formatting section from http://www.aspose.com/docs/display/wordsnet/Specifying+Formatting for Aspose.Words and Page Setup and Printing Options for Aspose.Cells.
Best Regards,
How do I know which paper size to set? Is there a way to get the paper size or the size of the document?
Hi Emil,
You can use the same properties to get or set the paper size as you can see in the following code.
Document doc = new Document("Doc1.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
<?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" />
Console.WriteLine(builder.PageSetup.Orientation);
Console.WriteLine(builder.PageSetup.PaperSize);
if (builder.PageSetup.PaperSize == PaperSize.Letter)
{
builder.PageSetup.Orientation = Orientation.Landscape;
builder.PageSetup.LeftMargin = 50;
builder.PageSetup.PaperSize = PaperSize.Paper10x14;
}
Best Regards,
Thank you