TIBCOSoftware / jasperreports

JasperReports® - Free Java Reporting Library
https://community.jaspersoft.com/downloads/community-edition/
GNU Lesser General Public License v3.0
1.06k stars 404 forks source link

Editing Rotate Property for both (Field & Static) Text #388

Closed Kotlin-GDE closed 1 year ago

Kotlin-GDE commented 1 year ago

hi

i suggest to add custom angle to rotate texts

teodord commented 1 year ago

I'm not sure which export format are you targeting. Not all export formats support arbitrary rotation of text and we want to be consistent as much as possible across all export formats.

Kotlin-GDE commented 1 year ago

hi @teodord

i think you dont understand what i suggest, when using static text or field etxt i want to rotate it with custom angle (property rotate i want to make it editable)

teodord commented 1 year ago

I think I understood that. But still, you did not say which export format you are interested in: HTML, PDF, DOCX, Excel?... Not all of them support custom rotation angles.

Kotlin-GDE commented 1 year ago

hi

only PDF & DOCX & XLSX formats

teodord commented 1 year ago

It is not clear how text should be rotated when custom angle is used. In the product today, we rotate the entire element with 90, 180 and 270 degrees, which means we are not rotating the text inside the element, but rather rotate the element as a whole. If I look at how MS Excel rotates text inside a cell, I can only assume it would be quite hard to implement considering the way JasperReports measures text at report fill time, where right now we deal with text being wrapped at element width. With text being rendered at an angle, each row of text would be of different length, if the element does not rotate and only the text does. I think what I am saying is that chances of implementing this are quite remote for now.

Thank you, Teodor

Kotlin-GDE commented 1 year ago

@teodord

rotate with 90, 180, 270 degre, so why not add more measures like 30, 45, 60, 120, 150 degre, or more why not make this property editable

teodord commented 1 year ago

Please attach here a PDF, an Excel file and a DOCX file, all showing how you expect a text element to be rotated at an arbitrary angle, let's say 45 degrees to the left. Please use a text element that has border and background color. Hopefully all 3 files would present the same text field scenario so that we can compare the expected output across the 3 document formats.

Thank you, Teodor

Kotlin-GDE commented 1 year ago

hi @teodord same think like this:

text-sample

teodord commented 1 year ago

Are you talking about watermark images in the background of the document page? Is this the only reason you want to rotate text? If so, why can't you use an SVG and put in an image element in the background section of the report? You can see us using a watermark background image in the /demo/samples/query sample here: https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/demo/samples/query/reports/QueryReport.jrxml#L64

And BTW, how would you expect this rotated text in the background to work in a Excel worksheet?

Thank you, Teodor

Kotlin-GDE commented 1 year ago

hi

no i dont want to put image in background, just i want to make a text in background with custom rotation

teodord commented 1 year ago

I am still waiting for PDF, DOCX and especially Excel files that would demonstrate the exact output you expect from such rotated texts. So far, you only provided a GIF, which I'm not even sure what document format it presents in the screenshot.

I assume that if you are asking for such a specific thing: arbitrary rotated texts, you must have seen them before, so you can share some of these documents with us to better understand expectations. I'm particularly interested in seeing an Excel one, as you mentioned you target Excel files.

Thank you, Teodor

Kotlin-GDE commented 1 year ago

until now you dont understand me, i just want to put text in background section (as watermark) and change rotation property for this text, that what i want

teodord commented 1 year ago

We are not going to write hundreds of lines of code to achieve something that can already be done with the product today. You say you don't want to use SVG, but text elements. OK, it is up to you. It is your preference.

I am attaching here a PDF that has been generated using our /demo/samples/table sample from the project distribution using an SVG placed in the background section.

TableReport.pdf

sample

TableReport.jrxml.zip