strife's devLog

Category: Java

javaDynamic variables FOP / XSLT – font changing problem (switching font languages)

I’ve been working on the PDFs once again and I’ve spotted that I have a problem with changing languages depending on the variables. In other words if somebody speaks Asian languages font should be different than Arial.ttf which is as defualt.

To solve this problem we need to change our XML file which is used for populating all fields in the PDF to add to them another option indicates language parameter. Below you’ll find my quick solution for this problem. I assume that you’ve already configurated your envirovement and FOP / PDF thing.

In Java, first I’m getting XML and parse it putting the value indicates language in the XML. Something like this

In my XML file the first node within the root is tag.

So I’m dynamically changing language node to the language parameter and in XSL file I am just choosing in using the structure that I’ve written above. And that’s all.


android-wallpaperAndroid: How to Send Request (POST) to the Server (Full Application)


Like I said before I am new to Android and I don’t hide it but I’ve started to like it so far. And now I’d like to show you an application which enables sending data to the servers remotely. Before I give you the code, just look at the screens how it looks.
Read the full article »