Generate PDF issue in Aspose.PDF for Java

Hello ,

I need your help please for this bug that we found in our project java to generate PDF document :

A placeholder is set to CAPITALS by itself, even though the variable has changed to lowercase and in the template there is no style applied to the placeholder.

Could you help please !
Don’t hesitate if you need more informations about the issue !

Thanks!

@MDAKNOU

Would you please explain a bit more by sharing your sample file and the code snippet that you are using? We will test the scenario in our environment and address it accordingly.

Hello Ali ,

Thanks for your reply .
Will share with you some of codes that we uses to generate our pdf :
1st step :we get the template id ,then we pass it + fields inside the payload of the endpoint generate ({{url}}/documents/generate) , you can fin below the payload we use :

{
    "templateId": "{{templateId}}",
    "fields": [
        {
          "fieldName": "DOC_TITLE",
          "fieldValue": "TEST"
        },
        {
          "fieldName": "LABEL_CONFIDENTIAL",
          "fieldValue": "TEST"
        } 
]
}

@MDAKNOU

Please confirm you are using Aspose.PDF for Java or Aspose.PDF Cloud SDK for Java in your project and also share your sample code to reproduce the issue for investigation.

Hello ,
We use Aspose.PDF for Java

@MDAKNOU

In that case, would you kindly provide the backend code snippet that you are using to probably replace the text? Your initially shared code snippet looks like some request body. Please share enough information that we can use to replicate the issue. Also, please provide sample document as well.

Hello ,

The main code in our controller is that :

@Post
@Produces("application/pdf")
@Consumes(MediaType.APPLICATION_JSON)
public HttpResponse<byte[]> generateDocument(HttpHeaders headers, @Valid @Body TemplateDataSourceDto input) throws Exception {
    final var templateId = input.getTemplateId();
    LOGGER.info("Generate document using templateId {}", templateId);
    MDC.put(TEMPLATE_ID_LOG_KEY, templateId);
    MDC.put(ACTION_LOG_KEY, "generate_document");
    Template template = templateService.getTemplateById(input.getTemplateId());
    checkAuthorization(template, headers);
    final Document doc = templateService.loadTemplate(input);
    templateService.fillPlaceholders(input, doc);
    final byte[] pdf = templateService.generatePdfBytes(doc);
    LOGGER.info("Mail merge performed successfully for templateId {}", templateId);
    MDC.clear();
    return HttpResponse.ok(pdf);
}

1st step: we get our template id that we pass in our request body
Second step : we load the template
Third step : we fill placeholders

The step of Fill Placeholders:

public Document fillPlaceholders(TemplateDataSourceDto dataSource, Document template)
{
    LOGGER.info("Fill placeholders");
    // register listener for warning events generated by aspose document processor
    template.setWarningCallback(new HandleDocumentWarnings());

    // remove placeholders name when the field is unused
    template.getMailMerge().setCleanupOptions(REMOVE_UNUSED_REGIONS | REMOVE_UNUSED_FIELDS | REMOVE_EMPTY_PARAGRAPHS);
    // merge specific fields like booleans or html
    template.getMailMerge().setFieldMergingCallback(new HandleMergeField());
    // use mustache syntax
    template.getMailMerge().setUseNonMergeFields(true);
    ArrayList<String> fieldNames = new ArrayList<>();
    ArrayList<Object> fieldValues = new ArrayList<>();

    dataSource.getFields().forEach(e-> {
        fieldNames.add(e.getFieldName());
        Object computedValue = FieldsValueComputeStrategy.compute(e.getTypeCode(), e.getFieldValue());
        fieldValues.add(computedValue);
    });

template.getMailMerge().execute(fieldNames.toArray(new String[0]), fieldValues.toArray());
fillTables(dataSource, template);
return template;

@MDAKNOU

Looks like you are using MailMerge feature of Aspose.Words. Are you editing a Word template and generating output as PDF? Also, in your code snippet, we could not find any Aspose API related code. Please provide the original code where you are using Aspose API to generate the output along with the sample source template file. We will further proceed to assist you accordingly.

Hello,

Yes we are editing a word template with our fieldNames and fieldValues passed in the request body of our endpoint generate and the result (the output ) is a PDF.

Here we load our template :

public Document loadTemplate(TemplateDataSourceDto dataSource) throws Exception {
    Validate.notNull(dataSource, "Template datasource cannot be null");
    try {
        LOGGER.info("Load template from Template Manager");
        byte[] template = templateManagerClient.getTemplateFile(dataSource.getTemplateId());
        return createAsposeDocument(template);
    } catch (Exception ex) {
        LOGGER.error("Unable to Load template from Template Manager", ex);
        throw ex;
    }
}

And this is the part of creation Aspose Document:

public Document createAsposeDocument(byte[] data) throws Exception {
    try {
        LOGGER.info("building Aspose Document");
        ByteArrayInputStream templateAsStream = new ByteArrayInputStream(data);
        Document document = new Document(templateAsStream);
        templateAsStream.close();
        LOGGER.info("Successfully building Aspose Document");
        return document;
    } catch (Exception ex) {
        LOGGER.error("Failed to build Aspose Document", ex);
        throw ex;
    }
}

@MDAKNOU Could you please attach your template, output and expected output documents here for our reference? We will check the issue and provide you more information.

Template_1_V8_adresse_droite_DRAFT (1).docx (114,5 Ko)

The payload of the request :

[
        {
          "fieldName": "DOC_TITLE",
          "fieldValue": "LIMIITIN MUUTOS"
        },
        {
          "fieldName": "LABEL_CONFIDENTIAL",
          "fieldValue": "LUOTTAMUKSELLINEN"
        },
        {
          "fieldName": "CONTACT_COPY",
          "fieldValue": "Kopio valtuutetulle"
        },
        {
          "fieldName": "LABEL_INSURED_REF_COPY",
          "fieldValue": "Vakuutuksenottajan viite"
        },
        {
          "fieldName": "INSURED_REF_COPY",
          "fieldValue": "Neste Markkinointi Oy"
        },
        {
          "fieldName": "LABEL_BUYER",
          "fieldValue": "VAKUUTETTU OSTAJA "
        },
        {
          "fieldName": "BUYER_COMPANY",
          "fieldValue": "Terrafame Oy"
        },
        {
          "fieldName": "LABEL_EHBUYER_NB",
          "fieldValue": "Euler Hermes ID: "
        },
        {
          "fieldName": "EHBUYER_NB",
          "fieldValue": "0111011757"
        },
        {
          "fieldName": "LABEL_LEGAL_FORM",
          "fieldValue": "Yhtiömuoto: "
        },
        {
          "fieldName": "BUYER_LEGAL_FORM",
          "fieldValue": "Osakeyhtiö"
        },
        {
          "fieldName": "BUYER_IDENTIFIER_TYPE",
          "fieldValue": "VAT number Finland"
        },
        {
          "fieldName": "BUYER_NATIONAL_ID",
          "fieldValue": "26950135"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE1",
          "fieldValue": "Malmitie 66"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE2",
          "fieldValue": "88120     TUHKAKYLÄ"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE3",
          "fieldValue": ""
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE4",
          "fieldValue": "Suomi"
        },
        {
          "fieldName": "RECIPIENT_COMPANY",
          "fieldValue": "Neste Markkinointi Oy"
        },
        {
          "fieldName": "RECIPIENT_NAME",
          "fieldValue": "Luotonvalvonta ."
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE1",
          "fieldValue": "Box 95"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE2",
          "fieldValue": "00095 NESTE"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE3",
          "fieldValue": "Suomi"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE4",
          "fieldValue": ""
        },
        {
          "fieldName": "CURRENT_DATE",
          "fieldValue": "07 joulukuu 2023"
        },
        {
          "fieldName": "LABEL_REQUEST_TYPE",
          "fieldValue": "Hakemuksen tiedot "
        },
        {
          "fieldName": "REQUEST_TYPE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_REQUEST_DATE",
          "fieldValue": "Hakemuspäivä: "
        },
        {
          "fieldName": "REQUEST_DATE",
          "fieldValue": "07 joulukuu 2023"
        },
        {
          "fieldName": "LABEL_REQUEST_NUMBER",
          "fieldValue": "Hakemuksen numero: "
        },
        {
          "fieldName": "REQUEST_NUMBER",
          "fieldValue": "0000000000"
        },
        {
          "fieldName": "LABEL_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_REQUEST_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_REQUEST_SOURCE",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_SOURCE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_TYPE",
          "fieldValue": "Päätös: "
        },
        {
          "fieldName": "DECISION_TYPE",
          "fieldValue": "Limiitin vahvistus"
        },
        {
          "fieldName": "LABEL_DECISION_DATE",
          "fieldValue": "Päätös päivä: "
        },
        {
          "fieldName": "DECISION_DATE",
          "fieldValue": "07 joulukuu 2023"
        },
        {
          "fieldName": "DECISION_TIME",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_AMOUNT",
          "fieldValue": "Summa: "
        },
        {
          "fieldName": "DECISION_CURRENCY",
          "fieldValue": "EUR"
        },
        {
          "fieldName": "DECISION_AMOUNT",
          "fieldValue": "2 900 000"
        },
        {
          "fieldName": "LABEL_DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_ADD_TEXT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_DECISION_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SPECCOND",
          "fieldValue": "Erityisehtoihin viitaten"
        },
        {
          "fieldName": "DISCLAIMER_1",
          "fieldValue": "Tämä päätös on voimassa alla mainitun vakuutussopimuksen yleisten vakuutusehojen mukaisesti."
        },
        {
          "fieldName": "DECISION_INTRO",
          "fieldValue": "Arvoisa vakuutuksenottaja "
        },
        {
          "fieldName": "DECISION_DETAILS1",
          "fieldValue": "Vastauksemme on päätösotsikon alla:\nViimeisin käytössämme oleva tilinpäätös sisältää tilintarkastajan huomautuksen."
        },
        {
          "fieldName": "DECISION_DETAILS2",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS3",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS4",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_SPECCOND",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SC_DETAILS21",
          "fieldValue": "Erityisehdot\nAikaisemmin myönnetty limiitti :EUR 3 000 000\nLimiitin voimassaolon edellytyksenä on EHID Terrafame omavelkainen takaus.\nTämä päätös korvaa kaikki aiemmat tätä ostajaa koskevat päätökset."
        },
        {
          "fieldName": "DECISION_SC_DETAILS22",
          "fieldValue": "valid as long as  GH Suomen Malmijalostus Oy EHID 110004005 is majority owned by the Finnish state, THIS IS A TEST IDS again"
        },
        {
          "fieldName": "DECISION_SC_DETAILS23",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SC_DETAILS24",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_FYI",
          "fieldValue": "Tiedoksenne"
        },
        {
          "fieldName": "DECISION_FYI_DETAILS31",
          "fieldValue": "Ostajan toiminta on tappiollista viimeisimpien käytössämme olevien tilinpäätöstietojen mukaan."
        },
        {
          "fieldName": "DECISION_FYI_DETAILS32",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS33",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS34",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_DETAILS4",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS41",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS42",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_CONCLUSION",
          "fieldValue": "Ystävällisin terveisin"
        },
        {
          "fieldName": "COMMERCIAL_MESSAGE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_NAME",
          "fieldValue": "Yhteyshenkilö: "
        },
        {
          "fieldName": "PREFERRED_CONTACT_NAME",
          "fieldValue": "Saana Petro-Kouhia"
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_TEL",
          "fieldValue": ""
        },
        {
          "fieldName": "PREFERRED_CONTACT_TEL",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_EMAIL",
          "fieldValue": "Sähköposti: "
        },
        {
          "fieldName": "PREFERRED_CONTACT_EMAIL",
          "fieldValue": "saana.petro-kouhia@allianz-trade.com"
        },
        {
          "fieldName": "First_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "First_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "First_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_POLICY",
          "fieldValue": "Vakuutusnumero:  "
        },
        {
          "fieldName": "POLICY_NAME",
          "fieldValue": "Neste Markkinointi Oy"
        },
        {
          "fieldName": "POLICY_NUMBER",
          "fieldValue": "028763"
        },
        {
          "fieldName": "POLICY_EXTENSION",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_CUSTOMERREF",
          "fieldValue": "Viitteenne: "
        },
        {
          "fieldName": "CUSTOMER_REFERENCE",
          "fieldValue": "02472696"
        },
        {
          "fieldName": "LABEL_BROKER",
          "fieldValue": ""
        },
        {
          "fieldName": "BROKER_REF",
          "fieldValue": ""
        },
        {
          "fieldName": "BROKER_NAME",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_ENDORSEMENT_NUMBER",
          "fieldValue": "Muutosilmoitus No. "
        },
        {
          "fieldName": "ENDORSEMENT_NUMBER",
          "fieldValue": "00000423"
        },
        {
          "fieldName": "AGENCY_ADDRESS_1",
          "fieldValue": ""
        },
        {
          "fieldName": "AGENCY_ADDRESS_2",
          "fieldValue": "Euler Hermes SA,\nSuomen sivuliike\nKonepajankuja 1\nFI-00510 Helsinki"
        },
        {
          "fieldName": "AGENCY_ADDRESS_3",
          "fieldValue": "Puhelin + 358 (0) 10 850 8500\ncontact.fi@allianz-trade.com\nwww.allianz-trade.fi\nY-tunnus 2432466-7"
        },
        {
          "fieldName": "AGENCY_ADDRESS_4",
          "fieldValue": "Euler Hermes SA\nAvenue des Arts 56\nBE-1000 Bryssel\nVAT: BE 0403.248.596 RPM Bryssel\nVakuutusyhtiö, rekisteröity koodilla 418"
        },
        {
          "fieldName": "AGENCY_ADDRESS_5",
          "fieldValue": ""
        }
      ]

The issue is with the field field “BUYER_ADDRESS_LINE_2” , pass to uppercase without reason .

@MDAKNOU First of all data in your data source is all caps:

"fieldName": "BUYER_ADDRESS_LINE2",
"fieldValue": "88120     TUHKAKYLÄ"

Also in your template field is formatted with All Caps:

Ah my bad , i sent you the wrong payload , this is the right one :

Daknou Marwa
14 h 51

"fields": [
        {
          "fieldName": "DOC_TITLE",
          "fieldValue": "Förändring av kreditlimit"
        },
        {
          "fieldName": "LABEL_CONFIDENTIAL",
          "fieldValue": "CONFIDENTIAL"
        },
        {
          "fieldName": "CONTACT_COPY",
          "fieldValue": "Kopia försäkringstagare"
        },
        {
          "fieldName": "LABEL_INSURED_REF_COPY",
          "fieldValue": "Referens"
        },
        {
          "fieldName": "INSURED_REF_COPY",
          "fieldValue": "Nibe AB"
        },
        {
          "fieldName": "LABEL_BUYER",
          "fieldValue": "Försäkrad kund"
        },
        {
          "fieldName": "BUYER_COMPANY",
          "fieldValue": "Credentia AB"
        },
        {
          "fieldName": "LABEL_EHBUYER_NB",
          "fieldValue": "Euler Hermes ID:"
        },
        {
          "fieldName": "EHBUYER_NB",
          "fieldValue": "0040753285"
        },
        {
          "fieldName": "LABEL_LEGAL_FORM",
          "fieldValue": "Bolagsform:"
        },
        {
          "fieldName": "BUYER_LEGAL_FORM",
          "fieldValue": "Aktiebolag"
        },
        {
          "fieldName": "BUYER_IDENTIFIER_TYPE",
          "fieldValue": "Organisationsnummer"
        },
        {
          "fieldName": "BUYER_NATIONAL_ID",
          "fieldValue": "5560252891"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE1",
          "fieldValue": "Box 395"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE2",
          "fieldValue": "76124     Norrtälje"
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE3",
          "fieldValue": ""
        },
        {
          "fieldName": "BUYER_ADDRESS_LINE4",
          "fieldValue": "Sverige"
        },
        {
          "fieldName": "RECIPIENT_COMPANY",
          "fieldValue": "Nibe AB"
        },
        {
          "fieldName": "RECIPIENT_NAME",
          "fieldValue": "Tina Bernsheim ."
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE1",
          "fieldValue": "Box 14"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE2",
          "fieldValue": "28521 Markaryd"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE3",
          "fieldValue": "Sverige"
        },
        {
          "fieldName": "RECIPIENT_ADDRESS_LINE4",
          "fieldValue": ""
        },
        {
          "fieldName": "CURRENT_DATE",
          "fieldValue": "07 december 2023"
        },
        {
          "fieldName": "LABEL_REQUEST_TYPE",
          "fieldValue": "Typ av ansökan:"
        },
        {
          "fieldName": "REQUEST_TYPE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_REQUEST_DATE",
          "fieldValue": "Ansökan mottagen:"
        },
        {
          "fieldName": "REQUEST_DATE",
          "fieldValue": "07 december 2023"
        },
        {
          "fieldName": "LABEL_REQUEST_NUMBER",
          "fieldValue": "Kreditansökan nummer:"
        },
        {
          "fieldName": "REQUEST_NUMBER",
          "fieldValue": "0000000000"
        },
        {
          "fieldName": "LABEL_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_REQUEST_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_REQUEST_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_REQUEST_SOURCE",
          "fieldValue": ""
        },
        {
          "fieldName": "REQUEST_SOURCE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_TYPE",
          "fieldValue": "Beslut:"
        },
        {
          "fieldName": "DECISION_TYPE",
          "fieldValue": "Kreditlimit beviljad"
        },
        {
          "fieldName": "LABEL_DECISION_DATE",
          "fieldValue": "Beslutsdatum:"
        },
        {
          "fieldName": "DECISION_DATE",
          "fieldValue": "07 december 2023"
        },
        {
          "fieldName": "DECISION_TIME",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_AMOUNT",
          "fieldValue": "Ansökt belopp:"
        },
        {
          "fieldName": "DECISION_CURRENCY",
          "fieldValue": "SEK"
        },
        {
          "fieldName": "DECISION_AMOUNT",
          "fieldValue": "1 500 000"
        },
        {
          "fieldName": "LABEL_DECISION_EXPIRY_DATE",
          "fieldValue": "Beslutet gäller t o m:"
        },
        {
          "fieldName": "DECISION_EXPIRY_DATE",
          "fieldValue": "31 december 2023"
        },
        {
          "fieldName": "DECISION_ADD_TEXT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_DECISION_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_CURRENCY",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_AMOUNT",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_TEMPORARY_DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "TEMPORARY_DECISION_EXPIRY_DATE",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SPECCOND",
          "fieldValue": "Vänligen notera även \"Särskilda villkor\""
        },
        {
          "fieldName": "DISCLAIMER_1",
          "fieldValue": "Detta beslut gäller i enlighet med försäkringsavtalets allmänna och särskilda villkor med undantag av vad som framgår av beslutet."
        },
        {
          "fieldName": "DECISION_INTRO",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS1",
          "fieldValue": "Vänligen notera vårt beslut i beslutsfältet.\nVi har baserat detta beslut på bolagets senast tillgängliga bokslut."
        },
        {
          "fieldName": "DECISION_DETAILS2",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS3",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS4",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_SPECCOND",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SC_DETAILS21",
          "fieldValue": "För kännedom\nTidigare beviljad kreditlimit: SEK 1 500 000\nDetta beslut ersätter alla tidigare beslut pÃ¥ ovanstÃ¥ende företag."
        },
        {
          "fieldName": "DECISION_SC_DETAILS22",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SC_DETAILS23",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_SC_DETAILS24",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_FYI",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS31",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS32",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS33",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_FYI_DETAILS34",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_DECISION_DETAILS4",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS41",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_DETAILS42",
          "fieldValue": ""
        },
        {
          "fieldName": "DECISION_CONCLUSION",
          "fieldValue": "Med vänlig hälsning"
        },
        {
          "fieldName": "COMMERCIAL_MESSAGE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_NAME",
          "fieldValue": "Er kontakt:"
        },
        {
          "fieldName": "PREFERRED_CONTACT_NAME",
          "fieldValue": "Robert Thorselius"
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_TEL",
          "fieldValue": "Telefonnummer:"
        },
        {
          "fieldName": "PREFERRED_CONTACT_TEL",
          "fieldValue": "+46 8 555 136 43"
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_FAX",
          "fieldValue": ""
        },
        {
          "fieldName": "PREFERRED_CONTACT_FAX",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_PREFERRED_CONTACT_EMAIL",
          "fieldValue": ""
        },
        {
          "fieldName": "PREFERRED_CONTACT_EMAIL",
          "fieldValue": ""
        },
        {
          "fieldName": "First_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "First_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "First_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "Second_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signatory_Name",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signature",
          "fieldValue": ""
        },
        {
          "fieldName": "third_Signatory_Function",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_POLICY",
          "fieldValue": "Ert försäkringsavtal:"
        },
        {
          "fieldName": "POLICY_NAME",
          "fieldValue": "Nibe AB"
        },
        {
          "fieldName": "POLICY_NUMBER",
          "fieldValue": "026112"
        },
        {
          "fieldName": "POLICY_EXTENSION",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_CUSTOMERREF",
          "fieldValue": ""
        },
        {
          "fieldName": "CUSTOMER_REFERENCE",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_BROKER",
          "fieldValue": ""
        },
        {
          "fieldName": "BROKER_REF",
          "fieldValue": ""
        },
        {
          "fieldName": "BROKER_NAME",
          "fieldValue": ""
        },
        {
          "fieldName": "LABEL_ENDORSEMENT_NUMBER",
          "fieldValue": "Kreditmeddelande nummer:"
        },
        {
          "fieldName": "ENDORSEMENT_NUMBER",
          "fieldValue": "00001710"
        },
        {
          "fieldName": "AGENCY_ADDRESS_1",
          "fieldValue": ""
        },
        {
          "fieldName": "AGENCY_ADDRESS_2",
          "fieldValue": "Euler Hermes Sverige filial\nBox 729\nSE-101 34 Stockholm\nBesöksadress:\nSveavägen 98"
        },
        {
          "fieldName": "AGENCY_ADDRESS_3",
          "fieldValue": "Tel.: +46 8 555 136 00\ncontact.se@allianz-trade.com\nwww.allianz-trade.se\nBNP Paribas: 9470-0024250\nBankgiro: 5974-5463\nOrg. nr.: 516407-6233"
        },
        {
          "fieldName": "AGENCY_ADDRESS_4",
          "fieldValue": "Registrerat i Bolagsverkets filialregister\nReg. nr.: 516407-6233\nEuler Hermes SA\nAvenue des Arts 56\nBE-1000 Bryssel\nCompany number: 0403.248.596 RPM Bryssel\nFörsäkringsbolag registrerat enligt kod 418"
        },
        {
          "fieldName": "AGENCY_ADDRESS_5",
          "fieldValue": ""
        }
      ]
    },

@MDAKNOU In your template field BUYER_ADDRESS_LINE2 is formatted with All Caps as I have mentioned in my previous answer. So the value inserted into the merge field is also formatted as All Caps. So to get the expected output you should reset this flag.

Ohhh yeah got it!

Thanks a lot i see your point of view :slight_smile:

1 Like