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

Free Support Forum - aspose.com

Adding metadata don't works


I must add meta data for factur-X pdf.

  • My meta data fx are NOT added only the fx xmlns is added
  • It seem that I must add the schema too I have it in Xml, how to insert it ?

Thanks a lot for your help

here is my code
Aspose.Pdf.Document doc = new (inFile);
FileSpecification fileSpecification = new(xmlFile, “factur-x.xml”);
fileSpecification.Description = “Factur-X invoice in XML format”;
fileSpecification.Name = “factur-x.xml”;
fileSpecification.MIMEType = “text/xml”;

    doc.Info.Keywords = "Invoice, Factur-X";

    doc.Metadata.RegisterNamespaceUri("fx", "urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#","Factur-X schema");
    doc.Metadata["fx:DocumentType"] = "INVOICE";
    doc.Metadata["fx:DocumentFileName"] = "factur-x.xml";
    doc.Metadata["fx:Version"] = "1.0";
    doc.Metadata["fx:ConformanceLevel"] = "BASIC";

    doc.Convert("D:\\PRO\\FactX\\log.txt", Aspose.Pdf.PdfFormat.PDF_A_3B, ConvertErrorAction.Delete);


Could you please ZIP and attach you input files along with problematic and expected output documents? We will investigate the issue and provide you more information on it.