Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables are not substituted with values in docx template #176

Open
distributev opened this issue Jan 19, 2023 · 0 comments
Open

Variables are not substituted with values in docx template #176

distributev opened this issue Jan 19, 2023 · 0 comments

Comments

@distributev
Copy link

Consider the below template with var0,var1 and var2

template-var0var1var2.docx

I used yarg to generate the PDF, I filled var0, var1 and var2 with data however the output PDF came with the unsubstituted ${var0},
${var1} and ${var2}

Environment

latest yarg

  • Operating system:

Windows 10

Map<String, Object> variablesData = new HashMap<String, Object>();

variablesData.put("var0", "data0");
variablesData.put("var1", "data1");
variablesData.put("var2", "data2");

final String TEMPLATE_DOCX_WORDPAD_PATH = "src/test/resources/input/external-libraries/template-var0var1var2.docx";

String outputFilePath = TestsUtils.TESTS_OUTPUT_FOLDER + "/YargTest/generatePDFTemplateDocxSimple/output.pdf";

generateDocument(outputFilePath, TEMPLATE_DOCX_WORDPAD_PATH, variablesData);
	
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant