We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Rendering / Printing causes text to overlap but Saving of file does not

Hi there,

I noticed that when an Aspose Document is view through the viewer (simliar to the Explorer demo's ViewerForm.vb) or print using Rendering.AsposeWordsPrintDocument's print method (simliar to the Preview.vb in the sample), certain text are shifted downward and overlaps the text below as illustrated in the attachment "PreviewOutput.doc".

The first two highlighted section in PreviewOutput.doc are essentially table with two columns. However, the last highlighted text are straight assignment of text to a run which is appended to a paragraph which belongs to the first section's body. (I didn't use builder).

Additionally, I noticed that the first two overlap text scenarios only occur when the aspose document was not physically saved on a drive (document is a class variable created dynamically and then pass to PreviewForm).

On the contrary, when a document is physically saved and retrieved using New Document(FileName), and pass to the PreviewForm, it will work just as expected; there's no overlap. (but the last overlap is still a problem as illustrated in PreviewOutput.doc.

Is there something that I did wrong? Ie, is there a character within the text that needs cleaning?

The Aspose dll used is version 8.0.0.0 release in Nov 12 2009.

Thanks in advance,

Dan

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I cannot reproduce the problem on my side. The attached document is rendered without any issues on my side. Could you please create a simple application, which will allow me to reproduce the problem? I will check the issue one more time and provide you more information.

Best regards.

Thanks for checking Alexey,

Attached is the project that would illustrate behaviour differences between saving the file first and then viewing it Vs Viewing the document directly.

Essentially “Save & View” and “View Directly” runs the same code when generating the aspose document. The only difference is “Save & View” saves the document first before passing the document in the Viewer (frmAsposeViewer).

The criteria to use is have the “Include Paragraph” checked and bottom padding to 0 or 10. (you’ll see that view directly method will shift the section and overlap other sections).

Or

Have “Include Paragraph” unchecked and bottom padding to zero. You’ll see that the save & view shows correctly, and the “View Directly” method seems to add spaces between the line.

Hope this help. I’m not using document builder. (maybe i should).
Please let me know if there’s a better workaround.

Thanks again.

Dan

Hi Dan,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

As a workaround, you can try using code like provided here:

Hope this helps.

Best regards.


Thanks for the quick respond Alexey. The workaround works great!

Happy New Year.
Cheers
Dan

A post was split to a new topic: Overlapping issue when rendering