carbone
carbone copied to clipboard
[Bug Report]: Carbone somehow removes formatting on the following conditional
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:
- 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} - 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);
// ...
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.
this is the reproduction file debug_try.docx
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.