def old_embedded_pdf_items(self, page_id='', width='400px', height='400px'):
     items = []
     pdf = self.xml_path + '/' + self.xml_name + '.pdf'
     if os.path.isfile(pdf):
         #items.append('<object id="' + pdf_id + '" data="file://' + pdf + '" width="100%" height="100%"><param name="view" value="Fit" /></object>')
         items.append(html_reports.tag('p', html_reports.display_embedded_object(pdf, os.path.basename(pdf), page_id + self.xml_name, width, height)))
     for lang in self.article.trans_languages:
         pdf = self.xml_path + '/' + self.xml_name + '-' + lang + '.pdf'
         if os.path.isfile(pdf):
             items.append(html_reports.tag('p', html_reports.display_embedded_object(pdf, os.path.basename(pdf), page_id + self.xml_name + '_' + lang, width, height)))
     return ''.join(items)
예제 #2
0
 def embedded_pdf_items(self, page_id='', width='400px', height='400px'):
     items = []
     for item in self.article.related_files:
         items.append(html_reports.tag('p', html_reports.display_embedded_object(
             item,
             os.path.basename(item), page_id + item, width, height)))
     return ''.join(items)