Re: RTF and table/column widths

2006-02-21 Thread Jeremias Maerki
I hate CVS, too, but in case you haven't noticed, we're on Subversion
for almost a year now. CVS services have been shut down within the ASF
last month.

http://xmlgraphics.apache.org/fop/download.html#source

On 22.02.2006 08:07:57 b.ohnsorg wrote:
> 
> - original Nachricht 
> 
> Betreff: Re: RTF and table/column widths
> Gesendet: Mo 20 Feb 2006 21:55:58 CET
> Von: "Jeremias Maerki"<[EMAIL PROTECTED]>
> 
> > Hey, we certainly don't mind if you look at the sources.
> That's pathetic, I could have coded it without your sources, but that would 
> have needed a few days more *g*.
> 
> > On the contrary,
> > we encourage people to look at it and to send in patches that help
> > improve FOP. We're certainly reviewing the stuff that comes in.
> Sure, no prob, I hate cvs and totally dislike commiting to such repos'
> 
> > If you
> > need any help to get started, just ask. The code-/design-level
> > documentation may not be as extensive as you might wish sometimes, but
> > there are always people around you can ask.
> Mkay, maybe there'll be a few minutes on thursday, at least friday's gonna be 
> productive. So at least on monday you'll get either the first questions or 
> patches.
> > 
> > On 20.02.2006 21:21:39 b.ohnsorg wrote:
> > > Hi there,
> > > 
> > > besides the stats my second mail and special offer. I really like that
> > > RTF-thingy and it's quite sophisticated documents. My RTF-XSLs were not
> > > that neat. I've hacked some workaround for the proportional widths
> > > coming from docbook transformations, but this is not really a good
> > > sollution.
> > > 
> > > So if you don't mind, I'd like to have a look at the sources and decide,
> > > whether I have enough time for adding the necessary bits and bytes or
> > > not. When it comes to java implementation I'm quite experienced, after a
> > > few years of professional software development (sdk, j2ee). (Now I'm
> > > part of the management, operating revision control systems, that sort of
> > > thing and I'd like to return to the "classics".)
> > > 
> > > I think it's nothing more than looking for the source of the runtime
> > > exception, expand that code like the PDF export and there you go
> > > (something like document.getWidth()*node.getWidthPercentage(),
> > basically).
> > > Hope there's enough documentation 'bout that and nobody out there being
> > > faster than me. I wrote some very basic RTF renderer half a year ago and
> > > had to cope with fancy tables, spannings and so on. Maybe there'll be
> > > some free border-collapse-give-away, if there's enough time *g*.
> > > 
> > > Thanks so far...


Jeremias Maerki


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



Re: Re: RTF and table/column widths

2006-02-21 Thread b . ohnsorg

- original Nachricht 

Betreff: Re: RTF and table/column widths
Gesendet: Mo 20 Feb 2006 21:55:58 CET
Von: "Jeremias Maerki"<[EMAIL PROTECTED]>

> Hey, we certainly don't mind if you look at the sources.
That's pathetic, I could have coded it without your sources, but that would 
have needed a few days more *g*.

> On the contrary,
> we encourage people to look at it and to send in patches that help
> improve FOP. We're certainly reviewing the stuff that comes in.
Sure, no prob, I hate cvs and totally dislike commiting to such repos'

> If you
> need any help to get started, just ask. The code-/design-level
> documentation may not be as extensive as you might wish sometimes, but
> there are always people around you can ask.
Mkay, maybe there'll be a few minutes on thursday, at least friday's gonna be 
productive. So at least on monday you'll get either the first questions or 
patches.
> 
> On 20.02.2006 21:21:39 b.ohnsorg wrote:
> > Hi there,
> > 
> > besides the stats my second mail and special offer. I really like that
> > RTF-thingy and it's quite sophisticated documents. My RTF-XSLs were not
> > that neat. I've hacked some workaround for the proportional widths
> > coming from docbook transformations, but this is not really a good
> > sollution.
> > 
> > So if you don't mind, I'd like to have a look at the sources and decide,
> > whether I have enough time for adding the necessary bits and bytes or
> > not. When it comes to java implementation I'm quite experienced, after a
> > few years of professional software development (sdk, j2ee). (Now I'm
> > part of the management, operating revision control systems, that sort of
> > thing and I'd like to return to the "classics".)
> > 
> > I think it's nothing more than looking for the source of the runtime
> > exception, expand that code like the PDF export and there you go
> > (something like document.getWidth()*node.getWidthPercentage(),
> basically).
> > Hope there's enough documentation 'bout that and nobody out there being
> > faster than me. I wrote some very basic RTF renderer half a year ago and
> > had to cope with fancy tables, spannings and so on. Maybe there'll be
> > some free border-collapse-give-away, if there's enough time *g*.
> > 
> > Thanks so far...
> 
> 
> Jeremias Maerki
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--- original Nachricht Ende 




Ihr Traumpartner ist nur einen Klick entfernt. 1 Million Singles warten auf Sie 
in
Deutschlands beliebtester Partnerboerse:
http://singles.freenet.de/index.html?pid=11512


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



Re: transparent background is black on the paper

2006-02-21 Thread Roland Neilands
I've seen this too. I just turned off transparency in the gif in an 
image editor and it worked fine.


Cheers,
Roland

Zmitko, Jan wrote:

Hallo Together,

I´ve an problem with printing my PDF generated by FOP 0.20.5. The generated
PDF looks corectly, however if I print these on my printer, the contained
logo looks bad. The transparent background of the image has black color. Has
any one an Idea, whats the reason of these problem?

Thanks a lot,

Jan

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

  


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



RE: Re how to embed a font programatically

2006-02-21 Thread Karl Roberts
Hi Jeremias,

Cheers for that. My main issue is that I wanted to as little hacking of
the underlying FOP as possible so that I can keep all my stuff in
separate extended classes (less source control issues) and do it as fast
as possible ;-)

Being quite new to FOP I am unaware of some of the design philosopies.
Injecting my own URIResolver is a much nicer solution than what I was
going to do.

So thanks again

Karl

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 21 February 2006 8:17 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Re how to embed a font programatically

I haven't done this from outside FOP, yet, but I can give you a
suggestion that I'd prefer in your case: Write a URIResolver
implementation that returns StreamSource instances for specific URIs.
You can take FOURIResolver as an example for how to do that. You can
then set the URIResolver instance on the FOUserAgent using
setURIResolver().

This allows you to specify the font URLs like this:
servlet-context:/WEB-INF/metric.xml

In your URIResolver you simply check if the URI starts with
"servlet-context:" and extract the path. You then simply construct a
StreamSource giving it the InputStream returned by getResourceAsStream
(). If a URI doesn't start with the above prefix just return null and
the default URIResolver will kick in.

The clue about all this is that you have to do less "FOP-hacking" and
instead use the normal configuration mechanism. It should only take 30
minutes to hack.

I hope that helps.

On 21.02.2006 03:41:01 Karl Roberts wrote:
> Hi,
> Did you ever manage to do this?
> 
> I need to do something similar because my embedded FOP is running in a

> Webapp and the font metric file and the TTF file are hidden inside the

> WEB-INF directory and so the metric-url and embed-url in my fop-config

> is no good (even if they were accessible via a URL I don't know the 
> hostname or context path until runtime)
> 
> What would be really nice is someway to pass the fontMetric and TTF 
> file to the Renderer as InputSource (or InputStream). This way I can 
> get the font files from the hidden WEB-INF dir using
> 
> InputStream fontmetric =
> serve.servlet.getServletContext().getResourceAsStream("/WEB-INF/metric
> .x
> ml");
> InputStream embed =
> serve.servlet.getServletContext().getResourceAsStream("/WEB-INF/font.T
> TF
> ");
> Renderer myRenderer = new PDFRenderer(); FontInfo myFontInfo = new 
> FontInfo();
> 
> // method needed ...(ahem)
> myFontInfo.addFont("FontName", "FontStyle", "FontWeight", fontmetric, 
> embed);
>  
> myRenderer.setupFontInfo(myFontInfo);
> userAgent.setRendererOverride(myRenderer);
> 
> Am I on the right track? Has anyone done this (or better) and mind 
> sharing the code?
> 
> Cheers
> 
> Karl
> 
> On 2006-01-26 16:22:42 Jeremias Maerki wrote:
> > Looking at the source code, you'd need to do the following:
> > - Subclass the Renderer implementation (ex. PDFRenderer) so you gain

> > access to the protected fontList member variable.
> > - Fill the fontList variable much like
> > FontSetup.buildFontListFromConfiguration() does. This code will need
> to
> > run before you start the rendering run or at least before
> > PrintRenderer.setupFontInfo() is called.
> > - Instantiate your subclassed Renderer yourself and set it on the 
> > FOUserAgent using setRendererOverride().
> >
> > Have fun!
> 
> > On 26.01.2006 16:59:17 Stefan Burkard wrote:
> >> hi fop-users
> >> 
> >> i know i can use a custom font by building an xml-file with it's 
> >> kerning-values and configuring a font definition in the
> user-config-file.
> >> 
> >> but how can i include the font programatically? i don't like to 
> >> have
> a
> >> user-config-file at all. i found examples to set the font-directory
> or
> >> base-directory programatically, but i didn't found an example for 
> >> configuring fonts directly in java.
> >> 
> >> can anybody help me?
> >> thanks
> >> stefan



Jeremias Maerki


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



NOTICE
This e-mail and any attachments are confidential and may contain copyright 
material of Macquarie Bank or third parties. If you are not the intended 
recipient of this email you should not read, print, re-transmit, store or act 
in reliance on this e-mail or any attachments, and should destroy all copies of 
them. Macquarie Bank does not guarantee the integrity of any emails or any 
attached files. The views or opinions expressed are the author's own and may 
not reflect the views or opinions of Macquarie Bank.


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



Re: JBoss 4 vs FOP commons logging clash - solved

2006-02-21 Thread Clay Leeds
I noticed that there/s an extra / and a ; here:C:\jboss-4.0.3SP1\bin\\run.jar;;\I don't know if it affects anything, but thought I should point it out.Also, once you iron out the details, it would be great if you could add a HowTo page to the FOP wiki:http://wiki.apache.org/xmlgraphics-fop/Thanks!Web Maestro ClayOn Feb 21, 2006, at 9:21 AM, [EMAIL PROTECTED] wrote:Thanks for the direction and the JCL wiki.  It helped in debugging what was going on.  OK, I have made some progress and have gotten them to work together.  My java classpath when running JBoss now looks like this (omitting unneccessary jars):  \prod_jars_091_14\avalon-framework-4.2.0.jar;\prod_jars_091_14\batik-all-1.6.jar;\prod_jars_091_14\serializer-2.7.0.jar;\prod_jars_091_14\xalan-2.7.0.jar;\prod_jars_091_14\xercesImpl-2.7.1.jar;\prod_jars_091_14\xml-apis-1.3.02.jar;\prod_jars_091_14\fop.jar;C:\jdk14\lib\tools.jar;C:\jboss-4.0.3SP1\bin\\run.jar;;\prod_jars_091_14\commons-io-1.1.jar;\prod_jars_091_14\commons-logging-1.0.4.jar;C:\jboss-4.0.3SP1\lib\log4j-boot.jar  The final change that seemed to fix this is the addition of the log4j-boot.jar directly to the classpath.  It exists in the root lib directory and the server's lib directory has the additional log4j.jar.  I have not tried any different ordering, but at least this gets it to boot and I can now render PDFs under 0.91.  I can probably move the commons and log4j jars before the tools.jar, but I have not had a chance to experiment with it.   I'm not saying that this is the best solution, but it seems to be a solution.  If I find anything else I will post it.  -Lou   Jeremias Maerki <[EMAIL PROTECTED]> wrote on 02/17/2006 15:37:03:  > Have a look at the JCL Wiki. Maybe that'll help you. There's something > specific to JBoss. It's probably all about the right placement of the > JARs. > http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions >  > I've heard a number of time that some people talk bad about JCL because > of class loading problems. I'm not familiar with the details. Maybe you > stumbled upon one of these problems. >  > Please keep us informed about any solutions you find for this. Maybe I > have some time on Sunday to download, install and try JBoss. >  > On 17.02.2006 20:28:12 Louis.Masters wrote: > > I'm running into a strange logging jar file issue when trying to run FOP  > > 0.91 under JBoss 4.0.3.  If I include the FOP logging jar  > > (commons-logging-1.0.4.jar) in my java classpath and then boot JBoss, I  > > get the following boot error: > >  > >  > > Caused by: org.apache.commons.logging.LogConfigurationException:  > > org.apache.commons.logging.LogConfigurationException: No suitable Log  > > constructor [Ljava.lang.Class;@c789fb for  > > org.apache.commons.logging.impl.Log4JLogger (Caused by  > > java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by  > > org.apache.commons.logging.LogConfigurationException: No suitable Log  > > constructor [Ljava.lang.Class;@c789fb for  > > org.apache.commons.logging.impl.Log4JLogger (Caused by  > > java.lang.NoClassDefFoundError: org/apache/log4j/Category)) > >         at  > > org.apache.commons.logging.impl.LogFactoryImpl. > newInstance(LogFactoryImpl.java:543) > >         at  > > org.apache.commons.logging.impl.LogFactoryImpl. > getInstance(LogFactoryImpl.java:235) > >  > >  > > When I use JBoss's logging jar (1.0.3) and omit the two commons-logging  > > jars from my classpath, JBoss boots OK, but I get the following error from  > > FOP: > >  > >  > > at  > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler. > processConnection(Http11Protocol.java:744) > >     at  > > org.apache.tomcat.util.net.PoolTcpEndpoint. > processSocket(PoolTcpEndpoint.java:527) > >     at  > > org.apache.tomcat.util.net.MasterSlaveWorkerThread. > run(MasterSlaveWorkerThread.java:112) > >     at java.lang.Thread.run(Thread.java:536)Caused by:  > > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory > >     at org.apache.fop.render.RendererFactory.(RendererFactory.java:47) > >     at org.apache.fop.apps.FOUserAgent.(FOUserAgent.java:83) > >     at com.lognet.reports.engine.FOPGenerator.(FOPGenerator.java:68) > >     at com.lognet.reports.engine.LNReport.renderReport(LNReport.java:1058) > >  > >  > > Does someone know how to get the two implementations to "play nice" with  > > one another?  I'm not that familiar with commons logging so I am a bit  > > lost. > >  > > Thanks, > > Lou >  >  >  > Jeremias Maerki >  >  > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >   Clay Leeds[EMAIL PROTECTED]My religion is simple. My religion is kindness.-- HH Dalai Lama of Tibet 

Re: JBoss 4 vs FOP commons logging clash - solved

2006-02-21 Thread Louis . Masters

Thanks for the direction and the JCL
wiki.  It helped in debugging what was going on.

OK, I have made some progress and have
gotten them to work together.  My java classpath when running JBoss
now looks like this (omitting unneccessary jars):

\prod_jars_091_14\avalon-framework-4.2.0.jar;\prod_jars_091_14\batik-all-1.6.jar;\prod_jars_091_14\serializer-2.7.0.jar;\prod_jars_091_14\xalan-2.7.0.jar;\prod_jars_091_14\xercesImpl-2.7.1.jar;\prod_jars_091_14\xml-apis-1.3.02.jar;\prod_jars_091_14\fop.jar;C:\jdk14\lib\tools.jar;C:\jboss-4.0.3SP1\bin\\run.jar;;\prod_jars_091_14\commons-io-1.1.jar;\prod_jars_091_14\commons-logging-1.0.4.jar;C:\jboss-4.0.3SP1\lib\log4j-boot.jar

The final change that seemed to fix
this is the addition of the log4j-boot.jar directly to the classpath.  It
exists in the root lib directory and the server's lib directory has the
additional log4j.jar.

I have not tried any different ordering,
but at least this gets it to boot and I can now render PDFs under 0.91.
 I can probably move the commons and log4j jars before the tools.jar,
but I have not had a chance to experiment with it. 

I'm not saying that this is the best
solution, but it seems to be a solution.  If I find anything else
I will post it.

-Lou


Jeremias Maerki <[EMAIL PROTECTED]> wrote
on 02/17/2006 15:37:03:

> Have a look at the JCL Wiki. Maybe that'll help you. There's something
> specific to JBoss. It's probably all about the right placement of
the
> JARs.
> http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions
> 
> I've heard a number of time that some people talk bad about JCL because
> of class loading problems. I'm not familiar with the details. Maybe
you
> stumbled upon one of these problems.
> 
> Please keep us informed about any solutions you find for this. Maybe
I
> have some time on Sunday to download, install and try JBoss.
> 
> On 17.02.2006 20:28:12 Louis.Masters wrote:
> > I'm running into a strange logging jar file issue when trying
to run FOP 
> > 0.91 under JBoss 4.0.3.  If I include the FOP logging jar

> > (commons-logging-1.0.4.jar) in my java classpath and then boot
JBoss, I 
> > get the following boot error:
> > 
> > 
> > Caused by: org.apache.commons.logging.LogConfigurationException:

> > org.apache.commons.logging.LogConfigurationException: No suitable
Log 
> > constructor [Ljava.lang.Class;@c789fb for 
> > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused
by 
> > org.apache.commons.logging.LogConfigurationException: No suitable
Log 
> > constructor [Ljava.lang.Class;@c789fb for 
> > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > java.lang.NoClassDefFoundError: org/apache/log4j/Category))
> >         at 
> > org.apache.commons.logging.impl.LogFactoryImpl.
> newInstance(LogFactoryImpl.java:543)
> >         at 
> > org.apache.commons.logging.impl.LogFactoryImpl.
> getInstance(LogFactoryImpl.java:235)
> > 
> > 
> > When I use JBoss's logging jar (1.0.3) and omit the two commons-logging

> > jars from my classpath, JBoss boots OK, but I get the following
error from 
> > FOP:
> > 
> > 
> > at 
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> processConnection(Http11Protocol.java:744)
> >     at 
> > org.apache.tomcat.util.net.PoolTcpEndpoint.
> processSocket(PoolTcpEndpoint.java:527)
> >     at 
> > org.apache.tomcat.util.net.MasterSlaveWorkerThread.
> run(MasterSlaveWorkerThread.java:112)
> >     at java.lang.Thread.run(Thread.java:536)Caused
by: 
> > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> >     at org.apache.fop.render.RendererFactory.(RendererFactory.java:47)
> >     at org.apache.fop.apps.FOUserAgent.(FOUserAgent.java:83)
> >     at com.lognet.reports.engine.FOPGenerator.(FOPGenerator.java:68)
> >     at com.lognet.reports.engine.LNReport.renderReport(LNReport.java:1058)
> > 
> > 
> > Does someone know how to get the two implementations to "play
nice" with 
> > one another?  I'm not that familiar with commons logging
so I am a bit 
> > lost.
> > 
> > Thanks,
> > Lou
> 
> 
> 
> Jeremias Maerki
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: transparent background is black on the paper

2006-02-21 Thread cknell
I had a similar problem when printing to a laser printer. I solved it by 
placing a white rectangle behind the image.


-- 
Charles Knell
[EMAIL PROTECTED] - email


> -Original Message-
> From: Zmitko, Jan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 21, 2006 10:07 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: transparent background is black on the paper
> 
> Hallo Together,
> 
> I´ve an problem with printing my PDF generated by FOP 0.20.5. 
> The generated PDF looks corectly, however if I print these on 
> my printer, the contained logo looks bad. The transparent 
> background of the image has black color. Has any one an Idea, 
> whats the reason of these problem?
> 
> Thanks a lot,
> 
> Jan


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



RE: transparent background is black on the paper

2006-02-21 Thread Gosselin, Michael
I'm of no further help; I don't know anything about the Lexmark printers.
At least we know it's not the PDF, because it printed properly to the
Deskjet.

Anyone else?

Michael 

> -Original Message-
> From: Zmitko, Jan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 21, 2006 11:06 AM
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: AW: transparent background is black on the paper
> 
> yes, I print from the PDF File. Printer settings, what should 
> I check? I´ve these problem with the following printer:
> 
> - "Lexmark C762" (color printer)
> - "Lexmark W812" 
> 
> I´ve now print the PDF Dokument on a "HP DeskJet 5652" and 
> here is all right. 
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Gosselin, Michael [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 21. Februar 2006 16:39
> An: 'fop-users@xmlgraphics.apache.org'
> Betreff: RE: transparent background is black on the paper
> 
> 
> Well, first things first.  Did you check the printer settings 
> when you printed from PDF?
> 
> I guess just as important is, did you *print* from PDF?  I've 
> created PCL files with FOP, and the images are all black and white.
> 
> Let us know.
> 
> Michael 
> 
> > -Original Message-
> > From: Zmitko, Jan [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 21, 2006 10:07 AM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: transparent background is black on the paper
> > 
> > Hallo Together,
> > 
> > I´ve an problem with printing my PDF generated by FOP 0.20.5. 
> > The generated PDF looks corectly, however if I print these on my 
> > printer, the contained logo looks bad. The transparent 
> background of 
> > the image has black color. Has any one an Idea, whats the reason of 
> > these problem?
> > 
> > Thanks a lot,
> > 
> > Jan
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



AW: transparent background is black on the paper

2006-02-21 Thread Zmitko, Jan
yes, I print from the PDF File. Printer settings, what should I check? I´ve
these problem with the following printer:

- "Lexmark C762" (color printer)
- "Lexmark W812" 

I´ve now print the PDF Dokument on a "HP DeskJet 5652" and here is all
right. 



-Ursprüngliche Nachricht-
Von: Gosselin, Michael [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 21. Februar 2006 16:39
An: 'fop-users@xmlgraphics.apache.org'
Betreff: RE: transparent background is black on the paper


Well, first things first.  Did you check the printer settings when you
printed from PDF?

I guess just as important is, did you *print* from PDF?  I've created PCL
files with FOP, and the images are all black and white.

Let us know.

Michael 

> -Original Message-
> From: Zmitko, Jan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 21, 2006 10:07 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: transparent background is black on the paper
> 
> Hallo Together,
> 
> I´ve an problem with printing my PDF generated by FOP 0.20.5. 
> The generated PDF looks corectly, however if I print these on 
> my printer, the contained logo looks bad. The transparent 
> background of the image has black color. Has any one an Idea, 
> whats the reason of these problem?
> 
> Thanks a lot,
> 
> Jan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

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



RE: transparent background is black on the paper

2006-02-21 Thread Gosselin, Michael
Well, first things first.  Did you check the printer settings when you
printed from PDF?

I guess just as important is, did you *print* from PDF?  I've created PCL
files with FOP, and the images are all black and white.

Let us know.

Michael 

> -Original Message-
> From: Zmitko, Jan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 21, 2006 10:07 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: transparent background is black on the paper
> 
> Hallo Together,
> 
> I´ve an problem with printing my PDF generated by FOP 0.20.5. 
> The generated PDF looks corectly, however if I print these on 
> my printer, the contained logo looks bad. The transparent 
> background of the image has black color. Has any one an Idea, 
> whats the reason of these problem?
> 
> Thanks a lot,
> 
> Jan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



transparent background is black on the paper

2006-02-21 Thread Zmitko, Jan
Hallo Together,

I´ve an problem with printing my PDF generated by FOP 0.20.5. The generated
PDF looks corectly, however if I print these on my printer, the contained
logo looks bad. The transparent background of the image has black color. Has
any one an Idea, whats the reason of these problem?

Thanks a lot,

Jan

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



Re: Re how to embed a font programatically

2006-02-21 Thread Jeremias Maerki
I haven't done this from outside FOP, yet, but I can give you a
suggestion that I'd prefer in your case: Write a URIResolver
implementation that returns StreamSource instances for specific URIs.
You can take FOURIResolver as an example for how to do that. You can
then set the URIResolver instance on the FOUserAgent using
setURIResolver().

This allows you to specify the font URLs like this:
servlet-context:/WEB-INF/metric.xml

In your URIResolver you simply check if the URI starts with
"servlet-context:" and extract the path. You then simply construct a
StreamSource giving it the InputStream returned by getResourceAsStream
(). If a URI doesn't start with the above prefix just return null and
the default URIResolver will kick in.

The clue about all this is that you have to do less "FOP-hacking" and
instead use the normal configuration mechanism. It should only take 30
minutes to hack.

I hope that helps.

On 21.02.2006 03:41:01 Karl Roberts wrote:
> Hi,
> Did you ever manage to do this?
> 
> I need to do something similar because my embedded FOP is running in a
> Webapp and the font metric file and the TTF file are hidden inside the
> WEB-INF directory and so the metric-url and embed-url in my fop-config
> is no good (even if they were accessible via a URL I don't know the
> hostname or context path until runtime)
> 
> What would be really nice is someway to pass the fontMetric and TTF file
> to the Renderer as InputSource (or InputStream). This way I can get the
> font files from the hidden WEB-INF dir using
> 
> InputStream fontmetric =
> serve.servlet.getServletContext().getResourceAsStream("/WEB-INF/metric.x
> ml");
> InputStream embed =
> serve.servlet.getServletContext().getResourceAsStream("/WEB-INF/font.TTF
> "); 
> Renderer myRenderer = new PDFRenderer();
> FontInfo myFontInfo = new FontInfo();
> 
> // method needed ...(ahem)
> myFontInfo.addFont("FontName", "FontStyle", "FontWeight", fontmetric,
> embed);
>  
> myRenderer.setupFontInfo(myFontInfo);
> userAgent.setRendererOverride(myRenderer);
> 
> Am I on the right track? Has anyone done this (or better) and mind
> sharing the code?
> 
> Cheers
> 
> Karl
> 
> On 2006-01-26 16:22:42 Jeremias Maerki wrote:
> > Looking at the source code, you'd need to do the following:
> > - Subclass the Renderer implementation (ex. PDFRenderer) so you gain
> > access to the protected fontList member variable.
> > - Fill the fontList variable much like
> > FontSetup.buildFontListFromConfiguration() does. This code will need
> to
> > run before you start the rendering run or at least before
> > PrintRenderer.setupFontInfo() is called.
> > - Instantiate your subclassed Renderer yourself and set it on the
> > FOUserAgent using setRendererOverride().
> >
> > Have fun!
> 
> > On 26.01.2006 16:59:17 Stefan Burkard wrote:
> >> hi fop-users
> >> 
> >> i know i can use a custom font by building an xml-file with it's 
> >> kerning-values and configuring a font definition in the
> user-config-file.
> >> 
> >> but how can i include the font programatically? i don't like to have
> a 
> >> user-config-file at all. i found examples to set the font-directory
> or 
> >> base-directory programatically, but i didn't found an example for 
> >> configuring fonts directly in java.
> >> 
> >> can anybody help me?
> >> thanks
> >> stefan



Jeremias Maerki


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



Re: Help needed for allowing spaces in PDF O/P using fop-0.91beta version

2006-02-21 Thread Jeremias Maerki

On 21.02.2006 09:35:22 nitin.shrivastava wrote:
> content-width="scale-to-fit" content-height="scale-to-fit"
> for fo:external-graphic does not allow be to put the absolute size of image
> ...

Why do you think so? Have a look at the specification at 
http://www.w3.org/TR/xsl/slice6.html#fo_external-graphic
and you'll see that this works. There are examples in
examples/fo/basic/images.fo which demonstrate all the different property
combinations. scale-to-fit causes the image to be scaled so it fits into
the viewport box defined by the width and height properties.

> Can you suggest any workaround to allow Leading spaces in my case ???

If there was one, we would have given it. The only solution is to fix
the problem in the source code. Sorry. You can try to work with
start-indent or margin-left. It's not the same but maybe it helps in
your case.

> 
> 
> 
> Thanks & Regards,
> Nitin Shrivastava
> POLARIS SOFTWARE LAB Ltd.
> Indiana Business Center
> +91-22-56482255
> 
> 
> 
> 
> 
>   
>  
>   Jeremias Maerki 
>  
>   <[EMAIL PROTECTED] To:  
> fop-users@xmlgraphics.apache.org  
>  
>   erki.ch> cc:  [EMAIL PROTECTED] 
>
>Subject: Re: Help needed for 
> allowing spaces in PDF O/P using fop-0.91beta  
>   02/21/2006 01:15 version
>  
>   PM  
>  
>   
>  
>   
>  
> 
> 
> 
> 
> Nitin Shrivastava does not appear to be on the list so I put the mail
> address in the CC.
> 
> In addition to Manuel's reply I want to add something to the question
> further down:
> 
> If you want to have an image appear in a box of a certain size, use this
> pattern:
> 
>  content-width="scale-to-fit" content-height="scale-to-fit" src=""/>
> 
> On 20.02.2006 12:54:30 Manuel Mall wrote:
> > The white space handling for linefeed-treatment="preserve" is currently
> > not correct for fop trunk. Leading spaces are incorrectly deleted.
> >
> > Manuel
> >
> > On Monday 20 February 2006 19:17, [EMAIL PROTECTED] wrote:
> > > Regards,
> > > Nitin Shrivastava
> > > POLARIS SOFTWARE LAB Ltd.
> > > Indiana Business Center
> > > +91-22-56482255
> > > -
> > >
> > >
> > > "LUCK is what happens when PREPARATION meets OPPORTUNITY"
> > >
> > >
> > > - Forwarded by nitin.shrivastava/Polaris on 02/20/2006 04:45 PM
> > > -
> > >
> > >   nitin.shrivastava
> > >To:  Jeremias
> > > Maerki <[EMAIL PROTECTED]> 02/20/2006 03:31 cc:
> > > [EMAIL PROTECTED], [EMAIL PROTECTED] PM
> > >Subject: Help needed for allowing spaces in PDF O/P
> > > using fop-0.91beta version(Document link: nitin.shrivastava)
> > >
> > >
> > >
> > >
> > > Hi,
> > >
> > > With FOP  0.91 beta version I was able to overlapp the data over
> > > image. Now the problem I am facing is w.r.t the space in the XML file
> > > which is getting  ignored in PDF output .
> > >
> > > My XML data between tags is as shown below
> > >
> > > |
> > > |
> > > |---|
> > > |
> > > |  AA B   CC  DD
> > >
> > > EE  |
> > >
> > > | AA  B  40041
> > > |
> > > |0
> > > |
> > > |
> > > |
> > > |---|
> > >
> > > My XSL is
> > >
> > >  > > page-width="714.78pt" margin-top="0cm" margin-bottom="0cm"
> > > margin-left="0cm" margin-right="0cm">
> > >  > > margin-left="0in" margin-right="0in"/>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  > > white-space-treatment="preserve" white-space-collapse="false" >
> > > 
> > > 
> > > 
> > > 
> > >
> > > The PDF O/P that I get is
> > >
> > > |---

Re: Help needed for allowing spaces in PDF O/P using fop-0.91beta version

2006-02-21 Thread nitin . shrivastava





content-width="scale-to-fit" content-height="scale-to-fit"
for fo:external-graphic does not allow be to put the absolute size of image
...

Can you suggest any workaround to allow Leading spaces in my case ???




Thanks & Regards,
Nitin Shrivastava
POLARIS SOFTWARE LAB Ltd.
Indiana Business Center
+91-22-56482255






   
  Jeremias Maerki   
   
  <[EMAIL PROTECTED] To:  
fop-users@xmlgraphics.apache.org   
  erki.ch> cc:  [EMAIL PROTECTED]   
 
   Subject: Re: Help needed for 
allowing spaces in PDF O/P using fop-0.91beta  
  02/21/2006 01:15 version  
   
  PM
   

   

   




Nitin Shrivastava does not appear to be on the list so I put the mail
address in the CC.

In addition to Manuel's reply I want to add something to the question
further down:

If you want to have an image appear in a box of a certain size, use this
pattern:



On 20.02.2006 12:54:30 Manuel Mall wrote:
> The white space handling for linefeed-treatment="preserve" is currently
> not correct for fop trunk. Leading spaces are incorrectly deleted.
>
> Manuel
>
> On Monday 20 February 2006 19:17, [EMAIL PROTECTED] wrote:
> > Regards,
> > Nitin Shrivastava
> > POLARIS SOFTWARE LAB Ltd.
> > Indiana Business Center
> > +91-22-56482255
> > -
> >
> >
> > "LUCK is what happens when PREPARATION meets OPPORTUNITY"
> >
> >
> > - Forwarded by nitin.shrivastava/Polaris on 02/20/2006 04:45 PM
> > -
> >
> >   nitin.shrivastava
> >To:  Jeremias
> > Maerki <[EMAIL PROTECTED]> 02/20/2006 03:31 cc:
> > [EMAIL PROTECTED], [EMAIL PROTECTED] PM
> >Subject: Help needed for allowing spaces in PDF O/P
> > using fop-0.91beta version(Document link: nitin.shrivastava)
> >
> >
> >
> >
> > Hi,
> >
> > With FOP  0.91 beta version I was able to overlapp the data over
> > image. Now the problem I am facing is w.r.t the space in the XML file
> > which is getting  ignored in PDF output .
> >
> > My XML data between tags is as shown below
> >
> > |
> > |
> > |---|
> > |
> > |  AA B   CC  DD
> >
> > EE  |
> >
> > | AA  B  40041
> > |
> > |0
> > |
> > |
> > |
> > |---|
> >
> > My XSL is
> >
> >  > page-width="714.78pt" margin-top="0cm" margin-bottom="0cm"
> > margin-left="0cm" margin-right="0cm">
> >  > margin-left="0in" margin-right="0in"/>
> > 
> > 
> > 
> > 
> > 
> > 
> >  > white-space-treatment="preserve" white-space-collapse="false" >
> > 
> > 
> > 
> > 
> >
> > The PDF O/P that I get is
> >
> > |
> > |
> > |---|
> > |
> > |AA B   CC  DD
> >
> > EE|
> >
> > |AA  B 40041
> > |
> > |0
> > |
> > |
> > |
> > |---|
> >
> > Here the sapce inbetween the data "A" ,"B" is maintained in
> > the output but the intial spaces are getting neglected which
> > we need to display in the PDF O/P.
> >
> > Can you please suggest me where am I making the mistake / or I need
> > to specify any addition property in the flow/block-container/or block
> > level.
> > Or any other workaround to maintain these initial spaces at every
> > line as maintianed in the XML file.
> >
> > One more query the image which I am trying the