If a doc file has a Frame as first element on first page. Now DocumentBuilder.MoveToDocumentStart() moves cursor in the Frame. So i can not add PageBreak in actual doc file.
This message was posted using Aspose.Live 2 Forum
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. Could you please attach your document here for testing? I will check the issue and provide you more information.
Why do you need page break at the beginning of the document? If it is really necessary, you can just insert an empty paragraph at the beginning of the document and insert pagebreak into this paragraph. Your code, in this case, will look like the following:
Document doc = new Document(@"Test001\in.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
// Create an empty paragraph and insert it at the beginning of the document.
Paragraph par = new Paragraph(doc);
// Move cursor to the beginning of the document and insert pagebreak.
Hope this helps.