-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
How can I add Footer to every page #10
Comments
It is not currently possible as it had some complications implementing it. Will sure look into possibilities of adding it again. |
From version 2.0, you have to override @Override
protected PDFFooterView getFooterView(int pageIndex) {
PDFFooterView footerView = new PDFFooterView(getApplicationContext());
PDFTextView pdfTextViewPage = new PDFTextView(getApplicationContext(), PDFTextView.PDF_TEXT_SIZE.SMALL);
pdfTextViewPage.setText(String.format(Locale.getDefault(), "Page: %d", pageIndex + 1));
pdfTextViewPage.setLayout(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT, 0));
pdfTextViewPage.getView().setGravity(Gravity.CENTER_HORIZONTAL);
footerView.addView(pdfTextViewPage);
return footerView;
} |
Thanks a lot 🙏🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: