Deviation of coordinate values for text in PDF

Usage: I use Aspose.Words to convert Word document to PDF format, and then use Aspose.PDF to obtain the coordinate values of a certain text segment in the PDF document.

  1. If there are blank spaces or TAB characters before this text segment in the Word document, will the coordinate values obtained from the PDF be error?
  2. If this PDF is generated by Word itself, the coordinate values of a certain text segment in the PDF document can be obtained accurately by Aspose.PDF, regardless of whether there are blank spaces before the text segment.
    What is the reason for this? Is there any way to solve this?

@liegroup

Could you please clarify what specific issues you are encountering with the coordinate values? Are you looking for a solution to a specific problem or just general information?

solution to a specific problem

@liegroup Unfortunately, your problems are not quite clear. MS Word documents are flow by their nature, upon converting document to PDF Aspose.Words builds the document layout and writes fixed page mole into PDF file. It means that coordinates of all elements in PDF document are absolute.
With what values do you compare coordinates? Why do you think the coordinates returned by Aspose.PDF from your PDF document are incorrect?

Because after I get the coordinate value, I will insert a picture according to the position of the coordinate, the position of the inserted picture is positioned according to the coordinate, the horizontal coordinate position of the picture is offset, the vertical coordinate is correct.

The word document that I need to get coordinates in to generate the PDF does not have this problem if there is no space in front of the text.

Text in PDF is supposed to be in absolute coordinates.Why is this a problem?

@liegroup I do not think the problem in the way Aspose.Words produces PDF or in coordinates. Could you please attach your input and output documents along with code that will allow us to reproduce the problem? We will check your scenario on our side and provide you more information.