I am trying to write a plugin that exports issues from the search view to a PDF file using the SearchRequestView module.
'atlas-create-jira-plugin-module' created a class that extends AbstractSearchRequestView in which there is only one method that needs to be implemented:
public abstract void writeSearchResults(SearchRequest searchRequest, SearchRequestParams searchRequestParams, Writer writer) throws SearchException
I understand that I am supposed to use the 'writer' object to write what I want to show the user.
And for a similar plugin that exports to text/html content this works fine since 'writer' is supposed to handle strings.
For PDF files on the other hand, I would expect to need an OutputStream object to take my data.
And even if I wrap the 'writer' into a WriterOutputStream object from Apache Commons IO that lets me pass binary data, I only get empty pages in the resulting PDF since the data gets corrupted in the process. How should I go about this?
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event