Convert DOCX to PDF using C# .NET & Set Z-Order Display Order of Overlapping Shapes | Make Shape & DrawingML Objects Visible in PDF XPS

Hi to all

it would appear that this fix works on my development machine but not when deployed I publish my application to the server. I have checked that the default printer on the server is the same as on my dev workstation. The version of Words.Net that I have installed in both environments is the same 14.1.0.0 as well as Aspose.Pdf for .Net 8.9.0.0.

Does anyone have any thoughts on what else would cause this to still occur/fail?

Attached is a .docx and a .pdf resulting from the same source docx. It is on the bottom left of the second page where the fault is most obvious where the text goes behind the bottom blue border.

See also Position of Text Box in pdf is different than in Word document


Regards

Ralph Price

Hi Ralph,

Thanks for your inquiry. After an initial test on 64-bit Windows 7 machine, I was unable to reproduce this issue on my side. Please share the specifications (e.g. OS, .NET Framework versions) of the development and server machines.

When you render documents to fixed-page formats e.g. PDF, Aspose.Words requires TrueType fonts to be installed on your server machine. Please see the following workarounds:

  • Please ensure, if the desired fonts are installed on your server machine?
  • Instead of default location, if your font is located in some other directory, then you have to specify the location of the directory that contains the fonts. Please see the following articles:
  1. Specifying TrueType Fonts Location
  2. Using TrueType Fonts

I hope, this will help,

Best regards,

Hi Awais

the file samples for this can be found at my other post that I had thought had failed to get posted here: Font size changes between dev and live environments
While you have a look at that post I will have a read of your links and get the specifications that you need.
I will also check to see that the appropriate user has access to the fonts.
Regards
Ralph Price

Hi Awais

This problem is now resolved. I went for the option of keeping the default font location and adding another custom location as per the second of your links.

Unfortunately now that I have tested with another docx I am finding that the (layer) ordering of items in the document is getting confused.
Please see the attached source docx and pdf for clarification.
The title words and picture on the first page are ending up rendering on the page first and then the ‘background’ layer is then covering it up.
This issue was not apparent in the previous sample documents but I am not aware of in what manner they have been created differently

If we can get this problem resolved promptly it would be most appreciated so as to avoid manual pdf creation for our website rather than dynamic generation from source (up to date) documents.

Regards

Ralph Price
Application Developer

Hi Ralph,


Thanks for reporting this problem to us. While using the latest version of Aspose.Words i.e. 14.1.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-9723. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Thanks for the confirmation of the reproducibility of the problem.
Hopefully a fix will not be too hard

Regards

Ralph Price

Hi Ralph,


Sure, we will keep you informed of the status of this issue and let you know once it is resolved.

Best regards,

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


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

Thanks very much Awais

I can now confirm that it working as expected on my development machine. I have installed on the LIVE server and deployed my updated .aspx but the PDF document is still getting generated using 14.1.0 dll.
I assume that this is due to the 14.1.0 dll still being in the GAC/ memory etc will resolve itself once I get a chance to refresh the IIS service or even restart the server.

Regards

Ralph Price aka GIS_Analyst

Hi Ralph,

Thanks for your inquiry. Please first remove Aspose.Words (14.1.0) completely from your development machine. Then remove the reference to this old Aspose.Words.dll from your project using Visual Studio. Also, delete associated files from your project’s bin folder if present. Then install Aspose.Words (14.2.0) via msi installer. Add reference to this new DLL in your project using Visual Studio and re-build it. Finally, re-publish your web application and copy the newly published website to your server. Please let us know how does it go on your side? I hope, this helps.

Best regards,