githubbob42 / mingle2github2

0 stars 1 forks source link

Support PDF Reports #4394

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 4732 Narrative

As a Field Engineer I can generate reports in a printable, portable format.

Acceptance Criteria

Generated reports should have the following characteristics:

Analysis

Here was the test spike:

https://github.com/Liquidframeworks/alpine-mobile/pull/2189

The test spike worked on Chrome and iOS 10.1 and 10.2.

A new standard for templates would have to be used with this system, relying on XML instead of HTML.  

We may even be able to salvage the helpers from handlebars to do it.  The new system could run in parallel to the old one.

Things so far which are broken or not supported by PDFMake:

  1. text transforms/rotation – there is a work around
  2. vertical alignment – with care this can be replicated with margins
  3. nested tables inside of repeating table headers, once it pages it all goes to pot, special care with table layouts can mitigate most of this
  4. vector graphics – same work around as text transformation.
  5. row height in tables cannot be explicitly set – the work around is to wrap the contents and give them a margin
  6. images automatically scale from pixels on canvas directly to points – the workaround is to alway oversize the images and always set the width
  7. whitespace behavior is completely different from html

Here are the resources used for the spike:

The PDF is output as a base 64 string dumped to an iFrame.  On iPads iFrames and other frame panels don’t scroll appropriately without some trickery.

General problems with pdfs in the mobile app:

Related Stories

{{ table query: SELECT Number, Name, Owner, 'Status' WHERE Type = Story and Feature = THIS CARD ORDER BY Status }}

Test Plan

githubbob42 commented 7 years ago

Scott Mercer : 01/20/2017 10:20 CST Additional thoughts: 1) Back Office support needs to be available fairly early on in the beta testing process. Pioneer will need Back Office support upon go live of this functionality. Further, it shortens the feedback loop for report developers as they are incrementally building up their reports. 2) Some style and templating features may be helpful as a future enhancement. However, these should only be considered after we get the current functionality live and get a few HTML report conversions under our belt.

githubbob42 commented 7 years ago

Scott Mercer : 01/20/2017 10:15 CST Reviewed the sample reference and meta-language with David this morning. XML Schema is flexible enough to do everything that I need to do. I like the fact that the XML is different enough from HTML such that users cannot hack it with an HTML WYSIWYG editor. Once the initial spec goes into beta, I will convert the existing Pioneer Job report. That report has a non-uniform header, so it will be a good test of the table header rendering with no universal document header.