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 Frank Niedermann <fb...@thelogic.org> on 2009/04/01 09:40:07 UTC

Re: How to create version 2.0 PS files

Hi Adrian,

thanks for the link. This is my fopConfiguration.xml file:
<fop>
  <renderers>
    <renderer mime="application/postscript">
      <auto-rotate-landscape>true</auto-rotate-landscape>
      <language-level>2</language-level>
    </renderer>
  </renderers>
</fop>

And this is how I load this configuration file:
String fopConfiguration = "fopConfiguration.xml";
FopFactory fopFactory = FopFactory.newInstance();
fopFactory.setUserConfig(new File(fopConfiguration));
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

But it still creates version 3 PS-files (I checked the header).

Am I missing something else?

Thanks,
  Frank


Adrian Cumiskey-2 wrote:
> 
> Hi Frank,
> 
> Yes, you can do this with the language-level configuration option (see 
> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
> 
> Adrian.
> 
> Frank Niedermann wrote:
>> Hi,
>>
>> we are using Apache FOP to create PS files which should be printed on a
>> HP-Unix machine.
>>
>> Unfortunately this machine only supports version 2.0 PS files:
>> %!PS-Adobe-2.0
>>
>> Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix
>> print system.
>>
>> Is there a way to tell FOP to generate version 2.0 PS files?
>>
>> Thanks,
>>   Frank
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-create-version-2.0-PS-files-tp22804932p22821352.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: How to create version 2.0 PS files

Posted by Saurabh <sh...@musc.edu>.
Jeremias Maerki <dev <at> jeremias-maerki.ch> writes:

> 
> Hi Adrian & Frank,
> 
> please note that "%!PS-Adobe-3.0" does not refer to the PostScript
> language level but to the version of the DSC specification which is 3.0.
> The language level is given by the following DSC comment:
> 
> %%LanguageLevel: 2
> 
> So this is no bug.
> 
> On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
> > Hi Frank,
> > 
> > I don't think you are missing anything, I think it may be a bug.  Having 
> > stepped through the code, "%!PS-Adobe-3.0" is always written as the 
> > first line of the header regardless of the language level.  Could you 
> > please send us a bug report at 
> > https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
> > will take a look at the problem.  I'll try to find some time later this 
> > week.
> > 
> > Thanks,
> > 
> > Adrian.
> > 
> > Frank Niedermann wrote:
> > > Hi Adrian,
> > >
> > > thanks for the link. This is my fopConfiguration.xml file:
> > > <fop>
> > >   <renderers>
> > >     <renderer mime="application/postscript">
> > >       <auto-rotate-landscape>true</auto-rotate-landscape>
> > >       <language-level>2</language-level>
> > >     </renderer>
> > >   </renderers>
> > > </fop>
> > >
> > > And this is how I load this configuration file:
> > > String fopConfiguration = "fopConfiguration.xml";
> > > FopFactory fopFactory = FopFactory.newInstance();
> > > fopFactory.setUserConfig(new File(fopConfiguration));
> > > FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> > >
> > > But it still creates version 3 PS-files (I checked the header).
> > >
> > > Am I missing something else?
> > >
> > > Thanks,
> > >   Frank
> > >
> > >
> > > Adrian Cumiskey-2 wrote:
> > >   
> > >> Hi Frank,
> > >>
> > >> Yes, you can do this with the language-level configuration option (see 
> > >> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
> > >>
> > >> Adrian.
> > >>
> > >> Frank Niedermann wrote:
> > >>     
> > >>> Hi,
> > >>>
> > >>> we are using Apache FOP to create PS files which should be printed on a
> > >>> HP-Unix machine.
> > >>>
> > >>> Unfortunately this machine only supports version 2.0 PS files:
> > >>> %!PS-Adobe-2.0
> > >>>
> > >>> Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix
> > >>> print system.
> > >>>
> > >>> Is there a way to tell FOP to generate version 2.0 PS files?
> > >>>
> > >>> Thanks,
> > >>>   Frank
> > >>>
> > >>>   
> > >>>       
> 
> Jeremias Maerki
> 

 have embedded fop with java and loading the config using external config file:
I have set the language level to 2 but still get level 3 ps.
Java code:
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
			File f = new File("D:/alfresco/module/rpms/fopConfig.xml");
			Configuration cfg = cfgBuilder.buildFromFile(f);
			fopFactory.setUserConfig(cfg);
			FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

xml file:
<fop version="0.94">

  <!-- Strict user configuration -->
  <strict-configuration>true</strict-configuration>

  <!-- Strict FO validation -->
  <strict-validation>false</strict-validation>

  <!-- Base URL for resolving relative URLs -->
  <base>./</base>

  <!-- Font Base URL for resolving relative font URLs -->
  <font-base>./</font-base>

  <!-- Source resolution in dpi (dots/pixels per inch) for determining the size
of pixels in SVG and bitmap images, default: 72dpi -->
  <source-resolution>72</source-resolution>
  <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target
resolution for generated bitmaps, default: 72dpi -->
  <target-resolution>72</target-resolution>

  <!-- default page-height and page-width, in case
       value is specified as auto -->
  <default-page-settings height="11in" width="8.26in"/>
  <renderers> 
	    <renderer mime="application/postscript">
		  <auto-rotate-landscape>false</auto-rotate-landscape>
		  <language-level>2</language-level>
		  <optimize-resources>false</optimize-resources>
		  <safe-set-page-device>false</safe-set-page-device>
		  <dsc-compliant>true</dsc-compliant>
		</renderer>
	</renderers>
</fop>

result:
%%Creator: (Apache FOP Version 0.94)
%%CreationDate: 2011-09-20T15:34:02
%%LanguageLevel: 3
%%Pages: (atend)
%%DocumentSuppliedResources: (atend)
%%EndComments
%%BeginDefaults
%%EndDefaults
%%BeginProlog
%%BeginResource: procset (Apache XML Graphics Std ProcSet) 1.0 0
%%Version: 1.0 0
%%Copyright: (Copyright 2001-2003 The Apache Software Foundation. License terms:
http://www.apache.org/licenses/LICENSE-2.0)
%%Title: (Basic set of procedures used by the XML Graphics project \(Batik and
FOP\))





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


Re: How to create version 2.0 PS files

Posted by Chris Bowditch <bo...@hotmail.com>.
Frank Niedermann wrote:

Hi Frank,

> Hi Jeremias,
> 
> do you have an example on how to set the LanguageLevel within FOP?

Adrian already sent you a link that shows you how to specify Language 
Level of 2 for Postscript generation:

http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration

This setting goes into fop.xconf file and you have to tell FOP to load 
the file using -c option from command line.

Regards,

Chris

> 
> I found a wiki page [1] about PostScript configuration within FOP but
> on the bottom it says this:
> 
> "Some people will only add a DSC comment into the PostScript file
> instead of the actual media selection code. This comment will then
> be expanded later."
> 
> Thanks,
>   Frank
> 
> [1] http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript
> 
> 
> Jeremias Maerki-2 wrote:
> 
>>Hi Adrian & Frank,
>>
>>please note that "%!PS-Adobe-3.0" does not refer to the PostScript
>>language level but to the version of the DSC specification which is 3.0.
>>The language level is given by the following DSC comment:
>>
>>%%LanguageLevel: 2
>>
>>So this is no bug.
>>
>>On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
>>
>>>Hi Frank,
>>>
>>>I don't think you are missing anything, I think it may be a bug.  Having 
>>>stepped through the code, "%!PS-Adobe-3.0" is always written as the 
>>>first line of the header regardless of the language level.  Could you 
>>>please send us a bug report at 
>>>https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
>>>will take a look at the problem.  I'll try to find some time later this 
>>>week.
>>>
>>>Thanks,
>>>
>>>Adrian.
>>>
>>>Frank Niedermann wrote:
>>>
>>>>Hi Adrian,
>>>>
>>>>thanks for the link. This is my fopConfiguration.xml file:
>>>><fop>
>>>>  <renderers>
>>>>    <renderer mime="application/postscript">
>>>>      <auto-rotate-landscape>true</auto-rotate-landscape>
>>>>      <language-level>2</language-level>
>>>>    </renderer>
>>>>  </renderers>
>>>></fop>
>>>>
>>>>And this is how I load this configuration file:
>>>>String fopConfiguration = "fopConfiguration.xml";
>>>>FopFactory fopFactory = FopFactory.newInstance();
>>>>fopFactory.setUserConfig(new File(fopConfiguration));
>>>>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>>>>
>>>>But it still creates version 3 PS-files (I checked the header).
>>>>
>>>>Am I missing something else?
>>>>
>>>>Thanks,
>>>>  Frank
>>>>
>>>>
>>>>Adrian Cumiskey-2 wrote:
>>>>  
>>>>
>>>>>Hi Frank,
>>>>>
>>>>>Yes, you can do this with the language-level configuration option (see 
>>>>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>>>>>
>>>>>Adrian.
>>>>>
>>>>>Frank Niedermann wrote:
>>>>>    
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>we are using Apache FOP to create PS files which should be printed on
>>>
>>>a
>>>
>>>>>>HP-Unix machine.
>>>>>>
>>>>>>Unfortunately this machine only supports version 2.0 PS files:
>>>>>>%!PS-Adobe-2.0
>>>>>>
>>>>>>Apache FOP creates version 3.0 PS files which are ignored by the
>>>
>>>HP-Unix
>>>
>>>>>>print system.
>>>>>>
>>>>>>Is there a way to tell FOP to generate version 2.0 PS files?
>>>>>>
>>>>>>Thanks,
>>>>>>  Frank
>>>>>>
>>>>>>  
>>>>>>      
>>
>>
>>
>>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: How to create version 2.0 PS files

Posted by Chris Bowditch <bo...@hotmail.com>.
Frank Niedermann wrote:

Hi Frank,

> Hi Chris,
> 
> yes and I already used those settings within FOP but it didn't work.
> 
> Then Jeremias mentioned that those settings don't affect PostScript
> version and I should use the DSC comment %%LanguageLevel: 2 instead.

What Jeremias said was that the LanguageLevel setting doesn't affect the 
DSC comment version in use. It only affects the %%LanguageLevel comment.

> 
> I don't see how to set this commend on the page you mentioned,
> or am I just overseeing the relevant part?

If you set the Language Level in fop.xconf file then %%LanguageLevel 
comment in Postscript will change to reflect that but the DSC comment 
version will not change.

Regards,

Chris

> 
> Thanks,
>   Frank
> 
> 
> cbowditch wrote:
> 
>>Frank Niedermann wrote:
>>
>>Hi Frank,
>>
>>
>>>Hi Jeremias,
>>>
>>>do you have an example on how to set the LanguageLevel within FOP?
>>
>>Adrian already sent you a link that shows you how to specify Language 
>>Level of 2 for Postscript generation:
>>
>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration
>>
>>This setting goes into fop.xconf file and you have to tell FOP to load 
>>the file using -c option from command line.
>>
>>Regards,
>>
>>Chris
>>
>>
>>>I found a wiki page [1] about PostScript configuration within FOP but
>>>on the bottom it says this:
>>>
>>>"Some people will only add a DSC comment into the PostScript file
>>>instead of the actual media selection code. This comment will then
>>>be expanded later."
>>>
>>>Thanks,
>>>  Frank
>>>
>>>[1] http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript
>>>
>>>
>>>Jeremias Maerki-2 wrote:
>>>
>>>
>>>>Hi Adrian & Frank,
>>>>
>>>>please note that "%!PS-Adobe-3.0" does not refer to the PostScript
>>>>language level but to the version of the DSC specification which is 3.0.
>>>>The language level is given by the following DSC comment:
>>>>
>>>>%%LanguageLevel: 2
>>>>
>>>>So this is no bug.
>>>>
>>>>On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
>>>>
>>>>
>>>>>Hi Frank,
>>>>>
>>>>>I don't think you are missing anything, I think it may be a bug.  Having 
>>>>>stepped through the code, "%!PS-Adobe-3.0" is always written as the 
>>>>>first line of the header regardless of the language level.  Could you 
>>>>>please send us a bug report at 
>>>>>https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
>>>>>will take a look at the problem.  I'll try to find some time later this 
>>>>>week.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Adrian.
>>>>>
>>>>>Frank Niedermann wrote:
>>>>>
>>>>>
>>>>>>Hi Adrian,
>>>>>>
>>>>>>thanks for the link. This is my fopConfiguration.xml file:
>>>>>><fop>
>>>>>> <renderers>
>>>>>>   <renderer mime="application/postscript">
>>>>>>     <auto-rotate-landscape>true</auto-rotate-landscape>
>>>>>>     <language-level>2</language-level>
>>>>>>   </renderer>
>>>>>> </renderers>
>>>>>></fop>
>>>>>>
>>>>>>And this is how I load this configuration file:
>>>>>>String fopConfiguration = "fopConfiguration.xml";
>>>>>>FopFactory fopFactory = FopFactory.newInstance();
>>>>>>fopFactory.setUserConfig(new File(fopConfiguration));
>>>>>>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>>>>>>
>>>>>>But it still creates version 3 PS-files (I checked the header).
>>>>>>
>>>>>>Am I missing something else?
>>>>>>
>>>>>>Thanks,
>>>>>> Frank
>>>>>>
>>>>>>
>>>>>>Adrian Cumiskey-2 wrote:
>>>>>> 
>>>>>>
>>>>>>
>>>>>>>Hi Frank,
>>>>>>>
>>>>>>>Yes, you can do this with the language-level configuration option (see 
>>>>>>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>>>>>>>
>>>>>>>Adrian.
>>>>>>>
>>>>>>>Frank Niedermann wrote:
>>>>>>>   
>>>>>>>
>>>>>>>
>>>>>>>>Hi,
>>>>>>>>
>>>>>>>>we are using Apache FOP to create PS files which should be printed on
>>>>>
>>>>>a
>>>>>
>>>>>
>>>>>>>>HP-Unix machine.
>>>>>>>>
>>>>>>>>Unfortunately this machine only supports version 2.0 PS files:
>>>>>>>>%!PS-Adobe-2.0
>>>>>>>>
>>>>>>>>Apache FOP creates version 3.0 PS files which are ignored by the
>>>>>
>>>>>HP-Unix
>>>>>
>>>>>
>>>>>>>>print system.
>>>>>>>>
>>>>>>>>Is there a way to tell FOP to generate version 2.0 PS files?
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>> Frank
>>>>>>>>
>>>>>>>> 
>>>>>>>>     
>>>>
>>>>
>>>>
>>>>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
>>
>>
>>
> 
> 




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


Re: How to create version 2.0 PS files

Posted by Chris Bowditch <bo...@hotmail.com>.
Frank Niedermann wrote:

> Hi Chris,

Hi Frank,

> 
> thanks for clarification now I understand.
> 
> I gave the resulting PostScript file to our printer manufacturer (Ricoh) and
> they told me that the printers are returning a configuration error:
> 
> OFFENDING COMMAND: setpagedevice
> ERRORINFO: Key = /PageSize Value = arraytpe
> STACK: dicttype

That error seems to indicate that the Printer doesn't like the Page Size 
specified. Make sure the dimensions assigned to your simple page master 
match the paper size supported by the Printer, i.e. if the Printer has a 
Letter sized paper source but you specified A4 dimensions 297mmx210mm in 
the simple-page-master then this cause could this type of error.

> 
> We plan to replace an old LaTeX environment with Apache FOP, and the
> PostScript files generated by LaTeX print without an error on the printers.
> 
> Do I need the setpagedevice in the PostScript file and if not, is there a
> way to disable the generation of this command in FOP?

Regards,

Chris

<snip/>



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


Re: How to create version 2.0 PS files

Posted by Frank Niedermann <fb...@thelogic.org>.
Hi Chris,


cbowditch wrote:
> 
>> OFFENDING COMMAND: setpagedevice
>> ERRORINFO: Key = /PageSize Value = arraytpe
>> STACK: dicttype
> 
> That error seems to indicate that the Printer doesn't like the Page Size 
> specified. Make sure the dimensions assigned to your simple page master 
> match the paper size supported by the Printer, i.e. if the Printer has a 
> Letter sized paper source but you specified A4 dimensions 297mmx210mm in 
> the simple-page-master then this cause could this type of error.
> 
> 

yes that seems to be the reason. If I change paper tray to Letter in the
printer configuration everything works well - except normal printings from
my users.

Strange thing is that the printers accept the PS version 2.0 Letter with
A4 printer settings but not the PS version 3.0 Letter with A4 printer
settings.

But I guess we have to live with that behavior.

Thanks,
  Frank
-- 
View this message in context: http://www.nabble.com/How-to-create-version-2.0-PS-files-tp22804932p22904482.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: How to create version 2.0 PS files

Posted by Frank Niedermann <fb...@thelogic.org>.
Hi Chris,

thanks for clarification now I understand.

I gave the resulting PostScript file to our printer manufacturer (Ricoh) and
they told me that the printers are returning a configuration error:

OFFENDING COMMAND: setpagedevice
ERRORINFO: Key = /PageSize Value = arraytpe
STACK: dicttype

We plan to replace an old LaTeX environment with Apache FOP, and the
PostScript files generated by LaTeX print without an error on the printers.

Do I need the setpagedevice in the PostScript file and if not, is there a
way to disable the generation of this command in FOP?

Thanks,
  Frank


cbowditch wrote:
> 
> Frank Niedermann wrote:
> 
> Hi Frank,
> 
>> Hi Chris,
>> 
>> yes and I already used those settings within FOP but it didn't work.
>> 
>> Then Jeremias mentioned that those settings don't affect PostScript
>> version and I should use the DSC comment %%LanguageLevel: 2 instead.
> 
> What Jeremias said was that the LanguageLevel setting doesn't affect the 
> DSC comment version in use. It only affects the %%LanguageLevel comment.
> 
>> 
>> I don't see how to set this commend on the page you mentioned,
>> or am I just overseeing the relevant part?
> 
> If you set the Language Level in fop.xconf file then %%LanguageLevel 
> comment in Postscript will change to reflect that but the DSC comment 
> version will not change.
> 
> Regards,
> 
> Chris
> 
>> 
>> Thanks,
>>   Frank
>> 
>> 
>> cbowditch wrote:
>> 
>>>Frank Niedermann wrote:
>>>
>>>Hi Frank,
>>>
>>>
>>>>Hi Jeremias,
>>>>
>>>>do you have an example on how to set the LanguageLevel within FOP?
>>>
>>>Adrian already sent you a link that shows you how to specify Language 
>>>Level of 2 for Postscript generation:
>>>
>>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration
>>>
>>>This setting goes into fop.xconf file and you have to tell FOP to load 
>>>the file using -c option from command line.
>>>
>>>Regards,
>>>
>>>Chris
>>>
>>>
>>>>I found a wiki page [1] about PostScript configuration within FOP but
>>>>on the bottom it says this:
>>>>
>>>>"Some people will only add a DSC comment into the PostScript file
>>>>instead of the actual media selection code. This comment will then
>>>>be expanded later."
>>>>
>>>>Thanks,
>>>>  Frank
>>>>
>>>>[1] http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript
>>>>
>>>>
>>>>Jeremias Maerki-2 wrote:
>>>>
>>>>
>>>>>Hi Adrian & Frank,
>>>>>
>>>>>please note that "%!PS-Adobe-3.0" does not refer to the PostScript
>>>>>language level but to the version of the DSC specification which is
3.0.
>>>>>The language level is given by the following DSC comment:
>>>>>
>>>>>%%LanguageLevel: 2
>>>>>
>>>>>So this is no bug.
>>>>>
>>>>>On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
>>>>>
>>>>>
>>>>>>Hi Frank,
>>>>>>
>>>>>>I don't think you are missing anything, I think it may be a bug. 
Having 
>>>>>>stepped through the code, "%!PS-Adobe-3.0" is always written as the 
>>>>>>first line of the header regardless of the language level.  Could you 
>>>>>>please send us a bug report at 
>>>>>>https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and
someone 
>>>>>>will take a look at the problem.  I'll try to find some time later
this 
>>>>>>week.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>Adrian.
>>>>>>
>>>>>>Frank Niedermann wrote:
>>>>>>
>>>>>>
>>>>>>>Hi Adrian,
>>>>>>>
>>>>>>>thanks for the link. This is my fopConfiguration.xml file:
>>>>>>><fop>
>>>>>>> <renderers>
>>>>>>>   <renderer mime="application/postscript">
>>>>>>>     <auto-rotate-landscape>true</auto-rotate-landscape>
>>>>>>>     <language-level>2</language-level>
>>>>>>>   </renderer>
>>>>>>> </renderers>
>>>>>>></fop>
>>>>>>>
>>>>>>>And this is how I load this configuration file:
>>>>>>>String fopConfiguration = "fopConfiguration.xml";
>>>>>>>FopFactory fopFactory = FopFactory.newInstance();
>>>>>>>fopFactory.setUserConfig(new File(fopConfiguration));
>>>>>>>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>>>>>>>
>>>>>>>But it still creates version 3 PS-files (I checked the header).
>>>>>>>
>>>>>>>Am I missing something else?
>>>>>>>
>>>>>>>Thanks,
>>>>>>> Frank
>>>>>>>
>>>>>>>
>>>>>>>Adrian Cumiskey-2 wrote:
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>>>Hi Frank,
>>>>>>>>
>>>>>>>>Yes, you can do this with the language-level configuration option
(see 
>>>>>>>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>>>>>>>>
>>>>>>>>Adrian.
>>>>>>>>
>>>>>>>>Frank Niedermann wrote:
>>>>>>>>   
>>>>>>>>
>>>>>>>>
>>>>>>>>>Hi,
>>>>>>>>>
>>>>>>>>>we are using Apache FOP to create PS files which should be printed
on
>>>>>>
>>>>>>a
>>>>>>
>>>>>>
>>>>>>>>>HP-Unix machine.
>>>>>>>>>
>>>>>>>>>Unfortunately this machine only supports version 2.0 PS files:
>>>>>>>>>%!PS-Adobe-2.0
>>>>>>>>>
>>>>>>>>>Apache FOP creates version 3.0 PS files which are ignored by the
>>>>>>
>>>>>>HP-Unix
>>>>>>
>>>>>>
>>>>>>>>>print system.
>>>>>>>>>
>>>>>>>>>Is there a way to tell FOP to generate version 2.0 PS files?
>>>>>>>>>
>>>>>>>>>Thanks,
>>>>>>>>> Frank
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>>     
>>>>>
>>>>>
>>>>>
>>>>>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
>>>
>>>
>>>
>> 
>> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-create-version-2.0-PS-files-tp22804932p22846837.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: How to create version 2.0 PS files

Posted by Frank Niedermann <fb...@thelogic.org>.
Hi Chris,

yes and I already used those settings within FOP but it didn't work.

Then Jeremias mentioned that those settings don't affect PostScript
version and I should use the DSC comment %%LanguageLevel: 2 instead.

I don't see how to set this commend on the page you mentioned,
or am I just overseeing the relevant part?

Thanks,
  Frank


cbowditch wrote:
> 
> Frank Niedermann wrote:
> 
> Hi Frank,
> 
>> Hi Jeremias,
>> 
>> do you have an example on how to set the LanguageLevel within FOP?
> 
> Adrian already sent you a link that shows you how to specify Language 
> Level of 2 for Postscript generation:
> 
> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration
> 
> This setting goes into fop.xconf file and you have to tell FOP to load 
> the file using -c option from command line.
> 
> Regards,
> 
> Chris
> 
>> 
>> I found a wiki page [1] about PostScript configuration within FOP but
>> on the bottom it says this:
>> 
>> "Some people will only add a DSC comment into the PostScript file
>> instead of the actual media selection code. This comment will then
>> be expanded later."
>> 
>> Thanks,
>>   Frank
>> 
>> [1] http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript
>> 
>> 
>> Jeremias Maerki-2 wrote:
>> 
>>>Hi Adrian & Frank,
>>>
>>>please note that "%!PS-Adobe-3.0" does not refer to the PostScript
>>>language level but to the version of the DSC specification which is 3.0.
>>>The language level is given by the following DSC comment:
>>>
>>>%%LanguageLevel: 2
>>>
>>>So this is no bug.
>>>
>>>On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
>>>
>>>>Hi Frank,
>>>>
>>>>I don't think you are missing anything, I think it may be a bug.  Having 
>>>>stepped through the code, "%!PS-Adobe-3.0" is always written as the 
>>>>first line of the header regardless of the language level.  Could you 
>>>>please send us a bug report at 
>>>>https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
>>>>will take a look at the problem.  I'll try to find some time later this 
>>>>week.
>>>>
>>>>Thanks,
>>>>
>>>>Adrian.
>>>>
>>>>Frank Niedermann wrote:
>>>>
>>>>>Hi Adrian,
>>>>>
>>>>>thanks for the link. This is my fopConfiguration.xml file:
>>>>><fop>
>>>>>  <renderers>
>>>>>    <renderer mime="application/postscript">
>>>>>      <auto-rotate-landscape>true</auto-rotate-landscape>
>>>>>      <language-level>2</language-level>
>>>>>    </renderer>
>>>>>  </renderers>
>>>>></fop>
>>>>>
>>>>>And this is how I load this configuration file:
>>>>>String fopConfiguration = "fopConfiguration.xml";
>>>>>FopFactory fopFactory = FopFactory.newInstance();
>>>>>fopFactory.setUserConfig(new File(fopConfiguration));
>>>>>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>>>>>
>>>>>But it still creates version 3 PS-files (I checked the header).
>>>>>
>>>>>Am I missing something else?
>>>>>
>>>>>Thanks,
>>>>>  Frank
>>>>>
>>>>>
>>>>>Adrian Cumiskey-2 wrote:
>>>>>  
>>>>>
>>>>>>Hi Frank,
>>>>>>
>>>>>>Yes, you can do this with the language-level configuration option (see 
>>>>>>http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>>>>>>
>>>>>>Adrian.
>>>>>>
>>>>>>Frank Niedermann wrote:
>>>>>>    
>>>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>we are using Apache FOP to create PS files which should be printed on
>>>>
>>>>a
>>>>
>>>>>>>HP-Unix machine.
>>>>>>>
>>>>>>>Unfortunately this machine only supports version 2.0 PS files:
>>>>>>>%!PS-Adobe-2.0
>>>>>>>
>>>>>>>Apache FOP creates version 3.0 PS files which are ignored by the
>>>>
>>>>HP-Unix
>>>>
>>>>>>>print system.
>>>>>>>
>>>>>>>Is there a way to tell FOP to generate version 2.0 PS files?
>>>>>>>
>>>>>>>Thanks,
>>>>>>>  Frank
>>>>>>>
>>>>>>>  
>>>>>>>      
>>>
>>>
>>>
>>>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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-create-version-2.0-PS-files-tp22804932p22843908.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: How to create version 2.0 PS files

Posted by Frank Niedermann <fb...@thelogic.org>.
Hi Jeremias,

do you have an example on how to set the LanguageLevel within FOP?

I found a wiki page [1] about PostScript configuration within FOP but
on the bottom it says this:

"Some people will only add a DSC comment into the PostScript file
instead of the actual media selection code. This comment will then
be expanded later."

Thanks,
  Frank

[1] http://wiki.apache.org/xmlgraphics-fop/ExtensionsForPostScript


Jeremias Maerki-2 wrote:
> 
> Hi Adrian & Frank,
> 
> please note that "%!PS-Adobe-3.0" does not refer to the PostScript
> language level but to the version of the DSC specification which is 3.0.
> The language level is given by the following DSC comment:
> 
> %%LanguageLevel: 2
> 
> So this is no bug.
> 
> On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
>> Hi Frank,
>> 
>> I don't think you are missing anything, I think it may be a bug.  Having 
>> stepped through the code, "%!PS-Adobe-3.0" is always written as the 
>> first line of the header regardless of the language level.  Could you 
>> please send us a bug report at 
>> https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
>> will take a look at the problem.  I'll try to find some time later this 
>> week.
>> 
>> Thanks,
>> 
>> Adrian.
>> 
>> Frank Niedermann wrote:
>> > Hi Adrian,
>> >
>> > thanks for the link. This is my fopConfiguration.xml file:
>> > <fop>
>> >   <renderers>
>> >     <renderer mime="application/postscript">
>> >       <auto-rotate-landscape>true</auto-rotate-landscape>
>> >       <language-level>2</language-level>
>> >     </renderer>
>> >   </renderers>
>> > </fop>
>> >
>> > And this is how I load this configuration file:
>> > String fopConfiguration = "fopConfiguration.xml";
>> > FopFactory fopFactory = FopFactory.newInstance();
>> > fopFactory.setUserConfig(new File(fopConfiguration));
>> > FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>> >
>> > But it still creates version 3 PS-files (I checked the header).
>> >
>> > Am I missing something else?
>> >
>> > Thanks,
>> >   Frank
>> >
>> >
>> > Adrian Cumiskey-2 wrote:
>> >   
>> >> Hi Frank,
>> >>
>> >> Yes, you can do this with the language-level configuration option (see 
>> >> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>> >>
>> >> Adrian.
>> >>
>> >> Frank Niedermann wrote:
>> >>     
>> >>> Hi,
>> >>>
>> >>> we are using Apache FOP to create PS files which should be printed on
>> a
>> >>> HP-Unix machine.
>> >>>
>> >>> Unfortunately this machine only supports version 2.0 PS files:
>> >>> %!PS-Adobe-2.0
>> >>>
>> >>> Apache FOP creates version 3.0 PS files which are ignored by the
>> HP-Unix
>> >>> print system.
>> >>>
>> >>> Is there a way to tell FOP to generate version 2.0 PS files?
>> >>>
>> >>> Thanks,
>> >>>   Frank
>> >>>
>> >>>   
>> >>>       
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-create-version-2.0-PS-files-tp22804932p22843062.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: How to create version 2.0 PS files

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hi Adrian & Frank,

please note that "%!PS-Adobe-3.0" does not refer to the PostScript
language level but to the version of the DSC specification which is 3.0.
The language level is given by the following DSC comment:

%%LanguageLevel: 2

So this is no bug.

On 01.04.2009 11:11:30 Adrian Cumiskey wrote:
> Hi Frank,
> 
> I don't think you are missing anything, I think it may be a bug.  Having 
> stepped through the code, "%!PS-Adobe-3.0" is always written as the 
> first line of the header regardless of the language level.  Could you 
> please send us a bug report at 
> https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
> will take a look at the problem.  I'll try to find some time later this 
> week.
> 
> Thanks,
> 
> Adrian.
> 
> Frank Niedermann wrote:
> > Hi Adrian,
> >
> > thanks for the link. This is my fopConfiguration.xml file:
> > <fop>
> >   <renderers>
> >     <renderer mime="application/postscript">
> >       <auto-rotate-landscape>true</auto-rotate-landscape>
> >       <language-level>2</language-level>
> >     </renderer>
> >   </renderers>
> > </fop>
> >
> > And this is how I load this configuration file:
> > String fopConfiguration = "fopConfiguration.xml";
> > FopFactory fopFactory = FopFactory.newInstance();
> > fopFactory.setUserConfig(new File(fopConfiguration));
> > FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> >
> > But it still creates version 3 PS-files (I checked the header).
> >
> > Am I missing something else?
> >
> > Thanks,
> >   Frank
> >
> >
> > Adrian Cumiskey-2 wrote:
> >   
> >> Hi Frank,
> >>
> >> Yes, you can do this with the language-level configuration option (see 
> >> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
> >>
> >> Adrian.
> >>
> >> Frank Niedermann wrote:
> >>     
> >>> Hi,
> >>>
> >>> we are using Apache FOP to create PS files which should be printed on a
> >>> HP-Unix machine.
> >>>
> >>> Unfortunately this machine only supports version 2.0 PS files:
> >>> %!PS-Adobe-2.0
> >>>
> >>> Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix
> >>> print system.
> >>>
> >>> Is there a way to tell FOP to generate version 2.0 PS files?
> >>>
> >>> Thanks,
> >>>   Frank
> >>>
> >>>   
> >>>       



Jeremias Maerki


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


Re: How to create version 2.0 PS files

Posted by Adrian Cumiskey <de...@cumiskey.com>.
Hi Frank,

I don't think you are missing anything, I think it may be a bug.  Having 
stepped through the code, "%!PS-Adobe-3.0" is always written as the 
first line of the header regardless of the language level.  Could you 
please send us a bug report at 
https://issues.apache.org/bugzilla/enter_bug.cgi?product=Fop and someone 
will take a look at the problem.  I'll try to find some time later this 
week.

Thanks,

Adrian.

Frank Niedermann wrote:
> Hi Adrian,
>
> thanks for the link. This is my fopConfiguration.xml file:
> <fop>
>   <renderers>
>     <renderer mime="application/postscript">
>       <auto-rotate-landscape>true</auto-rotate-landscape>
>       <language-level>2</language-level>
>     </renderer>
>   </renderers>
> </fop>
>
> And this is how I load this configuration file:
> String fopConfiguration = "fopConfiguration.xml";
> FopFactory fopFactory = FopFactory.newInstance();
> fopFactory.setUserConfig(new File(fopConfiguration));
> FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>
> But it still creates version 3 PS-files (I checked the header).
>
> Am I missing something else?
>
> Thanks,
>   Frank
>
>
> Adrian Cumiskey-2 wrote:
>   
>> Hi Frank,
>>
>> Yes, you can do this with the language-level configuration option (see 
>> http://xmlgraphics.apache.org/fop/0.95/output.html#ps-configuration).
>>
>> Adrian.
>>
>> Frank Niedermann wrote:
>>     
>>> Hi,
>>>
>>> we are using Apache FOP to create PS files which should be printed on a
>>> HP-Unix machine.
>>>
>>> Unfortunately this machine only supports version 2.0 PS files:
>>> %!PS-Adobe-2.0
>>>
>>> Apache FOP creates version 3.0 PS files which are ignored by the HP-Unix
>>> print system.
>>>
>>> Is there a way to tell FOP to generate version 2.0 PS files?
>>>
>>> Thanks,
>>>   Frank
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> 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