docs: def convert(self):
          """User-facing conversion method. Returns pandoc document as a list of
          lines."""
          lines = []
  
          pages = self.flatten_pages(self.config['pages'])
  
          f_exclude = mkdocs_pandoc.filters.exclude.ExcludeFilter(
                  exclude=self.exclude)
  
          f_include = mkdocs_pandoc.filters.include.IncludeFilter(
                  base_path=self.config['docs_dir'],
                  encoding=self.encoding)
  
          # First, do the processing that must be done on a per-file basis:
          # Adjust header levels, insert chapter headings and adjust image paths.
  
          f_headlevel = mkdocs_pandoc.filters.headlevels.HeadlevelFilter(pages)
  
          for page in pages:
              fname = os.path.join(self.config['docs_dir'], page['file'])
              try:
                  p = codecs.open(fname, 'r', self.encoding)
              except IOError as e:
                  raise FatalError("Couldn't open %s for reading: %s" % (fname,
                      e.strerror), 1)
              f_chapterhead = mkdocs_pandoc.filters.chapterhead.ChapterheadFilter(
                      headlevel=page['level'],
                      title=page['title']
                      )
  
              f_image = mkdocs_pandoc.filters.images.ImageFilter(
                      filename=page['file'],
                      image_path=self.config['site_dir'],
                      image_ext=self.image_ext)
  
              lines_tmp = []
  
              for line in p.readlines():
                  lines_tmp.append(line.rstrip())
  
              if self.exclude:
                  lines_tmp = f_exclude.run(lines_tmp)
  
              if self.filter_include:
                  lines_tmp = f_include.run(lines_tmp)
  
              lines_tmp = f_headlevel.run(lines_tmp)
              lines_tmp = f_chapterhead.run(lines_tmp)
              lines_tmp = f_image.run(lines_tmp)
              lines.extend(lines_tmp)
              # Add an empty line between pages to prevent text from a previous
              # file from butting up against headers in a subsequent file.
              lines.append('')
  
          # Strip anchor tags
          if self.strip_anchors:
              lines = mkdocs_pandoc.filters.anchors.AnchorFilter().run(lines)
  
          # Fix cross references
          if self.filter_xrefs:
              lines = mkdocs_pandoc.filters.xref.XrefFilter().run(lines)
  
          if self.filter_toc:
              lines = mkdocs_pandoc.filters.toc.TocFilter().run(lines)
  
          if self.filter_tables:
              lines = mkdocs_pandoc.filters.tables.TableFilter().run(lines)
  
          return(lines)