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

[Bug Report]: Can't repeat pages in a PPTX ? #219

Open
vlebert opened this issue Nov 26, 2024 · 1 comment
Open

[Bug Report]: Can't repeat pages in a PPTX ? #219

vlebert opened this issue Nov 26, 2024 · 1 comment
Labels
T: bug Functionality that does not work as intended/expected

Comments

@vlebert
Copy link

vlebert commented Nov 26, 2024

I am trying to repeat pages in a PPTX and I can't find the way.

Here is my current test data :

const fs = require("fs");
const carbone = require("carbone");

// Data to inject
var data = {
  evol: {
    context: "Evolution TEST",
    scenarios: [
      {
        name: "Scenario 1",
      },
      {
        name: "Scenario 2",
      },
    ],
  },
};

// Generate a report using the sample template provided by carbone module
// This LibreOffice template contains "Hello {d.firstname} {d.lastname} !"
// Of course, you can create your own templates!
carbone.render("./templates/template2.pptx", data, function (err, result) {
  if (err) {
    return console.log(err);
  }
  // write the result
  fs.writeFileSync("result.pptx", result);
});

error

TypeError: Cannot read properties of undefined (reading 'position')
    at Object.splitMarkers (/Users/vlebert/carboneio/node_modules/carbone/lib/extracter.js:241:41)
    at /Users/vlebert/carboneio/node_modules/carbone/lib/builder.js:43:48
    at Object.preprocessMarkers (/Users/vlebert/carboneio/node_modules/carbone/lib/parser.js:353:5)
    at /Users/vlebert/carboneio/node_modules/carbone/lib/builder.js:35:16
    at /Users/vlebert/carboneio/node_modules/carbone/lib/parser.js:67:7
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

And my template

template2.pptx

digi-studio 2024-11-26 at 12 06 40

Is that kind of repetition possible somehow ?

Environment
Carbone Version: [carbone@3.5.6]

@vlebert vlebert added the T: bug Functionality that does not work as intended/expected label Nov 26, 2024
@vlebert
Copy link
Author

vlebert commented Nov 26, 2024

With the same template converted to .odp, it does works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

1 participant