Project

General

Profile

ISSUE_TO_PDF - How to use issue_to_pdf function to get the PDF Contet of an Issue

Added by Glailson Nogueira almost 4 years ago

I need to get the String of the PDF of issue without clicking the PDF link in the Issue Show. I know there is a function called issue_to_pdf in the issues_pdf_helper.rb file under lib/redmine/export/pdf/ folder. I creating a plugin that, among other functionalities, must read the PDF content of any issue PDF. Even if I add the 'require name_of_the_file.rb' in my plugin, I can't access this function using Redmine::Export::PDF::IssuesPdfHelper, I get this error when I tested in rails console:

Redmine::Export::PDF::IssuesPdfHelper.issue_to_pdf(Issue.find(17842))
NoMethodError: undefined method `issue_to_pdf' for Redmine::Export::PDF::IssuesPdfHelper:Module

Does anyone know how to use run this function "issue_to_pdf"?

Thanks in advance for your help.