You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jiri Tyr <ji...@cern.ch> on 2008/06/10 11:18:32 UTC

PDF full screen mode...

Hello,

I would like to ask you if FOP can create a PDF file with a flag which 
would put Acrobat Reader to full screen mode. When I create a 
presentation in LaTeX PowerDot or Beamer, it creates PDF which ask the 
user of Acrobat Reader if he/she wants to allow the document to enter 
full screen mode.

Best Regards,
Jiri

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'm not aware of any patches submitted for this.

On 11.07.2008 11:31:18 Jiri Tyr wrote:
> Any progress in this topic? What is necessary to do to have this feature 
> in FOP?
> 
> Best Regards,
> Jiri
> 
> 
> Andreas Delmelle wrote:
> > On Jun 11, 2008, at 17:42, Philipp Wagner wrote:
> > 
> >> Andreas Delmelle schrieb:
> >>> Remains the question of how to add this hint in the FO-file, and 
> >>> output the /PageMode tag in the catalog when needed.
> >>
> >> I just had a look how other formatters are doing that.
> >>
> >> Antenna House uses a document-info tag below the <fo:root> element, 
> >> see the specs here: http://www.antennahouse.com/xslfo/axf3-extension.htm
> >>
> >> RenderX XEP does it using a processing instruction like
> >> <?xep-pdf-view-mode full-screen?>
> >> specs: http://www.renderx.com/reference.html#Initial_Zoom
> >>
> >> I actually like the Antenna House variant a bit better, but 
> >> document-info seems still to be the wrong name for it ;)
> > 
> > Personally, I was thinking in that direction, but something like 
> > fox:pdf-catalog, which would not only allow users to specify the 
> > /PageMode, but basically anything that can be provided there (also the 
> > more general /ViewerPreferences for example...) Obviously, that 
> > extension element would be completely ignored for other output formats.
> > 
> > Anyway: Thanks for looking this up and sharing the info!
> > 
> > Cheers
> > 
> > Andreas




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by "kindaian@gmail.com" <ki...@gmail.com>.
On my computer, the example crashed, but i blame windows vista, acrobat 
viewer and a butterfly flapping it's wings in the other side of the 
world... (but worked until it crashed so heads up, nice work)...
;)


Jiri Tyr wrote:
> Hi Andreas,
>
> thank you for your great work on this problem! The patch works well 
> for me. I'm looking to see it as a part of the FOP soon.
>
> By my opinion, this feature can provide more functions for the user 
> and can make FOP much closer (if not even better) to its rivals which 
> implemented this feature already long time ago.
>
> Thank you and all the FOP developers for so great job on this unique 
> piece of software! I believe that most of the red fields disappear at 
> the Compliance Page in the near future and you will finally release so 
> long time expected FOP 1.0.
>
> Cheers,
> Jiri
>
>
> Andreas Delmelle wrote:
>> On Jul 14, 2008, at 20:30, Andreas Delmelle wrote:
>>
>> <snip />
>>> I haven't looked into implementing subdictionaries yet (which would 
>>> be necessary for the ViewerPreferences or OpenAction)
>>
>> FWIW: just played with it some more, and the updated patch attached 
>> to Bugzilla #45390 already contains minimal support for 
>> ViewerPreferences.
>>
>> So, apart from specifying the initial view, you can also influence 
>> the default view once the user exits full-screen mode.
>>
>> PDF arrays are not yet implemented, so the most basic OpenAction is 
>> still out of reach...
>>
>> Enjoy!
>>
>>
>> Cheers
>>
>> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
Hi Andreas,

thank you for your great work on this problem! The patch works well for 
me. I'm looking to see it as a part of the FOP soon.

By my opinion, this feature can provide more functions for the user and 
can make FOP much closer (if not even better) to its rivals which 
implemented this feature already long time ago.

Thank you and all the FOP developers for so great job on this unique 
piece of software! I believe that most of the red fields disappear at 
the Compliance Page in the near future and you will finally release so 
long time expected FOP 1.0.

Cheers,
Jiri


Andreas Delmelle wrote:
> On Jul 14, 2008, at 20:30, Andreas Delmelle wrote:
> 
> <snip />
>> I haven't looked into implementing subdictionaries yet (which would be 
>> necessary for the ViewerPreferences or OpenAction)
> 
> FWIW: just played with it some more, and the updated patch attached to 
> Bugzilla #45390 already contains minimal support for ViewerPreferences.
> 
> So, apart from specifying the initial view, you can also influence the 
> default view once the user exits full-screen mode.
> 
> PDF arrays are not yet implemented, so the most basic OpenAction is 
> still out of reach...
> 
> Enjoy!
> 
> 
> Cheers
> 
> Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 14, 2008, at 20:30, Andreas Delmelle wrote:

<snip />
> I haven't looked into implementing subdictionaries yet (which would  
> be necessary for the ViewerPreferences or OpenAction)

FWIW: just played with it some more, and the updated patch attached  
to Bugzilla #45390 already contains minimal support for  
ViewerPreferences.

So, apart from specifying the initial view, you can also influence  
the default view once the user exits full-screen mode.

PDF arrays are not yet implemented, so the most basic OpenAction is  
still out of reach...

Enjoy!


Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 14, 2008, at 11:55, Jiri Tyr wrote:

Hi Jiri

> I have found one error now. The pdf:dictionary definition works  
> only if it is placed in the fo:root only and before the fo:page- 
> sequence. If you place it into the fo:layout-master-set or after  
> the fo:page-sequence it doesn't work. See the example in the  
> attachment.

Yep, just noticed myself, and IIC from the code, then extension- 
attachments currently are only processed for a very limited set of FOs.

I was confusing things with the fox:destination extension, which  
attaches itself to the fo:root, so it can be specified anywhere in  
the document.

The pdf:dictionary extension will currently only work either as a  
child of fo:root or fo:declarations. I guess it can be made to add  
itself as an attachment to the root, since that's where it belongs...  
OTOH, we could also make those the rules and add some validation  
events if the dictionary appears elsewhere in the document. If  
necessary, we can always make an exception for special types of  
dictionary later (?)

I haven't looked into implementing subdictionaries yet (which would  
be necessary for the ViewerPreferences or OpenAction)
The fact that the pdf:entry child nodes are added as extension  
attachments to the parent extension node, is probably not the best  
way... that's what looks so awkward about  
PDFRenderer.renderPDFExtension(), passing the attachment as an  
argument, thereby obtaining the dictionary object, and then having to  
check its extension attachments to extract the entries (?) Not sure,  
but I guess PDFDictionaryExtension could just add the entries as  
'normal' child nodes. Instead of having to pass through  
PDFExtensionAttachment for each entry, via getChildNodes() we'd  
immediately get an iterator over the entries/subdictionaries.

Once in place, though, I think the infrastructure could open up some / 
very/ interesting possibilities...


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
I have found one error now. The pdf:dictionary definition works only if 
it is placed in the fo:root only and before the fo:page-sequence. If you 
place it into the fo:layout-master-set or after the fo:page-sequence it 
doesn't work. See the example in the attachment.

Jiri


Jiri Tyr wrote:
> Hi Andreas,
> 
> I just tested your patch and it works well for me!!!!! Thank you very 
> much for your effort!
> 
> What's necessary to do to add this patch to the main FOP branch?
> 
> Cheers,
> Jiri
> 
> 
> Andreas Delmelle wrote:
>> On Jul 11, 2008, at 22:13, Andreas Delmelle wrote:
>>
>>> On Jul 11, 2008, at 17:13, paul womack wrote:
>>>
>>> Hi
>>>
>>> <snip />
>>>
>>> All splendid ideas! Now let's hope someone finds the time to do 
>>> something with them.
>>
>> ... and so I found some time myself to look into it.
>>
>> I've opened Bugzilla #45390, and attached a prototype patch there. 
>> Still some questionable things remaining, but it does work basically.
>>
>> At least interested parties now have a starting-point.
>>
>> HTH!
>>
>> Cheers
>>
>> Andreas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 14, 2008, at 10:32, Jiri Tyr wrote:

> Hi Andreas,
>
> I just tested your patch and it works well for me!!!!! Thank you  
> very much for your effort!

You're welcome.

> What's necessary to do to add this patch to the main FOP branch?

Mostly some fine-tuning.

Currently, the specified entries will only be correctly processed if  
they are of type 'name'. I haven't tried what happens with 'boolean'  
entries for example...

Also, I'm almost certain serialization needs to be looked at. I  
haven't run any tests with the Intermediate Format yet, so I have no  
idea whether the extension will survive in the area tree when  
serialized (?)

The code in PDFRenderer.renderPDFExtension() also still feels a bit  
awkward to my taste. I'm thinking there has to be a more elegant way  
of handling that (?)


Still, it worked, so I thought I'd post what I had, so that if  
somebody else wants to have a go, they don't need to start from  
scratch, but have a working example of where the changes should be  
made to achieve the desired effect.


Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
Hi Andreas,

I just tested your patch and it works well for me!!!!! Thank you very 
much for your effort!

What's necessary to do to add this patch to the main FOP branch?

Cheers,
Jiri


Andreas Delmelle wrote:
> On Jul 11, 2008, at 22:13, Andreas Delmelle wrote:
> 
>> On Jul 11, 2008, at 17:13, paul womack wrote:
>>
>> Hi
>>
>> <snip />
>>
>> All splendid ideas! Now let's hope someone finds the time to do 
>> something with them.
> 
> ... and so I found some time myself to look into it.
> 
> I've opened Bugzilla #45390, and attached a prototype patch there. Still 
> some questionable things remaining, but it does work basically.
> 
> At least interested parties now have a starting-point.
> 
> HTH!
> 
> Cheers
> 
> Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 11, 2008, at 22:13, Andreas Delmelle wrote:

> On Jul 11, 2008, at 17:13, paul womack wrote:
>
> Hi
>
> <snip />
>
> All splendid ideas! Now let's hope someone finds the time to do  
> something with them.

... and so I found some time myself to look into it.

I've opened Bugzilla #45390, and attached a prototype patch there.  
Still some questionable things remaining, but it does work basically.

At least interested parties now have a starting-point.

HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 11, 2008, at 17:13, paul womack wrote:

Hi

<snip />

All splendid ideas! Now let's hope someone finds the time to do  
something with them.

I've updated the Wiki, taking into account Paul's suggestions.
I agree that the default extension namespace is not the right place,  
since it's limited to one output format (PDF).
Using dash-separated names and values, which then need to be  
converted to CamelCase anyway, seemed unnecessary. Maybe it looks a  
bit more esthetically pleasing when viewing the FO source, but it  
introduces the need to 'parse' the names/values (or rather: make them  
parsable for a PDF Viewer)

I think using the same terminology as in the PDF Reference makes  
sense here. Maybe, in the future, the same infrastructure can be used  
to create other kinds of dictionaries (the ViewerPreferences  
dictionary is already one very good example).

A bit more complex to implement than Jeremias' proposal (which  
requires only one extension element, with a lot of attributes), but  
well worth the effort to investigate.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by paul womack <pw...@papermule.co.uk>.
Jeremias Maerki wrote:
> Ah well, my afternoon's almost over anyway...
> 
> Here's a proposal:
> http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPdf
> 
> Feel free to improve/comment/fix.
> 
> In FO that would look like this:
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>   <fo:layout-master-set>
>     <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
>       <fo:region-body/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>   <fo:declarations>
>     <pdf:document-settings
>        xmlns:pdf="http://xmlgraphics.apache.org/fop/pdf"
>        page-mode="full-screen"/>
>   </fo:declarations>
>   <fo:page-sequence master-reference="A4">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:block>Hello World!</fo:block>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>

At the risk of creating the ultimate "back door"

    <fo:declarations>
      <pdf:document-settings
         xmlns:pdf="http://xmlgraphics.apache.org/fop/pdf">
          <pdf:setting attribute="page-mode" value="full-screen"/>
      <pdf:document-settings
    </fo:declarations>

i.e. a pdf-setting element, with "open" scope.
It's more forward extensible/open to abuse (*)

    BugBear

(*) delete according to taste

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Ah well, my afternoon's almost over anyway...

Here's a proposal:
http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPdf

Feel free to improve/comment/fix.

In FO that would look like this:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:declarations>
    <pdf:document-settings
       xmlns:pdf="http://xmlgraphics.apache.org/fop/pdf"
       page-mode="full-screen"/>
  </fo:declarations>
  <fo:page-sequence master-reference="A4">
    <fo:flow flow-name="xsl-region-body">
      <fo:block>Hello World!</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>



On 11.07.2008 16:21:55 Jiri Tyr wrote:
> OK, I understand. Could you then send me some XPM demo and your 
> imagination how should be the fox:pdf-catalog implemented in FO file? 
> Then I will try to implement it by my self or find/hire somebody who 
> could do it for me ;o)
> 
> Jeremias Maerki wrote:
> > On 11.07.2008 15:52:12 Jiri Tyr wrote:
> >> And could you forward this our conversation to the fop-dev mailing list? 
> > 
> > Not necessary as all committers are required to be on fop-users, too.
> > They can look this up.
> > 
> >> Maybe somebody could implement it faster and better than me.
> > 
> > Maybe. But you might not find anyone with the time and motivation to do
> > it. It always boils down to the three options of Open Source:
> >    1. This is open source software, you can do it yourself.
> >    2. This is open source software, you can wait until someone has free time and thinks this is fun to implement.
> >    3. Or you can find/hire someone to do it for you.
> > ;-)
> > 
> >> Jeremias Maerki wrote:
> >>> I'll defer to the interested parties to design that. I haven't looked
> >>> into what would be necessary to have. But design work should probably be
> >>> done over on fop-dev@xmlgraphics.apache.org.
> >>>
> >>> On 11.07.2008 15:22:03 Jiri Tyr wrote:
> >>>> Can you send me some example of FO with the fox:pdf-catalog example? 
> >>>> Then I could try to investigate if I can clone and modify the XMP for 
> >>>> this purpose.
> >>>>
> >>>> Jiri
> >>>>
> >>>>
> >>>> Jeremias Maerki wrote:
> >>>>> Take a look at the XMP metadata extension which is quite similar to
> >>>>> what's necessary here:
> >>>>> src/java/org/apache/fop/fo/extensions/xmp/*.java
> >>>>> The PDFRenderer has to be extended, too, to catch the
> >>>>> ExtensionAttachment subclass for the extension and react on it.
> >>>>>
> >>>>> It's not too difficult to implement this but it takes a few changes in
> >>>>> at least three packages. It also requires learning a bit about PDF so
> >>>>> you can extend the PDF library accordingly. HTH
> >>>>>
> >>>>> On 11.07.2008 14:27:59 Jiri Tyr wrote:
> >>>>>> So it is necessary to create some special interface for this purpose? I 
> >>>>>> mean some general interface for input from a config file and from FO 
> >>>>>> file. If this interface exists it should not be difficult to change any 
> >>>>>> property from users Java program.
> >>>>>>
> >>>>>> How difficult it can be to implement such think in FOP? If somebody have 
> >>>>>> a time to sketch out the solution, it would be great.
> >>>>>>
> >>>>>> Jiri
> >>>>>>
> >>>>>>
> >>>>>> Jeremias Maerki wrote:
> >>>>>>> Yes, the FO spec allows that. Please realize that some people want one
> >>>>>>> feature to be configurable in the config file. Others want to access it
> >>>>>>> programmatically. And others want to include it in the FO file. Often we
> >>>>>>> end up doing the same in more than one places.
> >>>>>>>
> >>>>>>> On 11.07.2008 12:27:09 Justus-bulk wrote:
> >>>>>>>> Are processor-specific fo extensions really the generally-accepted way
> >>>>>>>> to go? I'd hesitate because this requires processor-specific XSLT
> >>>>>>>> customizations. Are there really no better ways to to pass
> >>>>>>>> document-specific parameters to the FO processor: command-line
> >>>>>>>> options, .properties files, ...
> 
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
OK, I understand. Could you then send me some XPM demo and your 
imagination how should be the fox:pdf-catalog implemented in FO file? 
Then I will try to implement it by my self or find/hire somebody who 
could do it for me ;o)

Jeremias Maerki wrote:
> On 11.07.2008 15:52:12 Jiri Tyr wrote:
>> And could you forward this our conversation to the fop-dev mailing list? 
> 
> Not necessary as all committers are required to be on fop-users, too.
> They can look this up.
> 
>> Maybe somebody could implement it faster and better than me.
> 
> Maybe. But you might not find anyone with the time and motivation to do
> it. It always boils down to the three options of Open Source:
>    1. This is open source software, you can do it yourself.
>    2. This is open source software, you can wait until someone has free time and thinks this is fun to implement.
>    3. Or you can find/hire someone to do it for you.
> ;-)
> 
>> Jeremias Maerki wrote:
>>> I'll defer to the interested parties to design that. I haven't looked
>>> into what would be necessary to have. But design work should probably be
>>> done over on fop-dev@xmlgraphics.apache.org.
>>>
>>> On 11.07.2008 15:22:03 Jiri Tyr wrote:
>>>> Can you send me some example of FO with the fox:pdf-catalog example? 
>>>> Then I could try to investigate if I can clone and modify the XMP for 
>>>> this purpose.
>>>>
>>>> Jiri
>>>>
>>>>
>>>> Jeremias Maerki wrote:
>>>>> Take a look at the XMP metadata extension which is quite similar to
>>>>> what's necessary here:
>>>>> src/java/org/apache/fop/fo/extensions/xmp/*.java
>>>>> The PDFRenderer has to be extended, too, to catch the
>>>>> ExtensionAttachment subclass for the extension and react on it.
>>>>>
>>>>> It's not too difficult to implement this but it takes a few changes in
>>>>> at least three packages. It also requires learning a bit about PDF so
>>>>> you can extend the PDF library accordingly. HTH
>>>>>
>>>>> On 11.07.2008 14:27:59 Jiri Tyr wrote:
>>>>>> So it is necessary to create some special interface for this purpose? I 
>>>>>> mean some general interface for input from a config file and from FO 
>>>>>> file. If this interface exists it should not be difficult to change any 
>>>>>> property from users Java program.
>>>>>>
>>>>>> How difficult it can be to implement such think in FOP? If somebody have 
>>>>>> a time to sketch out the solution, it would be great.
>>>>>>
>>>>>> Jiri
>>>>>>
>>>>>>
>>>>>> Jeremias Maerki wrote:
>>>>>>> Yes, the FO spec allows that. Please realize that some people want one
>>>>>>> feature to be configurable in the config file. Others want to access it
>>>>>>> programmatically. And others want to include it in the FO file. Often we
>>>>>>> end up doing the same in more than one places.
>>>>>>>
>>>>>>> On 11.07.2008 12:27:09 Justus-bulk wrote:
>>>>>>>> Are processor-specific fo extensions really the generally-accepted way
>>>>>>>> to go? I'd hesitate because this requires processor-specific XSLT
>>>>>>>> customizations. Are there really no better ways to to pass
>>>>>>>> document-specific parameters to the FO processor: command-line
>>>>>>>> options, .properties files, ...


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 11.07.2008 15:52:12 Jiri Tyr wrote:
> And could you forward this our conversation to the fop-dev mailing list? 

Not necessary as all committers are required to be on fop-users, too.
They can look this up.

> Maybe somebody could implement it faster and better than me.

Maybe. But you might not find anyone with the time and motivation to do
it. It always boils down to the three options of Open Source:
   1. This is open source software, you can do it yourself.
   2. This is open source software, you can wait until someone has free time and thinks this is fun to implement.
   3. Or you can find/hire someone to do it for you.
;-)

> Jeremias Maerki wrote:
> > I'll defer to the interested parties to design that. I haven't looked
> > into what would be necessary to have. But design work should probably be
> > done over on fop-dev@xmlgraphics.apache.org.
> > 
> > On 11.07.2008 15:22:03 Jiri Tyr wrote:
> >> Can you send me some example of FO with the fox:pdf-catalog example? 
> >> Then I could try to investigate if I can clone and modify the XMP for 
> >> this purpose.
> >>
> >> Jiri
> >>
> >>
> >> Jeremias Maerki wrote:
> >>> Take a look at the XMP metadata extension which is quite similar to
> >>> what's necessary here:
> >>> src/java/org/apache/fop/fo/extensions/xmp/*.java
> >>> The PDFRenderer has to be extended, too, to catch the
> >>> ExtensionAttachment subclass for the extension and react on it.
> >>>
> >>> It's not too difficult to implement this but it takes a few changes in
> >>> at least three packages. It also requires learning a bit about PDF so
> >>> you can extend the PDF library accordingly. HTH
> >>>
> >>> On 11.07.2008 14:27:59 Jiri Tyr wrote:
> >>>> So it is necessary to create some special interface for this purpose? I 
> >>>> mean some general interface for input from a config file and from FO 
> >>>> file. If this interface exists it should not be difficult to change any 
> >>>> property from users Java program.
> >>>>
> >>>> How difficult it can be to implement such think in FOP? If somebody have 
> >>>> a time to sketch out the solution, it would be great.
> >>>>
> >>>> Jiri
> >>>>
> >>>>
> >>>> Jeremias Maerki wrote:
> >>>>> Yes, the FO spec allows that. Please realize that some people want one
> >>>>> feature to be configurable in the config file. Others want to access it
> >>>>> programmatically. And others want to include it in the FO file. Often we
> >>>>> end up doing the same in more than one places.
> >>>>>
> >>>>> On 11.07.2008 12:27:09 Justus-bulk wrote:
> >>>>>> Are processor-specific fo extensions really the generally-accepted way
> >>>>>> to go? I'd hesitate because this requires processor-specific XSLT
> >>>>>> customizations. Are there really no better ways to to pass
> >>>>>> document-specific parameters to the FO processor: command-line
> >>>>>> options, .properties files, ...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
And could you forward this our conversation to the fop-dev mailing list? 
Maybe somebody could implement it faster and better than me.

Jeremias Maerki wrote:
> I'll defer to the interested parties to design that. I haven't looked
> into what would be necessary to have. But design work should probably be
> done over on fop-dev@xmlgraphics.apache.org.
> 
> On 11.07.2008 15:22:03 Jiri Tyr wrote:
>> Can you send me some example of FO with the fox:pdf-catalog example? 
>> Then I could try to investigate if I can clone and modify the XMP for 
>> this purpose.
>>
>> Jiri
>>
>>
>> Jeremias Maerki wrote:
>>> Take a look at the XMP metadata extension which is quite similar to
>>> what's necessary here:
>>> src/java/org/apache/fop/fo/extensions/xmp/*.java
>>> The PDFRenderer has to be extended, too, to catch the
>>> ExtensionAttachment subclass for the extension and react on it.
>>>
>>> It's not too difficult to implement this but it takes a few changes in
>>> at least three packages. It also requires learning a bit about PDF so
>>> you can extend the PDF library accordingly. HTH
>>>
>>> On 11.07.2008 14:27:59 Jiri Tyr wrote:
>>>> So it is necessary to create some special interface for this purpose? I 
>>>> mean some general interface for input from a config file and from FO 
>>>> file. If this interface exists it should not be difficult to change any 
>>>> property from users Java program.
>>>>
>>>> How difficult it can be to implement such think in FOP? If somebody have 
>>>> a time to sketch out the solution, it would be great.
>>>>
>>>> Jiri
>>>>
>>>>
>>>> Jeremias Maerki wrote:
>>>>> Yes, the FO spec allows that. Please realize that some people want one
>>>>> feature to be configurable in the config file. Others want to access it
>>>>> programmatically. And others want to include it in the FO file. Often we
>>>>> end up doing the same in more than one places.
>>>>>
>>>>> On 11.07.2008 12:27:09 Justus-bulk wrote:
>>>>>> Are processor-specific fo extensions really the generally-accepted way
>>>>>> to go? I'd hesitate because this requires processor-specific XSLT
>>>>>> customizations. Are there really no better ways to to pass
>>>>>> document-specific parameters to the FO processor: command-line
>>>>>> options, .properties files, ...


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'll defer to the interested parties to design that. I haven't looked
into what would be necessary to have. But design work should probably be
done over on fop-dev@xmlgraphics.apache.org.

On 11.07.2008 15:22:03 Jiri Tyr wrote:
> Can you send me some example of FO with the fox:pdf-catalog example? 
> Then I could try to investigate if I can clone and modify the XMP for 
> this purpose.
> 
> Jiri
> 
> 
> Jeremias Maerki wrote:
> > Take a look at the XMP metadata extension which is quite similar to
> > what's necessary here:
> > src/java/org/apache/fop/fo/extensions/xmp/*.java
> > The PDFRenderer has to be extended, too, to catch the
> > ExtensionAttachment subclass for the extension and react on it.
> > 
> > It's not too difficult to implement this but it takes a few changes in
> > at least three packages. It also requires learning a bit about PDF so
> > you can extend the PDF library accordingly. HTH
> > 
> > On 11.07.2008 14:27:59 Jiri Tyr wrote:
> >> So it is necessary to create some special interface for this purpose? I 
> >> mean some general interface for input from a config file and from FO 
> >> file. If this interface exists it should not be difficult to change any 
> >> property from users Java program.
> >>
> >> How difficult it can be to implement such think in FOP? If somebody have 
> >> a time to sketch out the solution, it would be great.
> >>
> >> Jiri
> >>
> >>
> >> Jeremias Maerki wrote:
> >>> Yes, the FO spec allows that. Please realize that some people want one
> >>> feature to be configurable in the config file. Others want to access it
> >>> programmatically. And others want to include it in the FO file. Often we
> >>> end up doing the same in more than one places.
> >>>
> >>> On 11.07.2008 12:27:09 Justus-bulk wrote:
> >>>> Are processor-specific fo extensions really the generally-accepted way
> >>>> to go? I'd hesitate because this requires processor-specific XSLT
> >>>> customizations. Are there really no better ways to to pass
> >>>> document-specific parameters to the FO processor: command-line
> >>>> options, .properties files, ...
> >>>>
> >>>> Justus
> >>>
> >>> Jeremias Maerki



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
Can you send me some example of FO with the fox:pdf-catalog example? 
Then I could try to investigate if I can clone and modify the XMP for 
this purpose.

Jiri


Jeremias Maerki wrote:
> Take a look at the XMP metadata extension which is quite similar to
> what's necessary here:
> src/java/org/apache/fop/fo/extensions/xmp/*.java
> The PDFRenderer has to be extended, too, to catch the
> ExtensionAttachment subclass for the extension and react on it.
> 
> It's not too difficult to implement this but it takes a few changes in
> at least three packages. It also requires learning a bit about PDF so
> you can extend the PDF library accordingly. HTH
> 
> On 11.07.2008 14:27:59 Jiri Tyr wrote:
>> So it is necessary to create some special interface for this purpose? I 
>> mean some general interface for input from a config file and from FO 
>> file. If this interface exists it should not be difficult to change any 
>> property from users Java program.
>>
>> How difficult it can be to implement such think in FOP? If somebody have 
>> a time to sketch out the solution, it would be great.
>>
>> Jiri
>>
>>
>> Jeremias Maerki wrote:
>>> Yes, the FO spec allows that. Please realize that some people want one
>>> feature to be configurable in the config file. Others want to access it
>>> programmatically. And others want to include it in the FO file. Often we
>>> end up doing the same in more than one places.
>>>
>>> On 11.07.2008 12:27:09 Justus-bulk wrote:
>>>> Are processor-specific fo extensions really the generally-accepted way
>>>> to go? I'd hesitate because this requires processor-specific XSLT
>>>> customizations. Are there really no better ways to to pass
>>>> document-specific parameters to the FO processor: command-line
>>>> options, .properties files, ...
>>>>
>>>> Justus
>>>
>>> Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Take a look at the XMP metadata extension which is quite similar to
what's necessary here:
src/java/org/apache/fop/fo/extensions/xmp/*.java
The PDFRenderer has to be extended, too, to catch the
ExtensionAttachment subclass for the extension and react on it.

It's not too difficult to implement this but it takes a few changes in
at least three packages. It also requires learning a bit about PDF so
you can extend the PDF library accordingly. HTH

On 11.07.2008 14:27:59 Jiri Tyr wrote:
> So it is necessary to create some special interface for this purpose? I 
> mean some general interface for input from a config file and from FO 
> file. If this interface exists it should not be difficult to change any 
> property from users Java program.
> 
> How difficult it can be to implement such think in FOP? If somebody have 
> a time to sketch out the solution, it would be great.
> 
> Jiri
> 
> 
> Jeremias Maerki wrote:
> > Yes, the FO spec allows that. Please realize that some people want one
> > feature to be configurable in the config file. Others want to access it
> > programmatically. And others want to include it in the FO file. Often we
> > end up doing the same in more than one places.
> > 
> > On 11.07.2008 12:27:09 Justus-bulk wrote:
> >> Are processor-specific fo extensions really the generally-accepted way
> >> to go? I'd hesitate because this requires processor-specific XSLT
> >> customizations. Are there really no better ways to to pass
> >> document-specific parameters to the FO processor: command-line
> >> options, .properties files, ...
> >>
> >> Justus
> > 
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
So it is necessary to create some special interface for this purpose? I 
mean some general interface for input from a config file and from FO 
file. If this interface exists it should not be difficult to change any 
property from users Java program.

How difficult it can be to implement such think in FOP? If somebody have 
a time to sketch out the solution, it would be great.

Jiri


Jeremias Maerki wrote:
> Yes, the FO spec allows that. Please realize that some people want one
> feature to be configurable in the config file. Others want to access it
> programmatically. And others want to include it in the FO file. Often we
> end up doing the same in more than one places.
> 
> On 11.07.2008 12:27:09 Justus-bulk wrote:
>> Are processor-specific fo extensions really the generally-accepted way
>> to go? I'd hesitate because this requires processor-specific XSLT
>> customizations. Are there really no better ways to to pass
>> document-specific parameters to the FO processor: command-line
>> options, .properties files, ...
>>
>> Justus
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Yes, the FO spec allows that. Please realize that some people want one
feature to be configurable in the config file. Others want to access it
programmatically. And others want to include it in the FO file. Often we
end up doing the same in more than one places.

On 11.07.2008 12:27:09 Justus-bulk wrote:
> Are processor-specific fo extensions really the generally-accepted way
> to go? I'd hesitate because this requires processor-specific XSLT
> customizations. Are there really no better ways to to pass
> document-specific parameters to the FO processor: command-line
> options, .properties files, ...
> 
> Justus


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 11, 2008, at 12:27, Justus-bulk@Piater.name wrote:

> Are processor-specific fo extensions really the generally-accepted way
> to go? I'd hesitate because this requires processor-specific XSLT
> customizations.

Re-reading this, I find it worth mentioning that the latest sketch/ 
prototype outlined on the Wiki could easily be called almost  
processor-agnostic. The only thing tying it to FOP is its namespace.  
It is an extension specifically targeting PDF output, mapping names/ 
concepts from the PDF Reference to XML. Strictly speaking, it belongs  
in a more public namespace. If tomorrow AH or XEP decide to support  
the same structure, that would lead to much better portability, but  
that's not our decision.

BTW, I haven't looked into it, but the same structure could maybe be  
usable in the context of the config file (if foreign XML is allowed  
there; maybe as a URI to a small attachment, to be added by the  
parser after every startElement(FO_URI, "root"...)).


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Ju...@Piater.name.
Are processor-specific fo extensions really the generally-accepted way
to go? I'd hesitate because this requires processor-specific XSLT
customizations. Are there really no better ways to to pass
document-specific parameters to the FO processor: command-line
options, .properties files, ...

Justus

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Jiri Tyr <ji...@cern.ch>.
Any progress in this topic? What is necessary to do to have this feature 
in FOP?

Best Regards,
Jiri


Andreas Delmelle wrote:
> On Jun 11, 2008, at 17:42, Philipp Wagner wrote:
> 
>> Andreas Delmelle schrieb:
>>> Remains the question of how to add this hint in the FO-file, and 
>>> output the /PageMode tag in the catalog when needed.
>>
>> I just had a look how other formatters are doing that.
>>
>> Antenna House uses a document-info tag below the <fo:root> element, 
>> see the specs here: http://www.antennahouse.com/xslfo/axf3-extension.htm
>>
>> RenderX XEP does it using a processing instruction like
>> <?xep-pdf-view-mode full-screen?>
>> specs: http://www.renderx.com/reference.html#Initial_Zoom
>>
>> I actually like the Antenna House variant a bit better, but 
>> document-info seems still to be the wrong name for it ;)
> 
> Personally, I was thinking in that direction, but something like 
> fox:pdf-catalog, which would not only allow users to specify the 
> /PageMode, but basically anything that can be provided there (also the 
> more general /ViewerPreferences for example...) Obviously, that 
> extension element would be completely ignored for other output formats.
> 
> Anyway: Thanks for looking this up and sharing the info!
> 
> Cheers
> 
> Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 11, 2008, at 17:42, Philipp Wagner wrote:

> Andreas Delmelle schrieb:
>> Remains the question of how to add this hint in the FO-file, and  
>> output the /PageMode tag in the catalog when needed.
>
> I just had a look how other formatters are doing that.
>
> Antenna House uses a document-info tag below the <fo:root> element,  
> see the specs here: http://www.antennahouse.com/xslfo/axf3- 
> extension.htm
>
> RenderX XEP does it using a processing instruction like
> <?xep-pdf-view-mode full-screen?>
> specs: http://www.renderx.com/reference.html#Initial_Zoom
>
> I actually like the Antenna House variant a bit better, but  
> document-info seems still to be the wrong name for it ;)

Personally, I was thinking in that direction, but something like  
fox:pdf-catalog, which would not only allow users to specify the / 
PageMode, but basically anything that can be provided there (also the  
more general /ViewerPreferences for example...) Obviously, that  
extension element would be completely ignored for other output formats.

Anyway: Thanks for looking this up and sharing the info!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Philipp Wagner <li...@philipp-wagner.com>.
Andreas Delmelle schrieb:
> Remains the question of how to add this hint in the FO-file, and output 
> the /PageMode tag in the catalog when needed.

I just had a look how other formatters are doing that.

Antenna House uses a document-info tag below the <fo:root> element, see 
the specs here: http://www.antennahouse.com/xslfo/axf3-extension.htm

RenderX XEP does it using a processing instruction like
<?xep-pdf-view-mode full-screen?>
specs: http://www.renderx.com/reference.html#Initial_Zoom

I actually like the Antenna House variant a bit better, but 
document-info seems still to be the wrong name for it ;)

Philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 10, 2008, at 13:16, Andreas Delmelle wrote:

> On Jun 10, 2008, at 11:18, Jiri Tyr wrote:
>
>> I would like to ask you if FOP can create a PDF file with a flag  
>> which would put Acrobat Reader to full screen mode. When I create  
>> a presentation in LaTeX PowerDot or Beamer, it creates PDF which  
>> ask the user of Acrobat Reader if he/she wants to allow the  
>> document to enter full screen mode.
>
> The short answer: To my knowledge, FOP currently offers no such  
> possibility...
>
> The longer answer:
> ... yet. IIC, it shouldn't be too difficult to tie in support for  
> something like this, but I'd need a closer look at the PDF spec to  
> say for sure.

Just took a very quick look, and the relevant part of the PDF  
Reference (v1.5) is "3.6.1 Document Catalog". In the catalog, an  
entry /PageMode can be set to "FullScreen" to obtain the effect that  
you seem to be looking for.

Remains the question of how to add this hint in the FO-file, and  
output the /PageMode tag in the catalog when needed.



Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF full screen mode...

Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 10, 2008, at 11:18, Jiri Tyr wrote:

> I would like to ask you if FOP can create a PDF file with a flag  
> which would put Acrobat Reader to full screen mode. When I create a  
> presentation in LaTeX PowerDot or Beamer, it creates PDF which ask  
> the user of Acrobat Reader if he/she wants to allow the document to  
> enter full screen mode.

The short answer: To my knowledge, FOP currently offers no such  
possibility...

The longer answer:
... yet. IIC, it shouldn't be too difficult to tie in support for  
something like this, but I'd need a closer look at the PDF spec to  
say for sure. For PDF /GoTo and /GoToR actions, I know it is possible  
to specify some settings/hints for the viewer application. In theory,  
such hints could be passed to the renderer via extension properties/ 
attributes on the fo:basic-link element. I guess something similar is  
possible for specifying settings to use when opening the PDF itself.

If anyone feels like diving into it, patches are always welcome. For  
pointers into the related code, just drop us a line on fop-dev@


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org