Free Support Forum - aspose.com

Is there something like pdfDocument.MovePosition(X1- Y1) for WORD?

Dear Sir,

I have a template for pdf (in xml)

In this template there are x-y coordinates where a "Fixed Key Text", say a Customer name is located for company A. The purpose is that when an arbitrary new pdf document is read, the system must recognize this document using the x-y coord to retrieve the "fixed key text" (=customer name of that company). Read Document is compared to Template.

I have the following code snippet for pdf files:

Dim pdfDocument As Aspose.Pdf.Kit.PdfPageEditor = New Aspose.Pdf.Kit.PdfPageEditor()

pzPageSize.Height = Y2 - Y1

pzPageSize.Width = X2 - X1

pdfDocument.MovePosition(X1, Y1)

pdfDocument.PageSize = pzPageSize

pdfDocument.Save(strPdfTempFile)

NOW the QUESTION is:

How can i do this for a WORD Document ?

I must have something like the pdfDocument.MovePosition(X1, Y1), (X1,Y1 Coordinates).

Such as WORDDocument.MovePosition(X1, Y1) ?

I cannot use streams/bytes etc. because these will not work if in the input document something has changed without effecting the position of the "fixed key text" (customer name).

Kind regards.

KLM9550

Hi

Thank you for your interest in Aspose.Words. There is no method like MovePosition(X1, Y1). But you can navigate the DocumentBuilder cursor to a different location in a document using various MoveToXXX methods. See the following link for more information.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.html

Also if you need to extract some values entered by user then you can try using formfields.

Best regards.