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

XFA - Add support to print XFA forms #13411

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Conversation

calixteman
Copy link
Contributor

No description provided.

web/pdf_print_service.js Outdated Show resolved Hide resolved
web/base_viewer.js Outdated Show resolved Hide resolved
web/base_viewer.js Outdated Show resolved Hide resolved
web/base_viewer.js Outdated Show resolved Hide resolved
@calixteman
Copy link
Contributor Author

@Snuffleupagus, I tried to implement print stuff in firefox_print_service.js but I'm kind of stuck.
The only idea I had is to try to fallback on pdf_print_servive.js in case of xfa document since I don't render xfa on a canvas: is it a good idea or not ?

@Snuffleupagus
Copy link
Collaborator

I tried to implement print stuff in firefox_print_service.js but I'm kind of stuck.

Stuck how, what did/didn't work?

is it a good idea or not ?

Not really, since that code isn't actually bundled in MOZCENTRAL-builds (and switching between two separate implementations at runtime feels messy).

@calixteman
Copy link
Contributor Author

I tried to implement print stuff in firefox_print_service.js but I'm kind of stuck.

Stuck how, what did/didn't work?

I copied/pasted the code I wrote for pdf_print_service.js (in renderPage) at the beginning of composePage but the printed pages are white.
My guess is that the "rendering" is not sync so the printed html doesn't contain the html for each page.
So ideally we should block until all the promises are resolved before returning from composePage but afaik it isn't possible.

is it a good idea or not ?

Not really, since that code isn't actually bundled in MOZCENTRAL-builds (and switching between two separate implementations at runtime feels messy).

@calixteman calixteman marked this pull request as ready for review May 27, 2021 16:07
web/ui_utils.js Outdated Show resolved Hide resolved
@calixteman calixteman merged commit f2ade67 into mozilla:master Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants