aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/WallabagEBooks.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/WallabagEBooks.class.php')
-rw-r--r--inc/poche/WallabagEBooks.class.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/inc/poche/WallabagEBooks.class.php b/inc/poche/WallabagEBooks.class.php
index 55831571..ec1e4b27 100644
--- a/inc/poche/WallabagEBooks.class.php
+++ b/inc/poche/WallabagEBooks.class.php
@@ -96,7 +96,6 @@ class WallabagEpub extends WallabagEBooks
96 $bookEnd = "</body>\n</html>\n"; 96 $bookEnd = "</body>\n</html>\n";
97 97
98 $log = new Logger("wallabag", TRUE); 98 $log = new Logger("wallabag", TRUE);
99 $fileDir = CACHE;
100 99
101 $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE); 100 $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE);
102 $log->logLine("new EPub()"); 101 $log->logLine("new EPub()");
@@ -121,8 +120,12 @@ class WallabagEpub extends WallabagEBooks
121 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP"); 120 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP");
122 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag"); 121 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag");
123 122
124 $cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n"; 123 /*
125 124 * Line not used but planned to be used
125 *
126 *$cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n";
127 */
128
126 $log->logLine("Add Cover"); 129 $log->logLine("Add Cover");
127 130
128 $fullTitle = "<h1> " . $this->bookTitle . "</h1>\n"; 131 $fullTitle = "<h1> " . $this->bookTitle . "</h1>\n";
@@ -180,8 +183,6 @@ class WallabagMobi extends WallabagEBooks
180 $mobi = new MOBI(); 183 $mobi = new MOBI();
181 $content = new MOBIFile(); 184 $content = new MOBIFile();
182 185
183 $messages = new Messages(); // for later
184
185 Tools::logm('Filling metadata for Mobi...'); 186 Tools::logm('Filling metadata for Mobi...');
186 187
187 $content->set("title", $this->bookTitle); 188 $content->set("title", $this->bookTitle);
@@ -243,10 +244,9 @@ class WallabagPDF extends WallabagEbooks
243 244
244 $pdf->writeHTMLCell(0, 0, '', '', $intro, 0, 1, 0, true, '', true); 245 $pdf->writeHTMLCell(0, 0, '', '', $intro, 0, 1, 0, true, '', true);
245 246
246 $i = 1;
247 Tools::logm('Adding actual content...'); 247 Tools::logm('Adding actual content...');
248 foreach ($this->entries as $item) { 248 foreach ($this->entries as $item) {
249 $tags = $this->wallabag->store->retrieveTagsByEntry($entry['id']); 249 $tags = $this->wallabag->store->retrieveTagsByEntry($item['id']);
250 foreach ($tags as $tag) { 250 foreach ($tags as $tag) {
251 $pdf->SetKeywords($tag['value']); 251 $pdf->SetKeywords($tag['value']);
252 } 252 }
@@ -260,7 +260,7 @@ class WallabagPDF extends WallabagEbooks
260 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); 260 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
261 261
262 262
263 $pdf->Output($this->bookFileName . '.pdf', 'FD'); 263 $pdf->Output('cache/' . $this->bookFileName . '.pdf', 'FD');
264 } 264 }
265 catch (Exception $e) { 265 catch (Exception $e) {
266 Tools::logm('TCPDF has encountered an error : '.$e->getMessage()); 266 Tools::logm('TCPDF has encountered an error : '.$e->getMessage());