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

Free Support Forum - aspose.com

Issues in creating PDF and Word with Aspose on Docker Container

We are using Aspose for creating PDF and Word document in the .NET solution. Our .NET core solution is built using Visual studio on the Windows machine. There is no issue in downloading PDF or Word from the local machine. However, if the same is deployed in the linux based container, we are getting styling issues such as incorrect font in both PDF and Word downloads and even some of the images are missing when exported to Word. There is no specific error message while creating PDF or Word. However, the below warning message is found in the container whenever the Word download is attempted.
“maximum size for region is 262144 bytes”.
Tried few options already suggested in the forum such as SentFontFolder and also copying the Font folder to the right path. Also tried setting the ImageType as png as suggested in one of the forum. None of the solutions suggested so far has worked.

Request your support to resolve it at the earliest.

@amigosathish

Can you please confirm if libgdiplus package is installed in the system along with msttcorefonts package? Also, please try using 21.5 version of Aspose.PDF for .NET and let us know in case you still notice the issue by sharing sample code snippet and input/output files. We will test the scenario in our environment and address it accordingly.

I already installed libgdiplus and updated to Aspose 21.5 last week. After your suggestion, I installed msttcrefonts and it seems to have solved the alignment issue in PDF(I checked one section, need to verify across all the other sections used) but the word issue still remains. The images of the charts are not getting generated and the fonts and alignment in Word still looks very untidy. I’m working on preparing the sample solution without any business related information as the data is strictly confidential in this project. I shall share the sample code within next 24 hours. Thanks for your support!

@amigosathish

Sure, please take your time to share sample code snippet and input/output files for our reference. We will test the scenario in our environment and address it accordingly.

@asad.ali

Please find the sample code in Git Repo [Git repo for AsposeDockerIssue Project] for your reference. Input data comes from the JSON included in the project. Output files are placed in the folder called Response. Dockerfile is also updated and available in the project. After building and running the docker image in your local docker environment, you can download PDF /Word by calling respective APIs.

  1. To download PDF - http://localhost:8080/Test/GetPdf
  2. To download Word - http://localhost:8080/Test/GetWord

Note1: I have removed license file as the application is hosted in the public repository. I hope this is fine.

Note2: Earlier I indicated that the PDF font issue might have been resolved. However, on verifying thoroughly the font issue still persists in PDF as well. On top of that, in word the chart image is not getting displayed. Please reach out to me for any further inputs. Thanks in advance!

@amigosathish

Thanks for sharing the resource files and sample project. We are testing the scenario by setting up the docker environment and will get back to you in a while.

Sure @asad.ali. Shall wait for your response. Thanks!

@amigosathish

An investigation ticket as PDFNET-50092 has been logged in our issue tracking in order to analyze this case. We will look into its details and let you know as soon as the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Ok Sure. It would be great if you could respond as early as possible as this issue is having an impact on the application delivery timeline and overall project plan.

@amigosathish

We have recorded your concerns and will surely consider them during issue investigation. Please give us some time.

Thanks @asad.ali. Could you let me know the approximate ETA so that we can update the plan accordingly?

@amigosathish

The ticket has just been logged in our issue management system and it will be investigated on first come first serve basis. We are afraid that we are not able to share some ETA at the moment as an initial investigation is pending. However, we will surely let you know as soon as we have some definite updates regarding investigation and resolution of the ticket. Please give us little time.

Hi @asad.ali - Is there any update on this ticket. Please confirm.

@amigosathish

The earlier logged issue is currently under the phase of investigation. As soon as the investigation is completed, we will be able to share some ETA news with you. We will let you know once we have additional updates in this regard. Please give us some time.

We are sorry for the inconvenience.

@asad.ali - This issue is open for more than 3 months. Can you share the outcome of the analysis done so far in this issue. As we are going live in less than a month, it is critical to close this issue ASAP.

@amigosathish

We are afraid that no updates are available about the resolution ETA of the issue. Please note that the issue is quite complex in nature and requires a significant amount of time to get fully resolved. Libgdiplus incorrectly calculates rectangle coordinates when multiplying transformation matrices, so images do not fit within their clip bounds. Expanding clip bounds allows you to correctly display the image for the source file. It is necessary to check the correctness of this solution for all test cases.

In case the issue is quite critical for you, you can raise its priority to the highest by creating a ticket in the priority support forum so that it can be resolved on an urgent basis. Furthermore, we will surely let you know as soon as we have definite updates about its resolution. Your patience is highly appreciated in this regard.

We apologize for the inconvenience.