Android Question PDFWriter Question!

cougar

Member
Licensed User
Longtime User
I love PDFWriter. It was a bit confusing at first but I have now figured it out and I have been able to create some very useful reports within my app. However, I am still having trouble with the Rotation code. It isn't recognized, etc.

I tried a fix by Locutus that involved adding a line of code to the pdfwriter.xml file. That didn't work either. He even supplied me with his .xml and I still can't get it to work. Basically, the line;

PDFWriter1.addText2(30, 90, 10, "© CRL", Fonts.DEGREES_270_ROTATION)

gives me the "unknown member: degrees_270_rotation" message.

DEGREES_270_ROTATION is not actually a choice in the drop-down when I type Fonts. I only get a list of fonts. I did read that perhaps I could simply enter the integer (270, etc.) but that doesn't work either. Of course, the declaration is looking for a string...not an int. It says transformation as String. Not sure what's going on!

I would love to figure this out. With the exception of this problem, PDFWriter has met all of my needs. I would hate to have to throw away 2 weeks of work over this one issue but I really need the rotation part for my app.

Thanks to anyone who may have faced this problem and found a solution. I have version 1.10 of pdfwriter.

Thanks again!
 

cougar

Member
Licensed User
Longtime User
Well. I found a possible solution to my problem. I downloaded the 1.0 version and the rotation still works there. The downside is that the ability to add images was part of version 1.1 so the image ability is no longer there. That's not a big problem for me on this project since the text rotation is what I truly need. I know nothing about .xml or .jar files but I intend to compare these files and see if I can find the problem. Apparently, something was left out of 1.1 that led to the problem. I'm not sure. If anyone else knows how to "fix" the problem then I hope they will do so and post an update. A version 1.2 that includes both the ability to add images and rotate text would be great. Thanks!
 
Upvote 0

cougar

Member
Licensed User
Longtime User
@DonManfred - pdfwriter is a simple library to create pdf's. It works great. I just had trouble with the text rotation feature. I went back and downloaded the original library (1.0) and I can now use the rotate text feature. It has to be the simplest library I have used with B4A. I just need to figure out how to merge 1.0 with 1.1 so I can have both images and rotated text. That's for later! I don't need the images for this particular app, just the rotated text. Thanks for your input!

@warwound - I considered using PDFJet until I read through the thread regarding it and saw the apparent issues with the new version and b4a, etc. It looks like a great tool and I will definitely consider it in the future but I am so deep into the pdfwriter part of this app that I would hate to switch in mid-stream. I don't use B4J. If I did, I would definitely be using PDFJet since it appears to work seamlessly with B4J. Thanks for the input!
 
Upvote 0

Allan Cameron

Member
Licensed User
Longtime User
Can you create rectangles and fill in with colour? And can you change the color of the text? Any code snippets of these would be very helpful. I can see how to do things in black and white.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…