5
I am some time analyzing free libraries for creating PDF for use in commercial applications on Android, and so far I have not found one that meets all my expectations, functionalities and licenses. As can be seen in that and in that ask right here at Sopt.
The best library I’ve found so far was the Android PDF Writer, that has the ability to create basic PDF and has a license (BSD) suitable for my project, as per in this excellent software license post.
Despite doing a lot of PDF-related stuff, it was designed only for simple PDF creation, with text and images.
Then I would like to know/find some logic documentation to create a PDF, so I can add resources to the library?
As an example of cited library code, to add a text to the PDF is implemented in this way:
public void addText(int leftPosition, int topPositionFromBottom, int fontSize, String text, String transformation) {
addContent(
"BT\n" +
transformation + " " + Integer.toString(leftPosition) + " " + Integer.toString(topPositionFromBottom) + " Tm\n" +
"/F" + Integer.toString(mPageFonts.size()) + " " + Integer.toString(fontSize) + " Tf\n" +
"(" + text + ") Tj\n" +
"ET\n"
);
}
The first implementation I’m looking for is for the creation of tables where the only documentation I’ve found so far was that one, that I could not understand complement, and I would like something more detailed, with for example: table structure, header structure, column structure, row structure, item structure. To understand and implement each part of the table as a module.
Hello, which library is being used to generate this PDF?
– Fernando Leal
Fernando, he uses the droidText
– Alessandro Barreto
But this library uses LGPL v3 license, and as I mentioned in the question I need something more permissive, since the LGPL license v3, requires that the by-product be licensed from the same license and that source code be opened. Which in my case is not possible, since it is a business application of my employer.
– Fernando Leal