Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combined PDF download sometimes corrupted (large lists) #174

Closed
wvengen opened this issue Jan 29, 2016 · 4 comments
Closed

Combined PDF download sometimes corrupted (large lists) #174

wvengen opened this issue Jan 29, 2016 · 4 comments

Comments

@wvengen
Copy link
Member

wvengen commented Jan 29, 2016

Some members report that they can't download the combined article and/or ordergroup PDFs at all, which is served by the current_orders plugin. Sometimes re-downloading makes it work, but apparently not always.

Possible solutions (perhaps):

  • Stream PDF
  • Generate PDF in background job (good idea anyway), re-generate when something changes
  • Download in smaller fragments
@wvengen
Copy link
Member Author

wvengen commented Jan 29, 2016

Blocker for VKMK dry ordering, since that will generate even larger PDFs.

@wvengen
Copy link
Member Author

wvengen commented Jun 4, 2016

I haven't found prior work regarding streaming PDFs with prawn. Advice is background job.

Step 1

  • Make sure all data is preloaded and we can figure out whether a PDF is stale or not.

Perhaps this already improves loading times, in case missing preloading is the problem here.

Step 2 (when needed)

  • Move PDF rendering to background job
  • If PDF isn't up-to-date, start background job
  • If PDF is up-to-date, serve generated file
  • Add animating 'working on it' icon to download button if background isn't finished yet
  • If PDF isn't up-to-date, wait for a couple of seconds before responding - serve if already finished

First do this upstream, then move it here.

@wvengen
Copy link
Member Author

wvengen commented Jun 11, 2016

I think Step 1 will fix this. Let's see.
If it remains a problem, please reopen.

@wvengen wvengen closed this as completed Jun 11, 2016
@wvengen
Copy link
Member Author

wvengen commented Jun 25, 2016

This may not be fully solved yet :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant