Problem with image converting Aspose.Words to PDF

Hi.

I’m exporting a document created using Aspose.Words into PDF (SaveFormat.PDF). I’m using columns and images, and I’m wrapping text arround this image, like it:

_docBuilder.InsertImage(shape.ImageData.ImageBytes, RelativeHorizontalPosition.Column, 0, RelativeVerticalPosition.TopMargin, 0, -1, -1, WrapType.Through);

It’s working very well using SaveFormat.docx, but all images are over text when I’m saving it into PDF file.

Why? How can I fix it?
Thanks

DK

Hi

Thanks for your request. The problem occurs because you are using floating shape (WrapType.Through) in your document. Currently Aspose.Words does not fully support Text Wrapping during converting to PDF. As a workaround, you can try specifying Wrapping Style of Image to “In Line with Text”. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

Hi,

I’ve tried to use WrapType.Inline, it works in the same column, but the text in the next-right column will be above image if this image overflow 2 columns.

How to solve it?

Thanks
DK

Hi

Thanks for your request. Unfortunately, I cannot suggest you any way to work this problem around at the moment. You should just wait for the fix of the original issue.
Best regards,

Hi. I need it to the next week. When the fix will be done and published? Do you know?

Thanks,
Dk

Hi,

I think I need to implement my own solution to do this. Can I get current position (column, page, line number)?

If I can get this, I can manage line breaks in the next column to do my own WrapText.

How can I get these attributes?

Thanks,
DK

Hi

Thanks for your request. Unfortunately, positioning of floating objects is an extremely complex issue, so I cannot promise you a fast fix. Hopefully, this issue will be resolved somewhere at the first half of this year, but I cannot provide you a more solid estimate at the moment.
Regarding position, MS Word document is flow document and does not contain any information about its layout into lines and pages. Our Rendering Engine layouts documents into lines and pages.
But unfortunately, there is no public API, which allows you to determine where page starts or ends. Also, there is no way to find the position of the particular node on page.
Best regards,

I think I can use Aspose.Pdf to deal with PDF directly. What do you think?

Can I have columns in Aspose.Pdf?
Thanks

DK

Hi

Thanks for your request.I think in this case you can use Aspose.Pdf.Kit
https://docs.aspose.com/pdf/net/overview/
You should ask this question in the appropriate forum
https://forum.aspose.com/
Best regards,