Deploying WebViewer App as PWA

57 views
Skip to first unread message

David Compton

unread,
Nov 14, 2017, 11:47:53 AM11/14/17
to PDFTron WebViewer

I'm trying to add pre-caching of static files and assets to my application using workbox in order to turn my web application into a PWA.  There are a few large files contained in the PDFTron html5 source:

html5/office/WebOfficeWorker.js
html5/office/WebOfficeWorker.js.mem
html5/office/WebOfficeWorker.pexe
html5/pdf/PDFNetC.js
html5/pdf/PDFWorker.ext

These 5 files total 68 mb out of a total 85 mb in the html5 folder.

My question is do all of these files need to be deployed to my web server?

Kind regards,

David

Justin Jung

unread,
Nov 14, 2017, 2:46:24 PM11/14/17
to PDFTron WebViewer on behalf of David Compton
It depends on what document types you'd need to support.
If you are supporting pdf, you do need files from pdf folder.
If you are supporting office, you need files from both pdf and office folders.

Justin Jung
Software Developer
PDFTron Systems Inc.

David Compton

unread,
Nov 15, 2017, 11:47:34 AM11/15/17
to PDFTron WebViewer on behalf of Justin Jung
Hi Justin,

I thought that was probably the case.  Do you have documentation that details just which files need to be deployed if you are only supporting XOD files (as we are).  I have removed the PDF and Office folders - there are also some php files that I presume are not needed (I had to exclude them from the offline cache anyway).  Removing those 2 folders reduced the size of files I was distributing from 85 mb down to about 5mb.  I'd like to remove anything else that is not required.  

Thanks,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webviewer+unsubscribe@googlegroups.com.
To post to this group, send email to pdfnet-webviewer@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.
For more options, visit https://groups.google.com/d/optout.

Justin Jung

unread,
Nov 15, 2017, 7:08:42 PM11/15/17
to pdfnet-w...@googlegroups.com
WebViewer is designed as a frontend solution that can handle multiple document types, and thus those files are included as default.
But you are right, perhaps we should clarify to avoid our clients from including unnecessary files.

You can safely remove the php files, and lib/html5/doc folder as well.
Reply all
Reply to author
Forward
0 new messages