Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jan 24, 2025 6:15 pm

Over the years your company has been excellent at providing hot fixes for issues.

Unfortunately, we just paid for an upgrade, and it does not work for us.

Am I the only user who is creating a pdf from a word doc in memory?

What do you suggest I do. My boss is very unhappy that we can't move forward on our project.

[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Mon Jan 27, 2025 1:52 am

Hello,

Sorry for the inconvenience caused. Based on our current adjustments, we have compiled a temporary version(spire.doc_13.1.13.zip) for you. The attached file is the current test result. We noticed that there are still some issues with the line wrapping in the header content, which is related to the table layout. To achieve the same line wrapping effect as MS Word, a lot of adjustments and changes need to be made in the internal processing mechanism. Our Dev team informed that they cannot complete the adjustments in a short time, but they have added this optimization task plan and will gradually improve it in the future. Once an optimized version is available, we will let you know as soon as possible. Thank you for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Mon Mar 10, 2025 8:07 pm

Lisa, I am back on testing the hotfix you sent me and there do not appear to be any changes.

I have inspected the "current.pdf" and it looks pretty good.

Could you post the code you used to create it? I am not getting the same results.



The header is still messed up and the body of the document does not have any line feeds at the end of each paragraph.

Could you tell me what changed in the hotfix that made you think it might fix my issues?

Could you give me an update on the progress the developers are making on this bug


Thank you.

Terrence

Code: Select all
<Reference Include="Spire.Doc">
   <HintPath>..\Users\terrence\Downloads\spire.doc_13.1.13\BIN\NET7.0\Spire.Doc.dll</HintPath>
</Reference>


[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Tue Mar 11, 2025 9:06 am

Hello,

I have uploaded my test project for your reference. Please insert your license key and run it. If you still encounter discrepancies in the test results, kindly provide your system information (E.g. Win10, 64 bit) and region setting (E.g. China, Chinese) for further testing.

Regarding the residual effects, our development team is still working on further adjustments. Unfortunately, there has been no significant progress at this time. Once we achieve noticeable improvements, we will provide you with the corresponding version for verification.
Thank you for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Tue Mar 11, 2025 8:45 pm

Lisa loading the doc file from disk has always produced a pretty good result.

It is when I convert a doc file from memory that causes the issue.

Please see my comments on:

Fri Dec 06, 2024 1:57 pm

[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Wed Mar 12, 2025 3:02 am

Hello,

Thanks for your feedback.
As for the following code of directly saving to PDF.
Code: Select all
Spire.Doc.Document documentFromCode = TmrWordUtil.TMRToWordDocument(tmrData, string.Empty, false);
documentFromCode .SaveToFile(pdfPath2, pdfParams); //pdf document

You can try to use "document.UpdatePageLayout();" before the saving. If the issue still exists, please provide an example that can reproduce the problem, because if I directly use the stream method below, there will be no problem.
Code: Select all
Stream stream = File.OpenRead("Report.doc");
Document document = new Document();
document.LoadFromStream(stream,FileFormat.Docx);
ToPdfParameterList pdfParams = new ToPdfParameterList();
pdfParams.CreateWordBookmarks = true;
pdfParams.WordBookmarksColor = Color.Red;
pdfParams.WordBookmarksTextStyle = BookmarkTextStyle.Bold;

MemoryStream newStream = new MemoryStream();
document.SaveToStream(newStream, pdfParams);
newStream.Position = 0;
string result = "LoadAndSaveToStream_out.pdf";
File.WriteAllBytes(result, newStream.ToArray());

It is speculated that there may be an issue with saving the PDF directly after operating the original word file. We need a complete example to further confirm the cause of the problem. Thank you in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Tue Mar 18, 2025 8:37 pm

Lisa, I have attached a zip file of a visual studio project so you can reproduce the bad pdf.

[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Wed Mar 19, 2025 11:30 am

Hello,

Thank you very much for providing the project. Yes, through your project, I found that the layout is incorrect when using "PdfFromWordDoc_SnMemory" method. I have recorded this issue with SPIREDOC-11170 and reported it to our Dev team. They will further investigate and fix it. Once there is a hotfix version, we will provide it to you as soon as possible. Thank you for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Wed Mar 19, 2025 2:58 pm

Thank you, Lisa.

>>I found that the layout is incorrect

The issue is that line feeds, or carriage returns are not being respected.

Tables are not formatted correctly, and paragraphs are not formatted correctly.

This is good:
Good.png


This is bad:
Bad.png

[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Thu Mar 20, 2025 3:50 am

Hello,

Thank you for your reminder. Yes, I also have noticed these issues. Our Dev team are fixing them now. We will inform you once there are any new updates. Thank you again for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Mon Apr 21, 2025 5:06 pm

Lisa, can you please give me an update on the progress on fixing this bug?

Thank you.

Terrence

[email protected]
 
Posts: 110
Joined: Tue May 19, 2015 8:09 pm

Tue Apr 22, 2025 10:53 am

Hello,

Thank you for your following up. Our latest version(Spire.Doc Pack(hot fix) Version:13.3.7) has optimized this issue, but your project code needs to be adjusted according to the following screenshot.

changeCode.png

This is my test result of using the latest version after adjusting the code.
myresult.png

Looking forward to your test results.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Wed Sep 10, 2025 9:54 am

Hello,

Thank you for your patience.

I'm glad to inform you that SPIREDOC-10992 has been resolved. Welcome to download and test [Spire.Doc Pack(hot fix) Version:13.9.3].
Our website link:https://www.e-iceblue.com/Download/download-word-for-net-now.html
NuGet links:
https://www.nuget.org/packages/Spire.Doc/13.9.3
https://www.nuget.org/packages/Spire.Docfor.NETStandard/13.9.3

If you have any questions, please let us know.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3043
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF

cron