carbone icon indicating copy to clipboard operation
carbone copied to clipboard

[Bug Report]: Carbone somehow removes formatting on the following conditional

Open handhikadj opened this issue 4 years ago • 3 comments

Environment Carbone Version: using carbone-sdk Node Version: v14.17.3 Browsers: - Desktop OS: Mac M1

Expected Behaviour the formatting is preserved

Actual Behaviour the formatting is removed

Steps to reproduce Steps to reproduce the bug:

  1. create a docx file with styled fonts with this text: {d.filingType:ifEQ(E-FILE):showBegin}ELECTRONIC FILE (E-FILE){d.filingType:showEnd}{d.filingType:ifNE(E-FILE):showBegin}COPIES{d.filingType:showEnd}
  2. generate the PDF with the docx file

if the filingType is not E-FILE , the COPIES word formatting will be removed

const dataToRender = {
    data: { filingType: 'whatever' },
    convertTo: "pdf",
};

try {
    const { content } = await carbone.renderPromise(publicPath, dataToRender);
    // ...

handhikadj avatar Sep 01 '21 12:09 handhikadj

Hello @handhikadj, I was not able to reproduce the issue, it may come from the design of your template or the XML behind it. Can you share with us a template reproducing the issue at the following address [email protected]? Thank you for your bug report.

steevepay avatar Sep 02 '21 14:09 steevepay

this is the reproduction file debug_try.docx

handhikadj avatar Sep 03 '21 10:09 handhikadj

Thank you for the template, I reproduced the issue from your template, we are going to make further test with the team and I'll come back to you.

steevepay avatar Sep 06 '21 14:09 steevepay