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

Validation in the date range option in PDF export #2450

Closed
dbarashev opened this issue Apr 25, 2024 · 0 comments
Closed

Validation in the date range option in PDF export #2450

dbarashev opened this issue Apr 25, 2024 · 0 comments

Comments

@dbarashev
Copy link
Contributor

PDF export allows for choosing a date range for the chart image export. It is possible to define a range where the start date is after the end date. Apparently, this won't affect PDF export (there is only a task table image with no chart in the PDF file) but leads to crashes in the HTML export:

Caused by: java.lang.IllegalArgumentException: Width (0) and height (793) must be > 0
	at java.desktop/java.awt.image.SampleModel.<init>(SampleModel.java:127)
	at java.desktop/java.awt.image.SinglePixelPackedSampleModel.<init>(SinglePixelPackedSampleModel.java:144)
	at java.desktop/java.awt.image.SinglePixelPackedSampleModel.<init>(SinglePixelPackedSampleModel.java:110)
	at java.desktop/java.awt.image.PackedColorModel.createCompatibleSampleModel(PackedColorModel.java:312)
	at net.sourceforge.ganttproject.chart.export.RenderedChartImage.<init>(RenderedChartImage.java:51)
	at net.sourceforge.ganttproject.chart.ChartRasterImageBuilder.acceptChart(PrintChartApiImpl.kt:103)
	at net.sourceforge.ganttproject.chart.export.ChartImageBuilder.buildImage(ChartImageBuilder.kt:56)
	at net.sourceforge.ganttproject.chart.PrintChartApiImpl.buildImage(PrintChartApiImpl.kt:55)
	at net.sourceforge.ganttproject.chart.PrintChartApiImpl.exportChart(PrintChartApiImpl.kt:49)
	at org.ganttproject.impex.htmlpdf.ExporterToHTML$1.run(ExporterToHTML.java:87)
	at net.sourceforge.ganttproject.export.ExporterBase$2.run(ExporterBase.java:180)
	... 2 more
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

1 participant