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

Defective PPTX format in BIRT 4.9.0-20220204-win32 #813

Closed
joachim-wesenberg opened this issue Feb 5, 2022 · 6 comments · Fixed by #818
Closed

Defective PPTX format in BIRT 4.9.0-20220204-win32 #813

joachim-wesenberg opened this issue Feb 5, 2022 · 6 comments · Fixed by #818

Comments

@joachim-wesenberg
Copy link

Using Run/View Report/As PPTX
will generate output which is not recognized by Microsoft Powerpoint nor LibreOffice. It did not work in BIRT 4.7 either. However, in 4.7 the ODP format was supported and could be used to produce PPTX slides via LibreOffice (convert ODP to PPTX) as a workaround.
Are there any plans to have that fixed or would you suggest to stay with BIRT 4.7?

@claesrosell
Copy link
Contributor

Can you provide an example report that reproduces this error?
I tested with some smaller test-reports that I have and was unable to reproduce this.

@joachim-wesenberg
Copy link
Author

Attached you will find 2 reports:

  • test_birt-pptx-output: very small and simple slide - which could be opened in Powerpoint and is ok.
  • bav_portfolio_slides: this is the one that gives me grief. It is fine as DOCX, HTML, PDF and ODT. But Powerpoint does not like the format and tries to open with 'Microsoft Open XML Converter'.

Any sort of help is very much appreciated
birttest.zip
.

@claesrosell
Copy link
Contributor

Ok, I have narrowed down this error to a faulty handling of margins in the pptx emitter.
If margins for table contents are set to "Auto", the creation of the pptx will fail because of a NullPointerException.
I will need more time to find out how this special "auto" case should be handled, hopefully I can put more time into this later this week.

claesrosell added a commit to claesrosell/birt that referenced this issue Feb 8, 2022
Null guard for when DimensionType.parseUnit() fails in
PPTXUtil.convertCssToEnum(). This happens typically when the
cssDimension is "auto" for margins, which really should have a special
case treatment in the TableWriter.endCell(). However, from the look of
it, the "margin" code in endCell needs a lot of refactoring and should
perhaps be done in other places in PPTXCanvas instead ( .drawText() etc
)
@claesrosell
Copy link
Contributor

@joachim-wesenberg : We have fix for this in PR #818. Please try it out. You can find the builds here: https://github.com/eclipse/birt/actions/runs/1811619251

@hvbtup
Copy link
Contributor

hvbtup commented Feb 9, 2022

OP said that PR #818 fixed the issue.

@hvbtup hvbtup closed this as completed Feb 9, 2022
@claesrosell
Copy link
Contributor

PR is not merged yet, so this only works in the CI build.

claesrosell added a commit that referenced this issue Feb 9, 2022
Null guard for when DimensionType.parseUnit() fails in
PPTXUtil.convertCssToEnum(). This happens typically when the
cssDimension is "auto" for margins, which really should have a special
case treatment in the TableWriter.endCell(). However, from the look of
it, the "margin" code in endCell needs a lot of refactoring and should
perhaps be done in other places in PPTXCanvas instead ( .drawText() etc
)
@wimjongman wimjongman linked a pull request Feb 9, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants