Hi Elaine,
Please always use your priority support account to post your critical issues in the
priority support forum since only issues posted in the priority support forum are treated with that much priority. You can post a new thread in priority support forum if you want to raise priority of any of your existing issues.
Regarding WORDSNET-14561, we have observed the following two issues with your document:
1. The image at the bottom of the first page is located on the page margin and is cropped.
The image is floating (Shape.WrapType = WrapType.None), because the corresponding
element in the source HTML document is located inside an absolutely positioned
. The paragraph that the image is anchored to is located at the very bottom of the first page so the image appears on the page margin and gets cropped. It is expected behavior for floating images. As a workaround, you could do any of the following:
a) Make all images inline after import (Document Load).
foreach (Shape shape in doc.GetChildNodes(NodeType.Shape, true)) |
{ |
shape.WrapType = WrapType.Inline; |
} |
Note that MS Word also makes all images of this document inline.
b) Insert a page break to HTML just before the paragraph with the problematic image.
This will force the anchor paragraph of the image to start at the top of the second page so the image won't be located at the page margin.
Note also that Aspose.Words does actually import all three images. The first image, however, is not visible, because its parent has 'margin-left: 1108px', which shifts the image to the left by more than 11 inches. As a result, the image can only be seen if page width is big enough.
Our product team has completed the work on this issue and has come to a conclusion that this is not a bug in Aspose.Words. So, this issue will be closed with 'Not a Bug' resolution.
2. Text is exported to PDF in the Fanwood font.
This looks like a bug in Aspose.Words for Java.
Fanwood is the Aspose.Words' last resort font and the fact it is used in the resulting PDF document indicates that Aspose.Words has currently failed to enumerate fonts installed on the local machine. We didn't manage to reproduce this error with Aspose.Words for .NET but it is reproducible with Aspose.Words for Java on a Windows machine (tested on Windows 7).
The error occurs in the following simple scenario:
Document doc = new Document("in.html"); |
doc.save("out.pdf");
|
However, adding just a single line fixes the error:
Document doc = new Document("in.html"); |
doc.setFontSettings(new FontSettings()); |
doc.save("out.pdf");
|
Interestingly enough, in the following scenario fonts are incorrect either:
LoadOptions loadOptions = new LoadOptions(); |
loadOptions.setFontSettings(new FontSettings()); |
Document doc = new Document("in.html", loadOptions); |
doc.save("out.pdf");
|
Our product team will analyze this second issue further. We will keep you posted on any further updates. We apologize for any inconvenience.
Best regards,