Export DynamicReports to PDF with unicode characters Java - dynamic-reports

I am newbie in Java and DynamicReports. I am trying to export some data to PDF with DynamicReports using JasperReports. The problem is that my text contains unicode characters that are not in DejaVuSans. I have read DynamicReport documentation about adding fonts (dynamicreports.org/documentation/fonts), but I can not edid none of files mentioned in fonts page. I am using NetBeans and Java Maven project. All files in JasperReportsFont dependency are write-protected.
Is there any option to export with unicode characters? JaspierViewer shows all characters, but after export they are gone.

How I solved my problem:
I have read http://rekowski.info/home/technical/java/embedded-fonts-with-jasperreports-and-maven.xml
Downloaded iReport 5.6.0 and java jdk 1.7... I have read lots of posts and all solutions didn't helped on win 10. So I have changed path to java jdk 1.7 (like iReport not starting using JRE 8). With iReport created fonts jar, where I used windows font times.ttf. Select PDF Encoding to what you need.In my way I have chosen Cp1257, but I believe that it would works with Identity-H. Export font to jar file. Then I have imported jar file to maven (youtube - How to add JAR file to local Maven repository? : javavids) and added dependency to my POM file. In my java project file I have .setFontName("my font name") to style, that I use in my DynamicReports/Jasperreports report.
I hope you will be able to understand this mess that I have written here :) Asdk if you have any questions about this solution.

Related

NoClassDefFound error for com/aspose/pdf/BaseParagraph with aspose pdf 23.1 jdk17 jar in Eclipse

I am trying to work with aspose PDF jar and I am not able to get past the NoClassDefFound error for aspose pdf jar. I am using aspose imaging as well as aspose words jar. Both these do not have these, but only aspose PDF does.
Compilation is successful, but on run time I hit this issue.
I am using eclipse IDE
Any help is highly appreciated as I am running out of options to solve this issue.
**Steps tried : **
Switched workspace
Deleted the entire project
Made sure there is only one class with that name (essentially only one jar)
Classpath entries are fine in eclipse. Buildpath->libraries->add external jars. also order and export is selected.

Eclipse not exporting libraries

(In Eclipse) When I right click export and export as a Jar file, it does not package the libraries into the Jar file. It was exporting the libraries a couple weeks ago and the libraries were going into the Jar file and I'm not sure what changed.
I figured it was Eclipse so I reinstalled the program and imported the workspace with no luck. I also tried on a completely different machine.
I've moved the libraries into a container in Eclipse and also tried external libraries and none of the libraries are exporting. The only thing it's exporting is the class files, .claspath, .project, and the manifest.
Any suggestions would be greatly appreciated!
Of course when you post a question you've been working on (for hours) you seem to find the answer 5 minutes later...
The file was not exporting correctly because I chose "JAR file" instead of "Runnable JAR File".

How to convert Eclipse template file to IntelliJ template file

How can I convert Eclipse template file to IntelliJ template file. I do not want to add plugin to use the Eclipse file. I want to convert it.
Though not strictly respecting your question (no plugin), the built-in plugin Eclipse integration of IDEA 13 can import Eclipse templates quite accurately:
http://blog.jetbrains.com/idea/2014/01/intellij-idea-13-importing-code-formatter-settings-from-eclipse/
As stated in that post, the result cannot be 100% accurate as IDEA does not support all of the template options present in Eclipse (and the opposite might be true too).

Jasper reports font error

I am using Jasper Reports 5.2.0 and Spring MVC with Maven.
I have done reports using JasperViewer, but suddenly I am getting this error that can't be resolved:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '
net/sf/jasperreports/fonts/pictonic/pictonic.ttf
net/sf/jasperreports/fonts/pictonic/pictonic.svg
net/sf/jasperreports/fonts/pictonic/pictonic.eot
net/sf/jasperreports/fonts/pictonic/pictonic.woff
' is not available to the JVM. See the Javadoc for more details.
Delete the jar extra placed jars in your lib folder it works properly
or use same version jar file in maven dependency and webroot ->lib folder or in class path
For me, in one instance, the problem was with the jasperreports version as I had more that one jasperreports jar in my classpath.
My reports were compiled with jasperreports-5.6.0 and in my classpath jasperreports-4.1.1.jar was also included and accidentally jasperreports-4.1.1.jar was "up" in the Build class path order.
Actually, my eclipse project had jasperreports-5.6.0 as a library jar and this project had another project as "Required projects in the build path" that contained the old version of jasperreports.
I moved the jasperreports-5.6.0 to "Up in the build classpath order" than the old version, and the problem got resolved.
Again, later I removed the project dependency and got the problem resolved as well.
So check, whether you have more than one jasperreports library anyhow; if so, remove the unnecessary duplicate jar.
The Problem is one of the fonts you used in Jasper Reports not installed in the system. The solution is to install all missing fonts. Another alternative is to use only the fonts "Serif" and "San-Serif" which eliminates the need of installing fonts seperately and would even work when the code is moved accross different servers.

How can I use Sun's JAI-ImageIO with an Eclipse BIRT plugin?

I'm trying to write an extension (plug-in) for Eclipse BIRT reporting. It involves extracting images from a file according to database entries and displaying them.
I am using Sun's JAI-ImageIO to access TIFF file data and convert to PNG for display within the report. My code complies, but throws a NoClassDefFound runtime exception:
SEVERE: Error happened while running the report.
java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage
at org.eclipse.birt.sample.reportitem.rotatedlabel.util.GraphicsUtil.createDocImage
(GraphicsUtil.java:66)
at org.eclipse.birt.sample.reportitem.rotatedlabel.RotatedLabelPresentationImpl.onRowSets
(RotatedLabelPresentationImpl.java:136)
at org.eclipse.birt.report.engine.extension.ReportItemPresentationBase.onRowSets
(ReportItemPresentationBase.java:218)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.
processExtendedContent(LocalizedContentVisitor.java:966)
...
I am using the PlanarImage.getAsBufferedImage() method, so it should convert to a more standard image object. I have placed the JAI jar files in my JRE and tested the same basic code outside of the Eclipse plugin environment -- that works fine. It appears to be a CLASSPATH problem, but I've verified that all JREs on my system contain the necessary jar and DLL files in the appropriate places.
For a new JDBC driver, you must place the jar(s) in a special sub-directory of plugins -- is there a special place to put other third-party jars so BIRT can use them?
This has been solved in Eclipse extension for opening TIFF type 4 images. Basically you just need to make a subdirectory and place all the JARs and DLLs in it, add the jars to your classpath and add the DLLs to the "plugin dependencies" under "required native libraries".