📄
PDF Creator Android
  • Introduction
  • Docs
  • Installation
  • Getting Started
  • Available Views
    • PDFVerticalView
    • PDFHorizontalView
    • PDFTextView
    • PDFImageView
    • PDFLineSeparatorView
    • PDFPageBreakView
    • PDFTableView
      • PDFTableRowView
  • Generate Pdf From HTML
    • Html To Pdf
    • WebView To Pdf
Powered by GitBook
On this page
  1. Available Views

PDFLineSeparatorView

Separate Views OR Create Space

Add horizontal line separator between views.

Example:

PDFLineSeparatorView lineSeparatorWhite = new PDFLineSeparatorView(getApplicationContext()).setBackgroundColor(Color.WHITE);
PDFLineSeparatorView lineSeparatorBlack = new PDFLineSeparatorView(getApplicationContext()).setBackgroundColor(Color.BLACK);
// Get View
View separatorView = lineSeparatorWhite.getView();

Example As Empty Space:

Line separator can also work as empty space as you can set background color as white and height lets say 8px, it will act as an empty space.

PDFLineSeparatorView emptySpace = new PDFLineSeparatorView(getApplicationContext()).setBackgroundColor(Color.WHITE);
emptySpace.setLayout(new LinearLayout.LayoutParams(
        LinearLayout.LayoutParams.MATCH_PARENT,
        8, 0));
pdfBody.addView(emptySpace);
PreviousPDFImageViewNextPDFPageBreakView

Last updated 3 years ago