Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2729

[PATCH] Allow customizing FOUserAgent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2
    • None
    • None
    • None
    • Patch

    Description

      It used to be possible to provide default page dimensions on a per-UA basis. This was useful because the needed page dimensions may change for different runs (Fop instances) in the same application (same FopFactory instance). An application of mine needs this: the page dimensions are set to whatever the user previously entered in the Page Setup dialog.

      Since FOP 2.0, however, this is no longer possible, because there is no public or protected constructor to the FOUserAgent class. In my use case, that means there is no way to override the getPageWidth and getPageHeight methods.

      This patch makes FOUserAgent's constructor protected and take only a FopFactory parameter (so the resolver is still taken from the FopFactory). Applications needing to customize FOUserAgent's behavior can now do so.

      Attachments

        1. extensible-foua.patch
          3 kB
          Alex Hvostov

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahh Alex Hvostov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: