RE: (Victor) PDF fo:basic-link problem in trunk

2003-10-07 Thread Victor Mote
J.Pietschmann wrote:

> Victor Mote wrote:
> > Yes, without some sort of regression testing mechanism,
>
> We should have that now, see
>   test/java/org/apache/fop/GenericFOPTestCase.java
>
> I deliberatly went for a self containg test scheme, which
> means not even external XML files. Add tests at will (well,
> almost).

Cool. I knew you were working on this, didn't realize it was ready to go.
I'll take a look here in a bit.

Victor Mote



"Document Name" when printing

2003-10-07 Thread Clay Leeds
Is there any way to control the document name when printing from the 
command line (fop-0.20.5, java 1.4.1_01-b01 running under Windows XP 
Pro). At present it displays "Java Printing". I'd like to *at least* 
have an option for appending a serial number printing (Java 
Printing_001, Java Printing_002, Java Printing_003...). Even better 
would be to take the INPUT file name and have it called "FOP 
" or even "Java Printing " or 
something.

Any ideas that don't involve getting Java all over my hands?

;-p



Re: "Document Name" when printing

2003-10-07 Thread Glen Mazza
--- Clay Leeds <[EMAIL PROTECTED]> wrote:
> Is there any way to control the document name when
> printing from the 
> command line (fop-0.20.5, java 1.4.1_01-b01 running
> under Windows XP 
> Pro). 

I'm unsure what you mean--are you referring to the
-print render type?  I don't think so here...

Glen




__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: cvs commit: xml-fop/src/java/org/apache/fop/util CharUtilities.java

2003-10-07 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:
   public class CharUtilities {
...
  +public static int getWordWidth(String word, Font fs) {
That's ugly. Shouldn't this be a method of Font?

J.Pietschmann




cvs commit: xml-fop/src/java/org/apache/fop/apps XSLTInputHandler.java

2003-10-07 Thread gmazza
gmazza  2003/10/07 13:06:17

  Modified:src/java/org/apache/fop/apps XSLTInputHandler.java
  Log:
  Removed nonfunctional setParameter() function from XSLTInputHandler.  (Bug 23624, 
submitted by Julien Cervelle).
  
  Revision  ChangesPath
  1.10  +0 -9  xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java
  
  Index: XSLTInputHandler.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/XSLTInputHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XSLTInputHandler.java 12 Aug 2003 21:17:44 -  1.9
  +++ XSLTInputHandler.java 7 Oct 2003 20:06:17 -   1.10
  @@ -191,14 +191,5 @@
   }
   }
   
  -/**
  - * Sets an XSLT parameter.
  - * @param name the name of the parameter
  - * @param value the value of the parameter
  - */
  -public void setParameter(String name, Object value) {
  -transformer.setParameter(name, value);
  -}
  -
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cvs commit: xml-fop/src/java/org/apache/fop/util CharUtilities.java

2003-10-07 Thread Victor Mote
J.Pietschmann wrote:

> [EMAIL PROTECTED] wrote:
> >public class CharUtilities {
> ...
> >   +public static int getWordWidth(String word, Font fs) {
>
> That's ugly. Shouldn't this be a method of Font?

Although I don't recognize it as ugly, I have no objection to your proposal.
I was making it parallel with CharUtilities.getCharWidth(). Both of these
methods were in Font (or FontState) in maintenance branch, so I assume that
somebody moved getCharWidth. getWordWidth is needed for the Pioneer LS, and
it may go away at some point.

Victor Mote



Re: "Document Name" when printing

2003-10-07 Thread Eric Galluzzo
Clay Leeds wrote:

Is there any way to control the document name when printing from the 
command line (fop-0.20.5, java 1.4.1_01-b01 running under Windows XP 
Pro). At present it displays "Java Printing". I'd like to *at least* 
have an option for appending a serial number printing (Java 
Printing_001, Java Printing_002, Java Printing_003...). Even better 
would be to take the INPUT file name and have it called "FOP 
" or even "Java Printing " or 
something.

Any ideas that don't involve getting Java all over my hands?
I'm afraid it would involve getting Java all over your hands.  But only 
a small amount of Java. ;)

The name of a printer job can be set via the 
java.awt.print.PrinterJob.setJobName( String ) method.  This would need 
to be done within whatever class creates the printer job and prints it.  
This might possibly be in AWTRenderer.  (Sorry, I don't have the source 
handy on my machine.)

Hmmm, this is probably a really unhelpful response

   - Eric




cvs commit: xml-fop/src/org/apache/fop/apps Driver.java

2003-10-07 Thread gmazza
gmazza  2003/10/07 13:38:33

  Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain Driver.java
  Log:
  Porting from trunk back to maintenance a check for a null class loader while loading 
ElementMappings; code originally done by Keiron
  
  
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/apps/Attic/Driver.java.diff?r1=1.37&r2=1.38&diff_format=h
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.36.2.12 +9 -3  xml-fop/src/org/apache/fop/apps/Attic/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Attic/Driver.java,v
  retrieving revision 1.36.2.11
  retrieving revision 1.36.2.12
  diff -u -r1.36.2.11 -r1.36.2.12
  --- Driver.java   8 Sep 2003 22:15:27 -   1.36.2.11
  +++ Driver.java   7 Oct 2003 20:38:33 -   1.36.2.12
  @@ -581,14 +581,20 @@
   
   public static synchronized Enumeration providers(Class cls) {
   ClassLoader cl = cls.getClassLoader();
  +// null if loaded by bootstrap class loader 
  +if(cl == null) { 
  +   cl = ClassLoader.getSystemClassLoader(); 
  +} 
  +
   String serviceFile = "META-INF/services/" + cls.getName();
   
   // System.out.println("File: " + serviceFile);
   
   Vector v = (Vector)providerMap.get(serviceFile);
  -if (v != null)
  +if (v != null) {
   return v.elements();
  -
  +}
  +
   v = new Vector();
   providerMap.put(serviceFile, v);
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 23480] - [PATCH] NullPointerException when -classpath is empty

2003-10-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23480

[PATCH] NullPointerException when -classpath is empty

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-10-07 20:45 ---
This problem was fixed a while back in our 1.0 (development) version, but for 
some reason was not applied to our 0.20.x version.  I just did so, using the 
solution originally done for development:

http://cvs.apache.org/viewcvs.cgi/xml-
fop/src/org/apache/fop/apps/Attic/Driver.java.diff?r1=1.37&r2=1.38&diff_format=h

Thanks for bringing this to our attention!
Glen


RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Eric Galluzzo [mailto:[EMAIL PROTECTED]
>
> Clay Leeds wrote:
>
> > Is there any way to control the document name when printing from the
> > command line (fop-0.20.5, java 1.4.1_01-b01 running under Windows XP
> > Pro).



> >
> > Any ideas that don't involve getting Java all over my hands?
>
> I'm afraid it would involve getting Java all over your hands.  But only
> a small amount of Java. ;)
>
> The name of a printer job can be set via the
> java.awt.print.PrinterJob.setJobName( String ) method.  This would need
> to be done within whatever class creates the printer job and prints it.
> This might possibly be in AWTRenderer.  (Sorry, I don't have the source
> handy on my machine.)
>
> Hmmm, this is probably a really unhelpful response
>

Hmmm, probably? I guess that depends... I have been browsing around in the
source, and pinpointed *the* class which needs to be modified (maintenance
branch, but seems to be the same for HEAD, if I'm correct):

org.apache.fop.apps.PrintStarter - line 187 is where the actual printing is
done.

I'll have a look at it later on to see if we can pass a variable from
somewhere in there. (If nobody gets to it before me, that is...)

In any case, thanks for this 'really unhelpful' input ;)

Greetz,

Andreas



cvs commit: xml-fop/src/org/apache/fop/apps PrintStarter.java

2003-10-07 Thread gmazza
gmazza  2003/10/07 14:19:30

  Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain
PrintStarter.java
  Log:
  Printer Job name specified as "FOP Document" instead of default "Java Printing"
  (thanks to Eric Galuzzo for help on this.)
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.7.2.7   +28 -14xml-fop/src/org/apache/fop/apps/Attic/PrintStarter.java
  
  Index: PrintStarter.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Attic/PrintStarter.java,v
  retrieving revision 1.7.2.6
  retrieving revision 1.7.2.7
  diff -u -r1.7.2.6 -r1.7.2.7
  --- PrintStarter.java 21 Sep 2003 11:50:52 -  1.7.2.6
  +++ PrintStarter.java 7 Oct 2003 21:19:30 -   1.7.2.7
  @@ -61,19 +61,32 @@
* added interfaces to the new Render API.
*/
   
  -import org.xml.sax.XMLReader;
  -
  -import java.awt.print.PrinterJob;
  -import java.awt.print.PrinterException;
  -import java.io.OutputStream;
  -import java.io.IOException;
  -import java.util.ArrayList;
  -
  -import org.apache.fop.render.awt.AWTRenderer;
  -import org.apache.fop.layout.Page;
  -
  -// Avalon
  -import org.apache.avalon.framework.logger.ConsoleLogger;
  +import org.xml.sax.XMLReader;
  +
  +
  +
  +import java.awt.print.PrinterJob;
  +
  +import java.awt.print.PrinterException;
  +
  +import java.io.OutputStream;
  +
  +import java.io.IOException;
  +
  +import java.util.ArrayList;
  +
  +
  +
  +import org.apache.fop.render.awt.AWTRenderer;
  +
  +import org.apache.fop.layout.Page;
  +
  +
  +
  +// Avalon
  +
  +import org.apache.avalon.framework.logger.ConsoleLogger;
  +
   
   /**
* This class prints a xsl-fo dokument without interaction.
  @@ -113,6 +126,7 @@
   PrintRenderer renderer = new PrintRenderer(pj);
   int copies = getIntProperty("copies", 1);
   pj.setCopies(copies);
  +pj.setJobName("FOP Document");
   
   //renderer.setCopies(copies);
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop/src/java/org/apache/fop/render/awt AWTPrintRenderer.java

2003-10-07 Thread gmazza
gmazza  2003/10/07 14:22:04

  Modified:src/java/org/apache/fop/render/awt AWTPrintRenderer.java
  Log:
  Document name switched from default "Java Printing" text to "FOP Document".
  
  Revision  ChangesPath
  1.6   +2 -2  xml-fop/src/java/org/apache/fop/render/awt/AWTPrintRenderer.java
  
  Index: AWTPrintRenderer.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/render/awt/AWTPrintRenderer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AWTPrintRenderer.java 30 Aug 2003 21:14:52 -  1.5
  +++ AWTPrintRenderer.java 7 Oct 2003 21:22:04 -   1.6
  @@ -68,7 +68,6 @@
   private PrinterJob printerJob;
   
   public AWTPrintRenderer() {
  -super();
   initialize();
   }
   
  @@ -83,6 +82,7 @@
   }
   
   printerJob = PrinterJob.getPrinterJob();
  +printerJob.setJobName("FOP Document");
   printerJob.setCopies(copies);
   if (System.getProperty("dialog") != null) {
   if (!printerJob.printDialog()) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Document Name" when printing

2003-10-07 Thread Glen Mazza
--- Eric Galluzzo <[EMAIL PROTECTED]> wrote:
> 
> The name of a printer job can be set via the 
> java.awt.print.PrinterJob.setJobName( String )
> method.  This would need 
> to be done within whatever class creates the printer
> job and prints it.  



> 
> Hmmm, this is probably a really unhelpful
> response
> 
> - Eric
> 

Not at all-just updated maintenance and trunk to state
"FOP Document" instead of "Java Printing".  Thanks for
the quick pointer on how to do so.  

File names are not presently available within the
AWTPrintRenderer in order to display them--OTOH, I
don't think we want to get into more detail for a
printer queue such as precise file names--for security
and privacy reasons.

Glen

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
>

> [...] I have been browsing around in the
> source, and pinpointed *the* class which needs to be modified (maintenance
> branch, but seems to be the same for HEAD, if I'm correct):
>
> org.apache.fop.apps.PrintStarter - line 187 is where the actual
> printing is done.
>
> I'll have a look at it later on to see if we can pass a variable from
> somewhere in there. (If nobody gets to it before me, that is...)
>

( I see Glen, in the meantime has beaten me to it :) )

Just tried the following:

- added a member variable to PrintStarter:

line 94 ->  private String pjname;

- added in the PrintStarter constructor:

line 118 -> pj.setJobName( pjname );

That's all!

Greetz,

Andreas



RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
> 
> ( I see Glen, in the meantime has beaten me to it :) )
> 
> Just tried the following:
> 
> - added a member variable to PrintStarter:
> 
>   line 90 ->  private String pjname;
^^^
Sorry, too fast ;)

> 
> - added in the PrintStarter constructor:
> 
This should have been:

line 94 ->  pjname = options.getInputFile().getName();

Then, in the run-method:
>   line 118 -> pj.setJobName( pjname );
> 
> That's all!

More like it...

Greetz,

Andreas



Re: "Document Name" when printing

2003-10-07 Thread Clay Leeds
Glen Mazza wrote:
Not at all-just updated maintenance and trunk to state
"FOP Document" instead of "Java Printing".  Thanks for
the quick pointer on how to do so.  

File names are not presently available within the
AWTPrintRenderer in order to display them--OTOH, I
don't think we want to get into more detail for a
printer queue such as precise file names--for security
and privacy reasons.
Glen
That's great! Thanks a bunch Glen! I love it when I get an idea that is 
simple to implement, and makes so much sense.

It would be great if there were a flag/arg that could be added to the 
COMMAND LINE to enable some type of identification to be appended (like 
the date/time stamp like '200310061500' might be good--or since it's a 
flag/arg, append the filename if the flag is present)

(BTW Eric, I didn't think it was unhelpful either...au contraire, if I 
wanted to pay someone to 'fix' it, knowing where to tell them where to 
look would've saved time and made the explanation easier... Looking 
forward to e-seeing your helpful hints more on the list!)

Web Maestro Clay



RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Clay Leeds [mailto:[EMAIL PROTECTED]
>
> It would be great if there were a flag/arg that could be added to the
> COMMAND LINE to enable some type of identification to be appended (like
> the date/time stamp like '200310061500' might be good--or since it's a
> flag/arg, append the filename if the flag is present)
>

Well, as for the appending of the filename, my suggestion would work... As
for the flag setting, I think I'll hand over this one (although it shouldn't
be all that difficult either). Perhaps a method could be added to the
CommandLineOptions? Sth like 'getPrintFlag()' (hmmm, name might be a bit too
generic - never been very good at choosing names ;) ), allowing to
conditionally set the 'pjname' variable.

Or would this, from an OOP point of view, belong to some other class than
the PrintStarter?

Greetz,

Andreas



Re: "Document Name" when printing

2003-10-07 Thread Glen Mazza
--- Clay Leeds <[EMAIL PROTECTED]> wrote:
> It would be great if there were a flag/arg that
> could be added to the 
> COMMAND LINE to enable some type of identification
> to be appended (like 
> the date/time stamp like '200310061500' might be
> good--or since it's a 
> flag/arg, append the filename if the flag is
> present)
> 

I currently don't see too much need for that--that
information has only the life of a few seconds to a
few minutes while waiting in a printer queue.  For the
time/date, look in the second column if you're viewing
a Windows print queue...   ;-)

Glen


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Re: "Document Name" when printing

2003-10-07 Thread Clay Leeds
Glen Mazza wrote:
--- Clay Leeds <[EMAIL PROTECTED]> wrote:
It would be great if there were a flag/arg that
could be added to the 
COMMAND LINE to enable some type of identification
to be appended (like 
the date/time stamp like '200310061500' might be
good--or since it's a 
flag/arg, append the filename if the flag is
present)
I currently don't see too much need for that--that
information has only the life of a few seconds to a
few minutes while waiting in a printer queue.  For the
time/date, look in the second column if you're viewing
a Windows print queue...   ;-)
Glen
First let me say, that this new addition will be helpful. I agree that 
we probably don't need to add a date/time stamp per se.

I thought I'd give a little background on why I made this request in the 
first place.

While it's true that the print job only has the life of a few seconds 
when sent to my trusty local HP 1200, if I send it to get RIP'd on our 
networked printer (which is defaulted to save jobs in queue for a week, 
in case someone wants to re-print a document), I ended up with a 
bajillion "Java Printing" documents. Thankfully, the main impetus of 
resolving this nagging problem (allow viewers of the queue a better idea 
of what's been/being printed) is resolved by changing it to "FOP 
Document". The RIP'er has an EFI Fiery-based Java applet which displays 
the job queue. I can 'click' one of "Java Printing" jobs and then 
re-print it or do whatever I want. The date & time columns would 
certainly suffice for identification purposes.

Thanks again for all of your collective (not to mention quick!) help on 
this.

Web Maestro Clay



RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Clay Leeds [mailto:[EMAIL PROTECTED]
>
> Thanks again for all of your collective (not to mention quick!) help on
> this.
>

Maestro,

If mine is included, you're welcome of course. (No replies? Admittedly,
perhaps I do leave little to add ;) )

Considering your specific case, I think the conditional addition of the
filename would indeed be helpful. Having that specific document name
included at least lessens the search time a bit (does away with first having
to ask the question of what exact date/time the document was printed).

If Glen judges that it would hardly be worth the effort, I can understand
perfectly that there are more important issues... So if need be, I'll just
enter a patch one of the coming days.


Greetz,

Andreas



RE: "Document Name" when printing

2003-10-07 Thread Andreas L. Delmelle
> -Original Message-
> From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
>
>
> If Glen judges that it would hardly be worth the effort, I can understand
> perfectly that there are more important issues... So if need be, I'll just
> enter a patch one of the coming days.
>

On second thought, I believe the CommandLineOptions class in HEAD is not yet
completely refactored, so there the patch might have to wait a little while.

For maintenance, I will submit it, so you can check out.

Stay tuned!

G'night,

Andreas

BTW: off-topic for the list, but does anyone know why, when I reply to one
of my own messages on the list, somehow my own address gets appended to the
list of recipients? Never have this with other people's messages... So I end
up annoying myself by sending me the same message twice - don't think I can
take it anymore ;)



Re: "Document Name" when printing

2003-10-07 Thread Clay Leeds
Andreas L. Delmelle wrote:
From: Clay Leeds [mailto:[EMAIL PROTECTED]

Thanks again for all of your collective (not to mention quick!) help on
this.
Maestro,

If mine is included, you're welcome of course. (No replies? Admittedly,
perhaps I do leave little to add ;) )
Don't worry... I don't think there's a plot out specifically to get you. 
(They're out to get me!)... Seriously, though... It just happened that I 
went to lunch after sending my original msg, and when I came back, there 
were a bunch of replies. IIRC I replied to the last message... In any 
case, I agreed with your statement that Eric's statement was extremely 
helpful.

Considering your specific case, I think the conditional addition of the
filename would indeed be helpful. Having that specific document name
included at least lessens the search time a bit (does away with first having
to ask the question of what exact date/time the document was printed).
That is correct. It would help. The funny thing is that we don't use the 
 Fiery printer too often (something like $0.20/page on our 
usage/service contract!). But when we need it, we need it! In any case, 
it would be nice to have the ability to pass an arg and have the 
document name used as the "file name" being printed, for anyone who has 
to "go back" in a queue and re-print anything.

If Glen judges that it would hardly be worth the effort, I can understand
perfectly that there are more important issues... So if need be, I'll just
enter a patch one of the coming days.
Sounds good, and thanks!

;-p