We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception: Only One <txPr> Element Can Be Added

I am getting this exception when trying to process a PPT file that has a chart label with two different sets of format (as seen in example attached).

class com.aspose.slides.exceptions.Exception: Only one <txPr> element can be added.
com.aspose.slides.internal.nx.j7.protected(Unknown Source)
com.aspose.slides.internal.nx.j7.new(Unknown Source)
com.aspose.slides.internal.nx.j7$27.do(Unknown Source)
com.aspose.slides.fo.do(Unknown Source)
com.aspose.slides.abx.do(Unknown Source)
com.aspose.slides.i6.do(Unknown Source)
com.aspose.slides.jd.do(Unknown Source)
com.aspose.slides.fg.do(Unknown Source)
com.aspose.slides.eg.do(Unknown Source)
com.aspose.slides.ey.do(Unknown Source)
com.aspose.slides.ey.do(Unknown Source)
com.aspose.slides.e1.do(Unknown Source)
com.aspose.slides.fa.for(Unknown Source)
com.aspose.slides.fa.do(Unknown Source)
com.aspose.slides.rd.if(Unknown Source)
com.aspose.slides.rd.do(Unknown Source)
com.aspose.slides.rd.do(Unknown Source)
com.aspose.slides.bg.do(Unknown Source)
com.aspose.slides.ak8.do(Unknown Source)
com.aspose.slides.agb.do(Unknown Source)
com.aspose.slides.agb.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.save(Unknown Source)
com.vroiasposebug.MainClass.processDeletes(MainClass.java:513)
com.vroiasposebug.MainClass.main(MainClass.java:44)
org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
java.lang.Thread.run(Thread.java:748)

Important to notice that I tested with different versions and notice that 21.1 does not produce the error but from 21.2 on it happens (test is 22.4)

Thanks in advance for the helpAspose22.1bug.zip (87.9 KB)

@jroldan1,
Thank you for contacting support.

It will take me some time to check the error you are facing. We will reply to you as soon as possible.

Thanks for the reply, I forgot to add that if in PowerPoint you select the chart’s label with the format and use the “Reset label text” button the exception no longer happens, thats why I think is related to the multiple formats

@jroldan1,
Thank you for the additional information. We will get back to you a little later.

@jroldan1,
Please try to isolate the problem and share a minimal code example without your application code and third-party packages.

Here is the issue as isolated and minimized as possible, you’ll see a main method TestMethod that does the loading and saving of the file (when the issue is triggered). The only process I have to do before that is some text substitution critical for the operation. I hope this example helps, if you need something else please let me knowAspose22.4bug.zip (68.0 KB)

@jroldan1,
Thank you for the code examples. We will reply to you soon.

@jroldan1,
I’ve added a ticket with ID SLIDESJAVA-38791 to our issue tracking system. Our development team will investigate this case. We will inform you of any progress.

Thanks, ill be following the ticket

@jroldan1,
Our development team will do their best to resolve the issue you are experiencing. Thank you for using Aspose.Slides.

Hi @Andrey_Potapov any updates on the issue?

@jroldan1,
I’ve requested plans for the issue from our development team for you. We will let you know soon.

@jroldan1,
The issue investigation will begin in early June. A fix will be included in Aspose.Slides 22.7 or later.

1 Like