|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
supress object printi need the ability to view object on pdf when viewed from pc,but hide it when printed.
code below name.xml <name>John</name> nametofo.xsl <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin="2cm"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="A4-portrait" > <fo:flow flow-name="xsl-region-body"> <fo:block > Hello, <xsl:value-of select="name"/>! </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> Run command fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf can it be done? Tried visibility="hidden" does not work. |
|
|
Re: supress object printYou seem to be using Apache FOP. As you can see at [1], Apache FOP doesn't support the "visibility" property, yet. Still, I don't think the "visibility" property is what you would need to make a distinction between print and display. The spec doesn't make this distinction. Maybe an extension to "visibility" would be necessary. Do other FO implementations support this? And how did they implement it? Using the Optional Content feature in PDF 1.5? I haven't found any references, yet. [1] http://xmlgraphics.apache.org/fop/compliance.html#fo-property-visibility On 02.07.2008 17:41:05 good_guddu wrote: > > i need the ability to view object on pdf when viewed from pc,but hide it when > printed. > code below > > name.xml > > <name>John</name> > > nametofo.xsl > > <?xml version="1.0" encoding="utf-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <xsl:output method="xml" indent="yes"/> > <xsl:template match="/"> > <fo:root> > <fo:layout-master-set> > <fo:simple-page-master master-name="A4-portrait" > page-height="29.7cm" page-width="21.0cm" margin="2cm"> > <fo:region-body/> > </fo:simple-page-master> > </fo:layout-master-set> > <fo:page-sequence master-reference="A4-portrait" > > <fo:flow flow-name="xsl-region-body"> > <fo:block > > Hello, <xsl:value-of select="name"/>! > </fo:block> > </fo:flow> > </fo:page-sequence> > </fo:root> > </xsl:template> > </xsl:stylesheet> > > Run command > fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf > > can it be done? > Tried visibility="hidden" does not work. > -- > View this message in context: http://www.nabble.com/supress-object-print-tp18240529p18240529.html > Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com. > > Jeremias Maerki |
|
|
Re: supress object printI agree with assesment below,but what are my options to go about the task?
how can i control the print behaviour?
|
|
|
Re: supress object printYou can't, at least not with Apache FOP. I'm really curious if other implementations support this (and how). On 08.07.2008 22:09:40 good_guddu wrote: > > > I agree with assesment below,but what are my options to go about the task? > > how can i control the print behaviour? > > > Jeremias Maerki-2 wrote: > > > > > > You seem to be using Apache FOP. As you can see at [1], Apache FOP > > doesn't support the "visibility" property, yet. Still, I don't think the > > "visibility" property is what you would need to make a distinction > > between print and display. The spec doesn't make this distinction. Maybe > > an extension to "visibility" would be necessary. > > > > Do other FO implementations support this? And how did they implement it? > > Using the Optional Content feature in PDF 1.5? I haven't found any > > references, yet. > > > > [1] > > http://xmlgraphics.apache.org/fop/compliance.html#fo-property-visibility > > > > On 02.07.2008 17:41:05 good_guddu wrote: > >> > >> i need the ability to view object on pdf when viewed from pc,but hide it > >> when > >> printed. > >> code below > >> > >> name.xml > >> > >> <name>John</name> > >> > >> nametofo.xsl > >> > >> <?xml version="1.0" encoding="utf-8"?> > >> <xsl:stylesheet version="1.0" > >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > >> xmlns:fo="http://www.w3.org/1999/XSL/Format"> > >> <xsl:output method="xml" indent="yes"/> > >> <xsl:template match="/"> > >> <fo:root> > >> <fo:layout-master-set> > >> <fo:simple-page-master master-name="A4-portrait" > >> page-height="29.7cm" page-width="21.0cm" margin="2cm"> > >> <fo:region-body/> > >> </fo:simple-page-master> > >> </fo:layout-master-set> > >> <fo:page-sequence master-reference="A4-portrait" > > >> <fo:flow flow-name="xsl-region-body"> > >> <fo:block > > >> Hello, <xsl:value-of select="name"/>! > >> </fo:block> > >> </fo:flow> > >> </fo:page-sequence> > >> </fo:root> > >> </xsl:template> > >> </xsl:stylesheet> > >> > >> Run command > >> fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf > >> > >> can it be done? > >> Tried visibility="hidden" does not work. > >> -- > >> View this message in context: > >> http://www.nabble.com/supress-object-print-tp18240529p18240529.html > >> Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com. > >> > >> > > > > > > > > > > Jeremias Maerki > > > > > > > > > > -- > View this message in context: http://www.nabble.com/supress-object-print-tp18240529p18347987.html > Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com. > Jeremias Maerki |
|
|
Re: supress object printOn Wed, Jul 09 2008 08:07:16 +0100, dev@... wrote: > You can't, at least not with Apache FOP. I'm really curious if other > implementations support this (and how). ... >> > On 02.07.2008 17:41:05 good_guddu wrote: ... >> >> can it be done? >> >> Tried visibility="hidden" does not work. AntennaHouse says they do it [1], RenderX says they don't [2]. xmlroff doesn't do it. It doesn't seem to be that hard to implement: you'd just need to not draw certain areas in the area tree. Regards, Tony Graham Tony.Graham@... Director W3C XSL FO SG Invited Expert Menteith Consulting Ltd XML, XSL and XSLT consulting, programming and training Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland Registered in Ireland - No. 428599 http://www.menteithconsulting.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- xmlroff XSL Formatter http://xmlroff.org xslide Emacs mode http://www.menteith.com/wiki/xslide Unicode: A Primer urn:isbn:0-7645-4625-2 [1] http://www.antennahouse.com/xslfo/axf4fo.htm [2] http://www.renderx.com/reference.html |
|
|
Re: supress object printPlain visibility="hidden" is easy (somebody simply has to implement it in FOP). You're right there. But the poster actually wants some content to appear in the PDF viewer which should not be printed. And that requires some special PDF features if it's possible at all. On 09.07.2008 12:00:38 Tony Graham wrote: > > On Wed, Jul 09 2008 08:07:16 +0100, dev@... wrote: > > You can't, at least not with Apache FOP. I'm really curious if other > > implementations support this (and how). > ... > >> > On 02.07.2008 17:41:05 good_guddu wrote: > ... > >> >> can it be done? > >> >> Tried visibility="hidden" does not work. > > AntennaHouse says they do it [1], RenderX says they don't [2]. xmlroff > doesn't do it. > > It doesn't seem to be that hard to implement: you'd just need to not > draw certain areas in the area tree. > > Regards, > > > Tony Graham Tony.Graham@... > Director W3C XSL FO SG Invited Expert > Menteith Consulting Ltd > XML, XSL and XSLT consulting, programming and training > Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland > Registered in Ireland - No. 428599 http://www.menteithconsulting.com > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > xmlroff XSL Formatter http://xmlroff.org > xslide Emacs mode http://www.menteith.com/wiki/xslide > Unicode: A Primer urn:isbn:0-7645-4625-2 > > > [1] http://www.antennahouse.com/xslfo/axf4fo.htm > [2] http://www.renderx.com/reference.html Jeremias Maerki |
|
|
Re: supress object printOn Wed, Jul 09 2008 11:27:07 +0100, dev@... wrote: > Plain visibility="hidden" is easy (somebody simply has to implement it > in FOP). You're right there. But the poster actually wants some content > to appear in the PDF viewer which should not be printed. And that > requires some special PDF features if it's possible at all. Sorry, I misunderstood your statement about visibility. No, I don't know how to do now-you-see-it-now-you-don't visibility (other than separate runs of the formatter). Even AntennaHouse's PDF-focused extensions [1] don't seem to cover this case. Regards, Tony Graham Tony.Graham@... Director W3C XSL FO SG Invited Expert Menteith Consulting Ltd XML, XSL and XSLT consulting, programming and training Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland Registered in Ireland - No. 428599 http://www.menteithconsulting.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- xmlroff XSL Formatter http://xmlroff.org xslide Emacs mode http://www.menteith.com/wiki/xslide Unicode: A Primer urn:isbn:0-7645-4625-2 [1] http://www.antennahouse.com/xslfo/axf4-extension.htm |
| Free embeddable forum powered by Nabble | Forum Help |