DOCX to PDF conversions have formatting issues

Attached are two zipfiles that illustrate two issues I’ve experienced with Aspose.Words.
ISSUE #1
Mystery Line.zip contains the following:

  • A .DOCX file
  • The PDF I created from the .DOCX file
  • A JPEG that illustrates the problem.

The problem is this: On the PDF, there is a tiny line floating in the middle of the upper right corner of the page, just below the Unum corporate address. This line, which appears to be about a character in width, is not visible in the .DOCX file. There is a field there in the DOCX file, but since the field is empty, nothing should show up in the PDF. How do I prevent this line from appearing.
ISSUE #2
Fields.zip contains the following:

  • A .DOCX file
  • The PDF I created from the .DOCX file
  • A JPEG that illustrates the problems.

The problems are these: On the PDFs, text inside what was the Word fields are cut off on the right side and the entire contents of the field falls below the bottom of the surrounding text. Note the words “John Doe”, “diabetes” or any of the dates on the page of the PDF as an example. Because these are forms that we send our customers, we need a high degree of professionalism in their appearance. These formatting issues detract from that. How do I get the field text to look like surrounding text?

Hello

Thanks for your request. I managed to reproduce the problem with “mystery line”. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed. It seems the reason of the problem is underlined whitespace inside “OriginalAddresseeHeader_0_” bookmark. As a workaround of this issue you can try cleaning text of this bookmark, using the following code:

// Open document
Document doc = new Document("yourDoc.docx");
// Clear bookmark text
doc.Range.Bookmarks["OriginalAddresseeHeader_0_"].Text = string.Empty;
// Save to PDF
doc.Save("out.pdf");

I managed to reproduce the problem with size of fields. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
Best regards,

Two questions regarding this issue:
First, is it possible to get an ETA on a fix for the text-placement issue (issue number two in the original email). This is a showstopper for the business area, and we cannot implement Aspose until it is fixed because we cannot send our customers the kind of unprofessional-looking documents this bug causes.
Second, what is Aspose’s general approach to bug fixes? Are there software patches released on a schedule? If so, what is the schedule? Is it weekly, monthly, on the quarter, etc.? Or are there patches released on an ad-hoc basis? Either way, is there a way for me to tell when patches have been released?
Thanks.
Jim McFadden / Unum / Chattanooga, TN, USA

Hello

Thanks for your inquiry. Unfortunately, this issue is still unresolved and currently I cannot provide you any reliable estimate regarding this issue. You will be notified as soon as it is fixed.
Aspose.Words releases are published every 4-5 weeks. Hopefully, this issue will be fixed before the next one. But I cannot promise you anything regarding this.
Best regards,

Hi Jim,
I believe for your second issue you can raise the text inline to the other text by:

  1. Highlighting the field in Word,
  2. Right clicking the field
  3. Choosing Font from the window
  4. Navigating to the Character spacing tab
  5. Choosing the drop down menu “Position” selecting “Raised”
  6. Increase “raised by” to 1pt.

I have tested this and 1pt seems to make the text look in line with the other regular text after rendering. Regarding the field being clipped please refer to your other thread as I have made a couple of possible suggestions.
Thanks,

I have scheduled issue
#16803 The size of TextInputs is incorrect during rendering.
to be fixed in the next release AW 9.2 end of June .

Thanks. I appreciate this.
Jim McFadden / Unum / Chattanooga, TN USA

Hello, Jim.
I’m sorry to inform you, but fix you’re waiting for will not be released in this version.
The problem appears to be in incompatibility between MSWord and PDF text fields layout engine. When Aspose.Words renders a simple text it provides the exact glyphs i.e. geometry structures for PDF output. But when it renders a text field it just sets a number of properties such as font, bounding box size, default text etc. This means we cannot control the text layout in PDF text fields and we cannot provide 100% fidelity for form fields PDF rendering as a result.
However, we’re going to continue the research regarding a workaround with an acceptable level of fidelity loss. E.g. rendering the text fields bounding boxes of increased sizes or decrease the font size.
As a temporary solution you can tune the default text formatting inside text fields to render them acceptably.
For example in the document you attached I’ve formatted text fields in the following way:
The original size of the default text in those fields is 9.5. So, to increase the size of the bounding box I’ve changed the size of the first letter ‘J’ to 12, аnd then insert ‘ ‘ (space) after the rightmost letter. (It’s a little bit tricky since MSWord doesn’t allow selecting the leftmost and rightmost letters of text fields individually. You should first type ‘J’ letter between first and second letters, then increase it’s size, then remove the first letter ‘J‘. The same approach is used for rightmost letter.) It’s important that the ‘J’ and space symbols are inside the text field. I’ve attached the modified document to this post.
Also you can set IsPreserveFormFields to false in order to render the text properly but without form fields.

Thanks for the update, Dimitry. We’ll pursue the workaround as needed. I appreciate your time and effort.

The issues you have found earlier (filed as 16803) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(75)

The issues you have found earlier (filed as WORDSNET-3494) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.