Browse Source

Add a statement about common issues with pdfextract

Phyks (Lucas Verney) 3 years ago
parent
commit
65967cfa96
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      libbmc/citations/pdf.py

+ 8
- 1
libbmc/citations/pdf.py View File

@@ -86,14 +86,21 @@ def pdfextract(pdf_file):
86 86
                 ``gem install pdf-extract``, provided that you have a correct \
87 87
                 Ruby install on your system.
88 88
 
89
+    .. note::
90
+
91
+        ``pdfextract`` is full a bugs and as the time of writing this, \
92
+                you had to manually ``gem install pdf-reader -v 1.2.0`` \
93
+                before installing ``pdfextract`` or you would get errors. See \
94
+                `this Github issue <https://github.com/CrossRef/pdfextract/issues/23>`_.
95
+
89 96
     :param pdf_file: Path to the PDF file to handle.
90 97
     :returns: Raw output from ``pdfextract`` or ``None`` if an error \
91 98
             occurred. No post-processing is done. See \
92 99
             ``libbmc.citations.pdf.pdfextract_dois`` for a similar function \
93 100
             with post-processing to return DOIs.
94 101
     """
95
-    # Run pdf-extract
96 102
     try:
103
+        # Run pdf-extract
97 104
         references = subprocess.check_output(["pdf-extract",
98 105
                                               "extract", "--references",
99 106
                                               pdf_file])