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

Free Support Forum - aspose.com

Unable to remove metadata from PDF file

The attached file has “incorrect” metadata, in that it has a pdfaid:part entry, sort of claiming that it’s a PDF/A, but there is not a pdfaid:conformance entry, which I believe is invalid (I’m not sure of the details on that, but our clients usually need either PDF/A 1a or PDF/A 1b compliance, so it isn’t satisfactory either way. This is unimportant to the problem I’m seeing, anyway.) When trying to use Aspose to clean up the metadata, it fails to save if we remove the pdfaid:part entry - the following code will throw a null ref exception on the Save:



Dim Document = New Aspose.Pdf.Document(FileName)

If Document.Metadata.Contains(“pdfaid:part”) Then Document.Metadata.Remove(“pdfaid:part”)

Document.Save(DestName)



Any of the other pieces of metadata may be removed without causing any problems; it’s just the pdfaid:part entry that caused the failure on save. Is there anything I can do to make this work better?



Thanks,

Michael Whalen

Hi Michael,


Thanks
for using our API’s.<o:p></o:p>

I
have tested the scenario and I am able to notice the same problem. However when trying to get the MetaData information, I am getting false so the problem might be occurring due to fact that Aspose.Pdf for .NET is not able to read the MetaData. For the sake
of correction, I have logged this problem as PDFNEWNET-36971 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. Please be
patient and spare us little time. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNEWNET-36971) have been fixed in Aspose.Pdf for .NET 9.3.0.

Blog post for this release can be viewed over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.