Free Support Forum - aspose.com

Automatically generate a unwanted newline in Aspose

Hi,

The issue is under processing. We will fix it in no more than two weeks. Sorry for inconvenience.

Best regards.

Hi alexey.noskov,

Thank you for your kindly help. Could you please send me the file at funwkk@hotmail.com? And I want to ask is that the newline problem can be fixed by 6.2.0 version using the saveToPdf function?

Regards,
Ken Wan

Hi

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

Thanks for your request. I sent the documents to your e-mail. I use SaveToPdf method. There is no problem with unwanted new line. However, there is vertically merged cells in your document, which are not supported yet. This is the issue #6836 in our defect database.

Best regards.

Hi,

Can you send me your code? As I’m still fail to generate pdf with right encoding.

Regards,
Ken Wan

Hi

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

Thanks for your request. I use the following code:

Document doc = new Document("CPD_Form_C.doc");

doc.SaveToPdf("out.pdf");

Please make sure that East Asian Languages are installed on your machine.

Best regards,

Hi,

I use the same code as you. But still, I fail to generate correct encoding. But it is success for me to generate PDF with correct encoding when I use this computer with previous version of Aspose. And I should already installed East Asian Language and PMingLiu font. Is any other things I have to set? Attached are my setting in windows.

Regards,
Ken Wan

Hi

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

Thanks for your request. Could you please attach the output PDF produced on your side? Also please provide me your system configuration information, I will try to reproduce the problem on my side and provide you more information.

Best regards.

Hi,

Thank you for your help. What kind of system configuration do you want? Actually i have attached the windows region setting on the previous post. And I have posted a wrong encoding PDF before.

Could you please state what kind of system configuration do you want so that I can capture screen for you?


My working environment is :

Windows XP Professional
Visual Studio 2005
Aspose 6.2.0

Regards,
Ken Wan

Hi

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

Thank you for additional information. The problem occurs because Aspose.Words does not support True Type Collections fonts (TTC). As a workaround, you can install PMingLiU.TTF font (True Type Font).

Best regards.

Hi,

I have tried and encoding problem really fixed. But there are some other problems occured, such as unknonw newline, line location. I have attached the word form and the generated evaluation result. Can you advice on how to solve them?

Regards,
Ken Wan

Hi

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

Thanks for your request. I managed to reproduce both problems on my side.

1. The problem with line break occurs because there is very long string without white spaces.

2. The problem occurs because lines are floating shapes. You can just replace these lines with paragraph borders, or underline lines.

I refactored your document and sent to your e-mail.

Best regards.

Hi,

Thanks for your reply.

So how can I due with the first problem? And how do you refactor my document? Is there any tools can automate it?

Also, as our client is urgent for this fix. Can Aspose.PDF notify me when solved this problem and provide a patch on it? My email is funwkk@hotmail.com

Regards,
Ken Wan

Hi Ken,

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

Thanks for your inquiry. I had refactored your document manually; there is no way to automate this process. Regarding the first problem, you can just add white spaces into your string.

Our colleagues from Aspose.Pdf team will notify you here in this forum thread as soon as the issue is resolved.

Best regards.

Hi,

I saw Aspose.Pdf has released 4.0 version. I want to ask does 4.0 version fixed this problem?

Regards,
Ken Wan

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

Thank you for your inquiry.

I tried converting with Aspose.Pdf 4.0.0.0. It doesn’t fix the two problems reported in the post 169386 (last on page 2 of this thread). You can try the new Aspose.Pdf release yourself. Maybe it improves output of your document in some other cases. On the download page you can also inspect the list of implemented features and fixed defects:

http://www.aspose.com/community/files/51/file-format-components/aspose.pdf-for-.net-and-java/entry171377.aspx

Regarding unexpected newline there should be an easy workaround. Just add spaces to split long lines of text. Maybe Aspose.Pdf Team could give you better advice if you post to their forum:

http://www.aspose.com/community/forums/aspose.pdf-for-.net-java-and-reporting-services/20/showforum.aspx

Regarding “Q5A_ANS” and “Q5B_ANS” it would be great to refactor your document as my colleague advised. Floating shapes with absolute positioning anchored to page will never occur at the same places relative to text after conversion to PDF. Say in the source document they accidentally occur there. You can use table borders, underlining or at least floating shapes anchored to the text they logically belong to.

Please let us know if you have any other questions.

Regards,

Hi Ken,

The unexpected newline issue (field as PDFNET-7588) is under processing and hasn’t been resolved yet. As a workaround, please try the following code snippet. It works well except extra blank occurs. I am afraid the complete solution could be available in May.

Document doc = new Document(@"E:\temp\PDFNET-7588.doc");
doc.Save(@"E:/temp/temps.xml", SaveFormat.AsposePdf);
pdf.BindXML(@"E:/temp/temps.xml", null);
pdf.IsAutoHyphenated = true;
pdf.Save(@"E:/temp/test.pdf");

Thanks.

Best regards.

We are happy to tell you that vertically merged table cells are supported when converting to PDF, rendering and printing.. You can download the latest version of Aspose.Words from here.


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

Hi,

We have got the same issue and have tested it with both Aspose Words 6.4.0 and 6.5.0. However, this issue still exists.

Currently, we are using 6.4.0.

Do you have any updates for us regarding the same?

Regards,

KC-MSII Team.

Hi

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

Thanks for your request. Could you please attach your documents and code for testing? Also, please describe what issue you mean, maybe it is not related to the issue described in this thread. I will check your problem on my side and provide you more information.

Best regards,

This is with regard to the newline problem that is generated automatically in Aspose words during the creation of the word document. This issue has already been logged as PDFNET-7588 in your defect tracking system on the 19th of February 2009.

To make the issue clear, we have two sub-issues (both similar) while creating a word document.

1. If we enter text with single line spacing between two sentences, Aspose Words automatically adds an extra (unwanted) line.

2. Similarly, if we have a bulletted list, Aspose words inserts a new (unwanted) line between each bullet point.

We are unable to attach the entire code here due to Legal Constraints.

Please find below the relevant excerpt from the code. Hopefully, this will give you insight into the issue.

Dim doc As Aspose.Words.Document = New Aspose.Words.Document(DocPath)

Dim builder As Aspose.Words.DocumentBuilder = New Aspose.Words.DocumentBuilder(doc)

///Some code here//

Dim objFormField As WordFormField

builder.MoveToMergeField("name of field")

builder.Font.ClearFormatting()

builder.Font.Size = 12

builder.Font.Name = "Arial"

builder.Font.Bold = False

builder.Write(relevant content of field with paragraphs and bullet points)

builder.InsertParagraph()

doc.Save(DocPath)