Already registered error

Hello
I already reported a bug when converting from mhtml to Word doc or rtf, that transparent background pngs were rendered with black bg, can’t find my topic but seems related to this:

https://forum.aspose.com/t/emf-image-when-inserted-into-word-document-has-black-background/269138/6

Words is usually released on 7th?
Thanks.

@australian.dev.nerds, Yes, .NET releases are published around this date.

It seems that this is the topic you are looking for:
https://forum.aspose.com/t/words-mht-to-pdf/266776

1 Like

Thanks for confirming, just no idea why its release notes is published publicly prior to itself? :smiley:

https://docs.aspose.com/words/net/aspose-words-for-net-23-8-release-notes/

@australian.dev.nerds, you asked the same question for the previous release :slight_smile:.

Aspose.Words 23.8 will be published soon.

1 Like

oops my bad, sorry didn’t recall it, anyway:
https://docs.aspose.com/words/net/aspose-words-for-net-23-7-release-notes/
Added ability to get digital signature value from digitally signed document as byte array
Related issue: WORDSNET-25420

Kindly advise from which documents can be retrieved? Doc/Docx or Pdf or S/MIME Mhtml etc?

And is it safe? I remember in .net framework it was strongly advised to store certificates in X509Certificate2 and certificate collections in X509Certificate2Collection, also much easier to work with and DISPOSE :slight_smile:

@australian.dev.nerds, WORDSNET-25420 adds the ability to extract digital signatures as a byte array from DOC, OOXML, and ODT documents. Here is the original request.

Please refer to our documentation for more details about digital signatures:

1 Like

oh sorry the request was for Java, OK in .net is there a certificate export option to X509Certificate2 or X509Certificate?
Or the only option is this byte array?

And what about PDF signatures? Can be saved as X509Certificate2 / X509Certificate ?
Best :slight_smile:

@australian.dev.nerds, you can get X509Certificate2 using the CertificateHolder property as shown in the following example:

Document doc = new Document("docWithSign.docx");

foreach (DigitalSignature digitalSignature in doc.DigitalSignatures)
{
    X509Certificate2 cert = digitalSignature.CertificateHolder.Certificate;
    Console.WriteLine(cert.FriendlyName);
}

PDF signatures are not supported yet. DigitalSignatures will contain zero elements for signed PDF files.

1 Like

Thanks for your kind help, got all the answers.

Just curious as I know nothing about those document structures.
If I understood right, Cert Holder is a collection, means that a single document can have multiple signatures?
If so, any reason to choose a collection/array/etc rather than X509Certificate2Collection for the super sensitive certificates?
Any hope for the addition of X509Certificate2Collection if not a replacement?
Best :slight_smile:

@australian.dev.nerds, yes, the document can have multiple signatures. Please refer to our documentation:

Aspose.Words code is ported to Java/C++/Python. The portability is the main reason for CertHolder because X509Certificate2Collection is specific for .NET.

Could you please provide a scenario where X509Certificate2Collection is preferred over CertHolder? I will open a ticket for such a scenario.

1 Like

Hello,
Thanks, X509Certificate2Collection is specific designed holder of X509Certificate2 collections which will simplify certificate related operations.

Anyway, XPS files can contain digital signatures (certificates) too, hopefully there’s some way to save the certificates from XPS files? If not, possible to add a feature request?

And certificate extraction of PDF files, is something already on the feature request list?
Best :slight_smile:

@australian.dev.nerds,
Aspose.Words supports XPS only as an output format. You could probably use XpsDocument.Signature which is a part of .NET Framework.

Aspose.Words has limited support for PDF files, and the certicate extraction is not supported. Aspose.PDF already has some support signature extraction. Could you check whether Aspose.PDF functionality suits your needs?

1 Like

Hello,
Although my choice is Aspose Total (cause it’s cheaper than btoh Email and Words and will have all) but due to the large size of each dll and distribution limitations, kindly note this, specially Aspose PDF dll which is large.

Including Aspose PDF dll only for PDF certificate extraction is not wise, and also not possible for me due to over size limits.

Since it’s already supported in PDF:
Save Certificates - Free Support Forum - aspose.com

If this feature does not need a lot of huge shared code base from PDF assembly, it will be easy to copy some source code from PDF to Words to add this feature to Words?

I will be willing to pay some extra fee for this feature, or if you have a feature survey poll to ask others’ comments?

How do you think? :slight_smile:

@australian.dev.nerds Aspose.Words and Aspose.PDF are completely different products and does not have common code, except licensing code. So there is no easy way to extract part of one product and include it into another one. I am afraid, the PDF certificate extraction is out of Aspose.Words scope and will not be likely to be implemented in Aspose.Words in the foreseeable future.

1 Like

Thanks for confirming this, appreciated :slight_smile:

1 Like