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

Trailing Slash in url Replacment #4

Open
daltonch opened this issue May 5, 2020 · 2 comments
Open

Trailing Slash in url Replacment #4

daltonch opened this issue May 5, 2020 · 2 comments

Comments

@daltonch
Copy link

daltonch commented May 5, 2020

Is there a way to use another field for the image replacement? In my version of Powerpoint 16.38 (osx) when I put in a url replacement variable $/image1/ it get replaced to $/image1 and therefore never gets swapped out from the template.

@daltonch
Copy link
Author

daltonch commented May 5, 2020

Seems like if I put a \ at the end it works.

@amanteaux
Copy link
Member

Hi @daltonch,
Thank you for your interest in this library!

You are right, configure this might be a good addition.
To be sure, can you confirm this behavior:

try(FileOutputStream out = new FileOutputStream("generated.pptx")) {
  new PptMapper()
    .variableCharDelimiter("|")
    .text("title", "Hello")
    .text("subtitle", "World!")
    .processTemplate(PptTemplateDemo.class.getResourceAsStream("/title.pptx"))
    .write(out);
}

So you would be able to use $|title| in your presentation, and it would correctly be replaced by Hello.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants