Aspose.Pdf and Medium trust

Hello,

We have a customer who is interested in Aspose/Pdf but he needs to know if it will run in a partial trust. We have the compatibility item “100% Managed code” that we usually use when answering these types of questions – i.e. if a component is 100% managed, it will generally run in partial trust. However, Aspose.Pdf does not have this item “ticked” on our compatibility page.

Thanks,

Chris Brooke

ComponentSource Support

Hi,

Thanks for using our products.

I am afraid you might not be able to use Aspose.Pdf for .NET in partial trust environment. At the moment, it can only be used in Full trust. For the sake of correction, I have logged it as PDFNET-17725 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction.

We apologize for your inconvenience.

Any update on this?

Hello Chris,

Thanks for your patience.

I have discussed this matter with development team and as per our initial estimate, we plan to get this issue resolved by first quarter of 2011. Once we have some updates regarding its resolution, we would be pleased to update you with the status of correction. We apologize for the delay and inconvenience.

My company would also like to use your .Net PDF solution in one of our security critical application. We have tested and also found you cannot run it if you set the trust to Medium (anything lower than full fails). Per our testing, it appears the issue is because the PDF component uses the Windows\Temp directory for temp storage during document creation (I have seen this issue with other .Net PDF solutions in the past).

If rather than using the built in Windows API for creating a file that uses the System Temp dir, you can have a optional param set in the Web.Config that says where to temp the file within the website so it is Medium Trust compliant.

The logic would be something like: if (Web.Config Param){ Use Specified Location }else{Use System Temp Dir}.

This is what I did when using iText an open source C# PDF Component (nowhere near as nice as your component) . I changed the code as noted above and it worked great (Medium Trust Baby!).

Just some insight I thought I would share with you.

Best Regards,
Robert J Collins
Founder & President,
Netlogic Corporation

Hello Robert,

Thanks for sharing the information.

As this feature/requirement is getting critical for you, we have decided to implement this feature in our upcoming release. Please be patient and as soon as the new release becomes available, we would be pleased to update you with the status of correction.

Thanks for your cooperation and comprehension. We are sorry for the delay and inconvenience.

Can you reply to this post and let us know when it is released (maybe even add a direct link)?


Best Regards,

Robert J Collins

Hello Robert,

Once the HotFix becomes available, we would be pleased to update you with the status of availability within this forum thread and you will be automatically notified through an email. In case you have any further query, please feel free to contact.

Are there any updates on this release/hotfix?


Hello Robert,

Thanks for your patience.

I am afraid the issue is still not resolved and our development team is working hard to get it fixed. As per our current estimates, we plan to get it resolved by the month of April but still it's not a promise. As soon as the solution becomes available, we would be pleased to update you with the status of correction. We are really sorry for the delay and inconvenience.

Your patience and comprehension is greatly appreciated in this regard.

Any updates on this??? I would really love to roll this with out next release.


Thanks,

Robert J Collins

Hello Robert,

Thanks for your patience.

I am afraid the issue is not yet resolved and the development team is trying their level best to fix it ASAP. As shared earlier, the expected dates for the resolution of this problem are April-2011 but if we are able to fix it before the said time, we would be more than happy to share the hotfix with you. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated. We are sorry for this delay and inconvenience.

This is no small task, so I am skeptical that this will be resolved in a timely fashion. The component relies on the MSIE (internet explorer) rendering subsystem in the OS, which requires full trust in order to operate. Obviously this is a major undertaking that requires architectural changes and major rendering component changes and not a simple bugfix. To date, I have not found another quality HTML2PDF converter that works in medium trust. [1]

Other vendors have swapped out the MSIE subsystem but for some reason it still does not work in anything other than full trust.

Good luck to the ASPose team! Please update when resolved or at least confirm you are actually working to enabling the operation of this component in Medium Trust. We understand it’s a big deal – please let us know if you believe it is even technically feasible.

[1] http://stackoverflow.com/questions/4055838/best-commercial-html-to-pdf-c-component

I can hand you full source code of a HTML 2 PDF component written in C# and works 100% with Medium Trust. It is a very slightly modified version of the Open Source Solution called iTextSharp. It is a decent HTML 2 PDF tool, but I want and am willing to pay for a better one (like Aspose.PDF). When I first downloaded the source code for iTextSharp it would not work in Medium trust, but the fix was Very Easy. You cannot just call the Windows API for creating a temp file as it builds it in the Temp dir (C:\temp etc) with then require medium trust to access, thus you have to write a Small amount of code to create a temp dir within the web root and then create the temp file and once it is done, you copy the finished file to its destination and then have it delete the temp. Very simple fix… Cool thing is that you can have it look for a Web.Config app setting for the temp and/or the final file save points, or you can pass them as a param, and if it is there/you pass the path it uses that path for the temp file and if not specified you use a dynamically created temp with a GUID for the name so there is no conflicts. I have taken the time to Zip and Attach the code to this post so you can see it in action.

Hello Mark,

Thanks for your interest in our products.

Our development team is working hard to get this issue resolved. In fact we have been able to figure out the reasons why our product is not compatible with Medium trust environment. As soon as the solution becomes available, we would be pleased to update you with the status of correction. We apologize for your inconvenience.

Hello Robert,

Thanks for sharing the information.

We would definitely consider this information during the resolution of this problem.

Hey guys,

This is my quarterly ping to see if you have successfully updated the ASPose.PDF component to convert HTML to PDF in a Partial Trust / Medium Trust environment.

Any progress to report? I’ve got my credit card out ready to buy!

Thanks in advance!

You have the code to do it as a gift from me, when is it going to me live at Medium Trust!!!

Hi,

I am afraid that Aspose.Pdf for 6.1.0 is causing some issues when used in Medium trust environment. The issues have been logged in our issue tracing system ad PDFNEWNET-29993. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Hello all,

You mentioned that this was on the roadmap for Q4 2011 (after shooting for Q1 2011, Q2 2011, etc.). Is there any progress towards having your PDF component run in a partial trust environment?