Metadata-Version: 2.1
Name: pagelabels
Version: 1.0.1
Summary: Python library to manipulate PDF page numbers and labels.
Home-page: https://github.com/lovasoa/pagelabels-py
Author: Ophir LOJKINE
Author-email: pere.jobs@gmail.com
License: UNKNOWN
Description: # pagelabels python library
        
        This is a little library, based on **pdfrw**, that helps manipulate PDF page labels in python.
        It can parse page labels from  a PDF, edit page labels, and write them in a PDF.
        
        For more info about page labels, see: https://www.w3.org/TR/WCAG20-TECHS/PDF17.html
        
        ## Classes
         * [PageLabels](#pagelabels)
         * [PageLabelScheme](#pagelabelscheme)
        
        ## PageLabels
        Inherits from list and represents a list of `PageLabelScheme`s.
        
        ### PageLabels.from_pdf(pdfrwobj)
        Static method.
        Read page labels from a PdfReader object.
        
        ### .write(pdfrwobj)
        Write the page labels to a PdfReader object.
        
        ## PageLabelScheme
        Inherits from a named tuple with fields:
         * `startpage` : Index in the PDF where to start numbering pages according to this scheme
         * `style` : one of the strings `arabic`, `roman uppercase`, `letters uppercase`, `roman lowercase`, `letters lowercase`
         * `prefix` : string to prepend to all page labels
         * `firstpagenum` : where to start the index
        
        ## Example
        
        ```python
        from pdfrw import PdfReader, PdfWriter
        
        from pagelabels import PageLabels, PageLabelScheme
        
        reader = PdfReader("input.pdf")
        labels = PageLabels.from_pdf(reader)
        newlabel = PageLabelScheme(startpage=3, # the index of the page of the PDF where the labels will start
                                   style="roman", # See options in PageLabelScheme.styles()
                                   prefix="Appendix ",
                                   firstpagenum=1) # number to attribute to the first page of this index
        labels.append(newlabel) # Adding our page labels to the existing ones
        labels.write(reader)
        writer = PdfWriter()
        writer.trailer = reader
        writer.write("optput.pdf")
        ```
Keywords: pdf,page labels,page numbers,title page
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
