diff --git a/source/de/anomic/plasma/parser/pdf/pdfParser.java b/source/de/anomic/plasma/parser/pdf/pdfParser.java index 553866a1d..41230b2a0 100644 --- a/source/de/anomic/plasma/parser/pdf/pdfParser.java +++ b/source/de/anomic/plasma/parser/pdf/pdfParser.java @@ -125,6 +125,14 @@ public class pdfParser extends AbstractParser implements Parser { byte[] contents = out.toByteArray(); + if ((docTitle == null) || (docTitle.length() == 0)) { + docTitle = ((contents.length > 80)? new String(contents, 0, 80):new String(contents)). + replaceAll("\r\n"," "). + replaceAll("\n"," "). + replaceAll("\r"," "). + replaceAll("\t"," "); + } + /* * public document(URL location, String mimeType, String keywords, String shortTitle, String longTitle,