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

Free Support Forum - aspose.com

Miss match on source word and generated PDF

Hi, We have a bunch of 1,800 Word sitting on a server wich we use to edit/convert to PDF and Print.

We have a problem on some of the PDF wich cotains tabs stop ( about 600 )

I have attached a word and a PDF generated with Aspose.Word and Aspose.PDF

(I am using the latest version of Aspose.Total)

Thank you,


Thank you for your inquiry.

I see the issues. But when I tried converting this document with the latest versions of individual Aspose components there were everything correct. I’m not sure what versions of Aspose.Words and Aspose.Pdf were used in the latest Aspose.Total. Anyway if anything was fixed recently the fixes will come to Aspose.Total very soon.

The only difference I met is that newer version of Aspose.Pdf produces an extra empty page. When I removed two empty paragraphs at the end of the document it became okay too. You can inspect empty paragraphs and other invisible document elements by pressing button with ¶ character.

If you need to remove empty paragraphs programmatically from all documents then you can add something like this before conversion to PDF:

Document doc = new Document("Test.doc");
while (doc.LastSection.Body.LastParagraph.Range.Text == "\f" )

Aspose.Words 5.2.0:


Please let me know whether this helps. I can send you my conversion results privately if you give me an e-mail.



First of all, let me thank you for the quick reply and support you guys provide. Its really appreciated.

Ive downloaded the 2 last version of aspose.word and aspose.pdf and everything is now perfect for text formmating. Cool !

However, it seem like we have a new glitch with the table border with no fill color. On some PDF it does generate perfectly and on some it does a tinny 1 px black border on the table. I have attached a sample of both word and PDF.

Thank you !


Thank you for your kind words!

This occurs because table borders are defined as solid black line 0.5pt thick. But they are overridden in every sell to nothing. Aspose.Pdf doesn’t support BorderStyle=“None” declaration in Aspose.Pdf XML. It is just ignored, not overriding table level borders.

As a workaround you can try the DLL attached in this post:

This version is preliminary ( but it was uploaded for another customer by Aspose.Pdf for .NET project manager and may be trusted. If you have many documents as you wrote that’s the best case.

Another way is removing table level borders. You can invoke Table Properties -> Borders and Shading, Select None, apply to table.

Please let us know if we can help you further.

P.S. I also noted that the logos on the very top of each page are slightly different in MS Word document. I mean the image with “CO-OP”. This has nothing to do with Aspose components but may be interesting for you.


Once again, thank you for your fast support,

I have tried the work-arround DLL. I tested on our development box (win xp pro) everything went fine and the table borders where perfect.

However when i uploaded dll on our Production box (win server 2003) we have a strange bug where the actual pdf is never being generated, no code errors, server is not on a dead loop, 0% CPU usage on process and regular memory usage… we tested both render to file and buffer. We replaced the dll with the older dll and everything was running fine again. This is a weird bug. Do you have any idea ?

So i still have my table border bug. Option #2 i did invoke table properties-> borders-> selected None and apply to table. The borders were still there. Everywere i go under table properties the border always shows at “None”. However, i did found another property wich is called “Outside border” wich is enabled on alot of the word file.

Is there anyway to loop to find and replace any “Outside border” element in the word document ? If not, when the will be released ?

Btw… this bug started to occur with dll version

Thank you in advance for your support,



This is really strange. Would you provide some additional information on that:

- version of Aspose.Words you are using (I expect 5.2.0),

- document reproducing the issue on Windows Server 2003,

- code snippet you are using for conversion (maybe some options count),

- result in control flow: whether Aspose.Pdf returns control or hangs on that document,

- anything else that can be specific to that environment.

I’ll address this problem to Aspose.Pdf Team.



I am a developer of Aspose Pdf team. I have attached our latest version Aspose.Pdf Both versions in .net framework 1.0 and 2.0 are attached. Please try it. If it still not works, please provide us additional information as Viktor listed above. It is important for us to determine what the error is.

Best regards.

Hi guys,

I tested the DLL hans sent me and had the same bug:

-Yes i use aspose.word 5.2.0

- Its not only one document… its any document.

- Its does not produce any .net code errors, however I did found this under my Event Viewer in Application:

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .NET Runtime version 1.1.4322.2407- Setup Error: Failed to load resources from resource file

Please check your Setup.

Here is the code snippet:

Dim doc As Document = New Document(WordFile)
Dim licenseFile As String = ConfigurationSettings.AppSettings("ServerRoot") & "Bin\Aspose.Total.lic"
If System.IO.File.Exists(licenseFile) Then
Dim license As Aspose.Words.License = New Aspose.Words.License
End If
Dim Key As New PrintSystems.PrintSystems.String.Convert
Dim PvfFile As String = "\pvf\" & Key.DoCle(32) & ".pdf"
builder = New DocumentBuilder(doc)
Dim paragraps As NodeCollection = doc.GetChildNodes(NodeType.Paragraph, True)
Dim par As Paragraph
For Each par In paragraps
If par.Runs.Count <= 0 Then
par.ParagraphBreakFont.Underline = Underline.None
End If
For Each srcSection As Section In doc.Sections
srcSection.PageSetup.PageHeight = 802
srcSection.PageSetup.BottomMargin = 0
' Loop through all block level nodes (paragraphs and tables) in the body of the section.
Next srcSection
'page.TopMargin = 0
'page.PageHeight = 900
If ReplaceAddress = True Then
Dim MyRegex As New System.Text.RegularExpressions.Regex("Fabriqué par" & ControlChar.Cr & ControlChar.Cr)
doc.Range.Replace(MyRegex, New ReplaceEvaluator(AddressOf ReplaceIt), False)
Dim MyRegex2 As New System.Text.RegularExpressions.Regex("Manufactured by" & ControlChar.Cr & ControlChar.Cr)
doc.Range.Replace(MyRegex2, New ReplaceEvaluator(AddressOf ReplaceIt), False)
Dim MyRegex3 As New System.Text.RegularExpressions.Regex("Manufactuerd by" & ControlChar.Cr & ControlChar.Cr)
doc.Range.Replace(MyRegex3, New ReplaceEvaluator(AddressOf ReplaceIt), False)
End If
Dim stream As MemoryStream = New MemoryStream
doc.Save(stream, SaveFormat.AsposePdf)
stream.Seek(0, SeekOrigin.Begin)
Dim xmlDoc As New System.Xml.XmlDocument
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
If System.IO.File.Exists(licenseFile) Then
Dim license As Aspose.pdf.License = New Aspose.pdf.License
End If
pdf.IsImagesInXmlDeleteNeeded = True
Dim pagessetup As New Aspose.Pdf.PageSetup
pagessetup = pdf.PageSetup
pdf.PageSetup.PageHeight = 2000
'pagessetup.PageHeight = 2000
pdf.BindXML(xmlDoc, Nothing)
pdf.IsTruetypeFontMapCached = False
'Dim PagesCount As Integer = pdf.PageCount
Dim MyStream As New System.IO.MemoryStream
Dim MyStream2 As New System.IO.MemoryStream

- Once again, like I said,the dll version was running fine under our development server (win xp pro) and hangs on the windows server 2003. We never had that kind of bug before with other versions.

The production server is Windows 2003 Server Standard Edition in English, Its does have all the lastest patchs and updates. We use asp.net 1.1 update.

Thank you for the support we really need to fix that bug soon ! Thanks again !


Thank you for providing us detailed info. As we don’t have the enviroment you described at present, I searched the error on web and this link may be of help. Please try to find out whether their experience can help you at first. If not, we will try to reproduce the error and investigate more on it.

Best regards.


So as you asked we did alot of research on our end to get more info about the problem …wich is still not fixed.

The problem seems to be IIS related more than Xp VS windows server 2003. On our Win2k3 box, use a private pool for the application that use Aspose products,

-We tripple checked users access, right and registery right,

-We tripple checked .Net Hotfixes and patchs,

-We added the Aspose.PDF into Assembly cache into .Net 1.1

(Current .Net version :NET Runtime version 1.1.4322.2407)

-Yesterday we scheduled a maintenance reboot at night (who knows…)

-We “re-released” our whole solution Assembly as well with All Aspose Product we use (Word,PDF,Barcode).

We also went to the conclusion that its the whole application pool that crashs, (ouch).

Everything we tried did not worked…

When we replace the Newer Aspose DLL with the lastest release everything is working fine again (except for our stroke border problem).

Good luck and Thank you,


Hey guys … new infos for you…

When the application crash, i was able to retreive the exit code…

The process id was ‘xxxx’. The process exit code was ‘0x800703e9’.

Then i did some research on ‘0x800703e9’.

If we take a look at the exit code (0x800703e9) in ErrorLookup that comes with Visual Studio we can see that this means “Recursion too deep; the stack overflowed.”

One last thing also… the "Setup Error: Failed to load resources from resource file

Please check your Setup." could be related to invoke machine debbuger… Wich make sens beacose IT is installed on our Dev Box and NOT on our win2k3 box… Since the version do not seem to be a final release that might be a track to follow…

Thank you,



Thanks for providing the detailed infomation and sorry for replying to you late.

We have investigated it and it is not easy to find the reason without debuging. I have Windows 2003 so can you please provide a runable project that can reproduce this error?

Well, it would be harsh to send you the project because this is part of way bigger project…

However I attached a sample .aspx,aspx.vb, and word file i used to generate the error on server…

Here, the error occur at PDF.Save() function…

BTW i did run the application into debug and found out this new error in event viewer:

w3wp.exe - Common Language Runtime Debugging Services: Application has generated an exception that could not be handled.

Process id=0xb5c (2908), Thread id=0x1244 (4676).

Good luck



We still can’t reproduce this error. From the error message I guess the error is caused by some internal exception. Have you set the application to break at any exception?


Sorry, for bugging you once again but we have to find a solution, my client is getting upset…

No we did not configured the application to break at any exceptions…

BTW, i have a bit of new info there:

This is the event viewer stack i sent you last time :

w3wp.exe - Common Language Runtime Debugging Services: Application has generated an exception that could not be handled.

Process id=0x155c (5468), Thread id=0xfb4 (4020).

Click OK to terminate the application.

Click CANCEL to debug the application…

I did found weird the ‘OK’ ‘CANCEL’ mention as they appear in the event viewer… You have the exact same error on a win32 application… However, right now we are on a asp.net application…

I did isolate my application pool and created a test page:


If Request("save") = True Then

Dim buf() As Byte = pdf.GetBuffer()

End If

if save = true the application will crash, else, i will do all operations but will not getBuffer and crashes…

While I was running this application i runned FileMon wich gave me this at the exact same time the application crashed:

0.00002332 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\system.drawing\1.0.5000.0\_\_b03f5f7f11d50a3a\gdi32.dll NOT FOUND Attributes: Error 
0.00000704 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\system.drawing\1.0.5000.0\_\_b03f5f7f11d50a3a\gdi32.dll NOT FOUND Attributes: Error 
0.00001153 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\aspose.pdf\\_\_716fcc553a201e56\User32.dll NOT FOUND Attributes: Error 
0.00000665 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\aspose.pdf\\_\_716fcc553a201e56\User32.dll NOT FOUND Attributes: Error 
0.00000796 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\aspose.pdf\\_\_716fcc553a201e56\Gdi32.dll NOT FOUND Attributes: Error 
0.00000657 w3wp.exe:5468 QUERY INFORMATION C:\windows\assembly\gac\aspose.pdf\\_\_716fcc553a201e56\Gdi32.dll NOT FOUND Attributes: Error 

It might NOT be this, but it seems like the application is trying to get a hold of gdi32 on a asp.net application and then the application crashes… wich also could explaint the “Could not load Ressources from Ressource files” error…

Anyway… I hope that could help,

Please do not give up on me !


Oh and BTW… for test purpose… i did run the application in asp.net 2.0… as a test… and it gave me this in the event viewer:

Faulting application w3wp.exe, version 6.0.3790.3959, stamp 45d6968e, faulting module kernel32.dll, version 5.2.3790.4062, stamp 46264680, debug? 0, fault address 0x0000bee7.

Last thing… i did open up the .zip you guys sent me and the library was named Aspose.pdf 1.0.dll … just wanted to make sure… Is this version could be only for .net 1.0 ?!?

Thank, you,


Thank you for providing the detailed info.

As for the test page, do you mean the exception is caused by pdf.GetBuffer()? If you don’t call the pdf.GetBuffer() do you get exception?

As for the FileMon log, we really use GDI in Aspose.Pdf. To make it clear, can you please try installing GDI32 into GAC and test it again?

The Aspose.pdf 1.0.dll should be named Aspose.pdf 1.1.dll. It is built with .Net 1.1 but is can also be used in .Net 2.0.

Thanks for your patience and hope we can resolve this problem soon.


I can’t install GDi32.dll into GAC… I get “The module ‘gdi32.dll’ was exptected to contain an assembly manifest.”

Same for user32.dll

Yes the error occur at .getBuffer() or at .save() …

Thank you and good luck.!


Okay, I have attached the FIleMon (error only) log file… you might have some entry wich are not related to our current application (apple) but foremost it is.

Please remove the attachment when downloaded.

Thank you,


Can you please try adding the following code before pdf.Save():