-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Who wants to work on documenting this library #41
Comments
Hi Dries, I can gladly help with documentation of this library, I will make some small code snipets for those new merged features with proper description. Hrvoje |
Hi @Frulenzo, I would like to collect all tutorial and documentation on http://dhorions.github.io/boxable/ . |
Hi @dhorions, Second, do you want to collect tutorials/documenation in this thread,gitter or per email? Just for now, I will put some quick tutorials right here. Boxable featuresSome of the features that Boxable supports:
Retrieving current table pageIf table is displayed on multiple pages. the "new Page" can be retrieved with Maybe something like : [...]
// did we change the page?
if (table.getCurrentPage() != page) {
cos.close();
page = table.getCurrentPage();
cos = new PDPageContentStream(document, page, true, true);
} Where Retrieving last position of the current tableLast position of the table can be retrieved as follow:
Writing inside PDF DocumentIt is pretty easy to write some text inside PDF Document with
Maybe it is better to put that in some context, for example, writing document title [...]
private PDPageContentStream cos;
private PDPage page;
private PDFont font = PDType1Font.HELVETICA;
private float leftMargin = 50;
private marginBetweenYElements = 10;
private float titleFontSize = 18;
[...]
private void drawPageTitle() throws IOException {
// draw document title first
PDStreamUtils.write(cos, "Document title", titleFontSize, leftMargin, yPosition,
Color.BLACK);
// drop Y position with default margin between vertical elements
yPosition -= marginBetweenYElements;
} Drawing images in PDF DocumentIt is very similar process just like writing text. All work is done by
Lets put that in context, for example, drawing logo on our PDF document: private PDPageContentStream cos;
private PDDocument doc;
[...]
Image image = new Image(ImageIO.read(new File("/../logo.png")));
// imagine we have pretty big logo and we want scale that a little bit
float imageWidth = 75;
image = image.scaleByWidth(imageWidth);
image.draw(doc, cos, xPosition, yPosition) |
Hello, is it possible to add rows to existing pdf ? |
Hi guys, while adding Maven dependencies as per your website [http://dhorions.github.io/boxable/] I noticed that you have default version pointing to 1.4 when I think that it should be 1.5-RC due to the fact that there are missing methods in classes for example the Table Class under ver 1.4 was missing:
so when running sample tests in TableTest Class I ran into several errors. It took me a few hours to realize that the my Maven dependency was pointing to an older version of boxable and not 1.5-RC.. . .or is there a specific reason you guys have ver 1.4 as the default ? |
I am not that much expert in this library, but after using it, I think we definitely need documentation. I am ready to contribute. |
@davdavarshal Thanks for your interest in documentation of this library! Please when you have something just drop it here as reponse because I will try to collect all reponses, make more documentation myself and then start making quality wiki. |
I'm still working on documentation of this library and what I really want to know is which problems/questions did you have at first glance of this library? What did you really want to see in Wiki FAQ? |
how can I use the boxable in my simple jsp servlet web application, please give me some guidance, give me the .jar file link |
Check this: http://dhorions.github.io/boxable/ |
Hi, Is it possible to draw more than one tables in the same page one after another? |
hi i would like to push changes to library |
Hello, I am interested in helping out with documenting this library. How can I help out? |
Any updates to the wiki are more than welcome. |
Hello, is there any possibility if table continue to multiple pages automatically create that pages as new PDPage? |
github.com/mage1k99
mage1k99@fossfreaks.com @mage1k99
|
Currently I am iterating on all pages at last and them printing the footer on them, if need I can share my code snippet. We can think of whether such a feature can be added to the library later, like header and footers. These are typical reporting requirements and I am working on reporting features. |
Hi All, |
Hi everyone,
a lot of helpful people have been adding great features to this library. I think there are now so many great features, that we should start thinking about properly documenting them and providing easy examples to people can get started using the library quickly.
Does anyone want to help with this?
Thanks,
Dries
The text was updated successfully, but these errors were encountered: