Re: fop-ttfreader - output bounding box information for characters?

2013-01-08 Thread Peter Hancock
Hi Alexey,

I am happy to apply the patch and I have done something equivalent to this
as part of the the project to configure Batik to use custom fonts.

Going forward, we hope to allow Batik to directly use Font provided by FOP
when converting SVG to Java2D drawing commands.  FOP will render text
natively with no need to pre-embed the Font into the SVG.  As mentioned
this is a fairly involved piece of work that may even lead to a new Font
library in XML Graphics, see http://markmail.org/thread/hkclkqaxlfh5wwvu.

Thanks,

Peter


On Tue, Jan 8, 2013 at 8:10 AM, Chris Bowditch
wrote:

> On 08/01/2013 07:52, Alexey Neyman wrote:
>
>>
>> Hi Chris,
>>
>>
> Hi Alexey,
>
>
>  On Monday, January 07, 2013 11:44:46 AM Chris Bowditch wrote:
>>
>> >>>> Patch from pMML2SVG, slightly modified to apply to FOP 1.1 sources,
>>
>> >>>> attached.
>>
>> >>>
>>
>> >>> Thanks for the patch. To get this added to the code base please raise
>> an
>>
>> >>> issue in JIRA, add the diff as an attachment and include [PATCH] in
>> the
>>
>> >>> subject line. A committer will then review the patch before applying
>> it.
>>
>> >>
>>
>> >> Created an issue:
>>
>> >> https://issues.apache.org/**jira/browse/FOP-2180<https://issues.apache.org/jira/browse/FOP-2180>
>>
>> >
>>
>> > Thank you.
>>
>> So, can this patch be reviewed/integrated?
>>
>>
> That shouldn't be a problem. As I indicated Peter is working in a similar
> area right now, so I will ask him if he can take a look.
>
>
>  > >> I know Peter Hancock is looking into doing something similar as he is
>>
>> > >> working on getting Batik to use FOP configured fonts instead of the
>>
>> > >> system ones. Peter mentioned to me offlist that he was going to need
>> to
>>
>> > >> expose a few extra things in TTFReader to facilitate this, could be
>> you
>>
>> > >> are covering similar ground here.
>>
>> > >
>>
>> > > Maybe. Then again, the root of the issue is not Batik - that issue I
>> work
>>
>> > > around by embedding fonts. It is JEuclid's use of system fonts which
>> is
>>
>> > > why I am switching to pMML2SVG - which needs bounding box information
>> for
>>
>> > > glyphs.
>>
>> > >
>>
>> > > BTW, another useful feature in pMML2SVG that was not available in
>> JEuclid
>>
>> > > is that pMML2SVG outputs baseline position information in the
>> generated
>>
>> > > SVG - so that inline equations can be properly positioned on the line.
>>
>> >
>>
>> > Sounds like we need a FOP plug-in for pMML2SVG to replace the ageing
>>
>> > JEuclid one.
>>
>> Pardon my ignorance, but what is FOP using for the XSL transformation? Is
>> it Xalan-based? In that case, it probably won't be sufficient: pMML2SVG
>> requires XSLT 2.0, which, as far as I understand, is only supported by
>> Saxon.
>>
>>
> You can use whichever XSLT processor you choose with FOP, as long as you
> feed FOP with XSL-FO.
>
>
> Thanks,
>
> Chris
>
>  Regards,
>>
>> Alexey.
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> fop-users-unsubscribe@**xmlgraphics.apache.org
> For additional commands, e-mail: 
> fop-users-help@xmlgraphics.**apache.org
>
>


Re: Rounded corner

2012-06-20 Thread Peter Hancock
Hi Franck,

The first thing I plan to do is merge trunk into the rounded corners
branch.  That would be a good time for you to build the branch and
generate some examples. Support for tables, for example, is currently
fairly limited and I have not done a detailed assessment to determine
what is outstanding.  Any examples that illustrate the current level
of support would be a of great help towards documenting this.

Thanks,

Peter

On Tue, Jun 19, 2012 at 8:53 AM, franck FIMBEL  wrote:
> Thanks for the update.
> I will keep an eye on the mailing lists for this very promising feature.
> In the meantime, if there is anything we can do to help on this
> (obviously not development but maybe some testing), we would glad to
> do so.
>
> Franck
>
> On Tue, Jun 19, 2012 at 8:50 AM, Peter Hancock  
> wrote:
>> Hi Franck,
>>
>> As eluded to by Rob, I am hoping to revisit the rounded corners work
>> soon.  The supported output formats will be restricted to PDF, PS and
>> AFP.
>>
>> Thanks,
>>
>> Peter
>>
>> On Mon, Jun 18, 2012 at 8:43 PM, Robert Meyer  wrote:
>>> Hi,
>>>
>>> Plans are currently underway to merge the branch with Trunk. I was
>>> responsible for updating the tests to JUnit 4 (much like the TrueType
>>> branch), but that task has been put on hold until the merge has taken place.
>>>
>>> At the moment I think the task rests with one of the committers, but it is a
>>> busy time building up to a release (1.1), so I cannot give you any
>>> timescales or release on when it might become available.
>>>
>>> Unless the person working on it has an update, I would recommend keeping an
>>> eye on the mailing list for a vote on merging the branch for a specific
>>> release.
>>>
>>> Regards,
>>>
>>> Robert Meyer
>>>
>>>> From: ffim...@gmail.com
>>>> Date: Mon, 18 Jun 2012 18:47:52 +0200
>>>> Subject: Rounded corner
>>>> To: fop-users@xmlgraphics.apache.org
>>>
>>>>
>>>> Hi all,
>>>>
>>>> I would be very interested in using rounded corners functionality with
>>>> block of paragraphs. Browsing the wiki I saw that a branch named
>>>> Temp_RoundedCorners exists with an implementation for rounded corners.
>>>>
>>>> Is there any plan to merge this functionality to a specific release or
>>>> to the trunk ?
>>>>
>>>> Thanks in advance
>>>> Regards
>>>>
>>>> --
>>>> Franck
>>>>
>>>> -
>>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>
>
>
> --
> Franck
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>

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



Re: "Unable to load font file" due to NullPointerException?

2012-06-18 Thread Peter Hancock
Hi Phillip,

Could you provide instructions to locate the font and provide an .fo
that demonstrates the issue, please.  Can you also tell us what
version of FOP you are using.

Thanks,

Peter

On Thu, Jun 14, 2012 at 12:39 PM, Phillip B Oldham
 wrote:
> Hi all
>
> Still having trouble loading custom fonts - this time with a different 
> approach.
>
> This time I'm running FOP instance with the following xml config:
>
> 
> 
>  .
>  72
>  72
>  
>  
>    
>      
>        fonts
>      
>    
>  
> 
>
> When I start my app which uses FOP, the log displays the following error:
>
> WARNING: Unable to load font file:
> file:/Users/me/Projects/myproject/fonts/League_Gothic.ttf. Reason:
> java.lang.NullPointerException
>
> The path to the font is correct, the font exists and FontBook (I'm on
> a mac) can read the font without issue (it's an open-source/free
> font).
>
> Any ideas what the error might be this time?
>
> --
> Phillip B Oldham
> phillip.old...@gmail.com
> +44 (0) 7525 01 09 01
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>

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



Re: Rounded corner

2012-06-18 Thread Peter Hancock
Hi Franck,

As eluded to by Rob, I am hoping to revisit the rounded corners work
soon.  The supported output formats will be restricted to PDF, PS and
AFP.

Thanks,

Peter

On Mon, Jun 18, 2012 at 8:43 PM, Robert Meyer  wrote:
> Hi,
>
> Plans are currently underway to merge the branch with Trunk. I was
> responsible for updating the tests to JUnit 4 (much like the TrueType
> branch), but that task has been put on hold until the merge has taken place.
>
> At the moment I think the task rests with one of the committers, but it is a
> busy time building up to a release (1.1), so I cannot give you any
> timescales or release on when it might become available.
>
> Unless the person working on it has an update, I would recommend keeping an
> eye on the mailing list for a vote on merging the branch for a specific
> release.
>
> Regards,
>
> Robert Meyer
>
>> From: ffim...@gmail.com
>> Date: Mon, 18 Jun 2012 18:47:52 +0200
>> Subject: Rounded corner
>> To: fop-users@xmlgraphics.apache.org
>
>>
>> Hi all,
>>
>> I would be very interested in using rounded corners functionality with
>> block of paragraphs. Browsing the wiki I saw that a branch named
>> Temp_RoundedCorners exists with an implementation for rounded corners.
>>
>> Is there any plan to merge this functionality to a specific release or
>> to the trunk ?
>>
>> Thanks in advance
>> Regards
>>
>> --
>> Franck
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>

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



Re: FOP 1.0 - TLE values based on XML values

2012-03-22 Thread Peter Hancock
Hi Simone,

Have you considered applying an XSLT transform to the fo document, or
during any process you may have that generates the fo?  An explanation
of the steps required to achieve this are outside of the scope of this
mailing list:  If you are new to XSLT, try taking a look at [1] and
browsing [2].

Good luck!

Peter

[1] http://www.w3schools.com/xsl/
[2] http://www.mulberrytech.com/xsl/xsl-list/


On Wed, Mar 21, 2012 at 9:58 PM, Simone  wrote:
> Hi, all. I am new to FOP.
> I am successfully creating AFP files but now I am facing a problem with TLE
> values.
>
> It seems I can only set fixed values for TLE. I mean:
> .
>
> What I'd like to have is something like this:
> 

Re: LazyFont and MultiByteFont NullPointerException

2012-01-12 Thread Peter Hancock
Hi Harshini,

Can you provide a little more context regarding this issue, please.
Are you able to provide us with the steps  and resources to reproduce
the issue?  You may not be able to post the font on the mailing list
(for legal and practical reasons), but if we can begin by taking a
look at the your fo, fop.xconf etc, a solution may not require that.
If we determine that we need to see the font, we can arrange you to
email it privately.

Thanks,

Peter

On Thu, Jan 12, 2012 at 7:12 AM, Harshini Madurapperuma
 wrote:
> Hi All
>
>
>
> When rendering the report I get following exception. Do you have any clue
> about this?
>
> Thanks in Advance
>
> Harshini
>
>
>
> --java.lang.NullPointerException: null
>
> --org.apache.fop.render.pdf.fonts.LazyFont.mapChar(LazyFont.java:121)
>
> --org.apache.fop.layout.FontState.mapChar(FontState.java:212)
>
> --org.apache.fop.layout.FontState.getCharWidth(FontState.java:269)
>
>
>
> --and
>
>
>
> --java.lang.NullPointerException: null
>
>
>
> --org.apache.fop.render.pdf.fonts.MultiByteFont.width(MultiByteFont.java:320)
>
> --org.apache.fop.render.pdf.fonts.LazyFont.width(LazyFont.java:157)
>
> --org.apache.fop.layout.FontState.width(FontState.java:202)
>
> --
>
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This e-mail, including any attachments, is confidential and for use only by
> the intended recipient. If you are not the intended recipient, please notify
> us immediately and delete this e-mail from your system. Any use or
> disclosure
> of the information contained herein is strictly prohibited. As internet
> communications are not secure, we do not accept legal responsibility for the
> contents of this message nor responsibility for any change made to this
> message after it was sent by the original sender. We advise you to carry out
> your own virus check as we cannot accept liability for damage resulting from
> software viruses.
>

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



Re: AFP & FOP Font Problem

2011-09-07 Thread Peter Hancock
Hi Gregoire,

The font element should be a child of the fonts element in your fop.xconf.

Try that and please let me know if you need more help.

Peter

On Wed, Sep 7, 2011 at 10:43 AM, Gregoire Meier  wrote:
> Hi Peter,
>
> Thank you for your answer.
> I have tried with FOP version 0.95 (but same result with 1.0)
> I would like to use the 0.95 version (if possible)
>
> About the ./font/ibm directory, I already have tried several form (also the
> full path) without success. I seems that it does not read the  part of
> the configuration file (but I am sure that it open the right configuration
> file, because I have tried to add some xml error within this file, and the
> parser detect it)
>
> My fop.xconf look like this :
>
> 
> 
> 
>
> 
>
> 
> 
>
>  
>  .
>
>  
>  72
>  
>  72
>
>  
>  
>
>  
>  
>  
>
>
>        
>          
>
>                        
>                        
>                        
>                                          
>                                 codepage="T1EX" encoding="Cp1146" path="./fonts/ibm">
>
>                                         characterset="C0ZA05K0"/>
>                                         characterset="C0ZA00K0"/>
>                                         characterset="C0ZA05E0"/>
>                                         characterset="C0ZA00G0"/>
>                                         characterset="C0ZA0080"/>
>                                         characterset="C0ZA00I0"/>
>                                         characterset="C0ZA00M0"/>
>
>                                
>
>                        
>
>                         weight="normal"/>
>
>
>                  
>        
>
>
>  
>
> 
>
>
>
> Thanks for your help,
> Gregoire
>
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: AFP & FOP Font Problem

2011-09-07 Thread Peter Hancock
Hi Gregoire,

Which version of FOP are you using and have you checked the
documentation at http://xmlgraphics.apache.org/fop (e.g.
http://xmlgraphics.apache.org/fop/trunk/configuration.html for
configuring trunk)?

Without seeing your fop.xconf o in full I would guess that the
font-base is not set correctly, and thus the relative url ./fonts/ibm
does not resolve to what you want (this guess is based on how
frequently this happens).

If you have not already, hve a further read of the docs, tell us the
version of FOP and perhaps attach your fop.xconf.

Peter


On Tue, Sep 6, 2011 at 8:51 PM, Gregoire Meier  wrote:
> FopFactory fopFactory = FopFactory.newInstance();
> FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> fopFactory.setUserConfig(new File("./conf/fop.xconf"));
> out = new FileOutputStream(afp);
> out = new BufferedOutputStream(out);
> Fop fop = fopFactory.newFop(MimeConstants.MIME_AFP, foUserAgent, out);
>
>
> ---> 6 sept. 2011 17:43:39 org.apache.fop.render.afp.AFPRenderer setupFontInfo
> ATTENTION: No AFP fonts configured - using default setup
>
>
>
>
> Hi all,
>
> I have some problems with FOP & AFP.
> I would like to setup fonts for an AFP output.
>
> The Java code is :
>
> FopFactory fopFactory = FopFactory.newInstance();
> FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> fopFactory.setUserConfig(new File("./conf/fop.xconf"));
> out = new FileOutputStream(afp);
> out = new BufferedOutputStream(out);
> Fop fop = fopFactory.newFop(MimeConstants.MIME_AFP, foUserAgent, out);
>
> and it always responds :
> org.apache.fop.render.afp.AFPRenderer setupFontInfo
> ATTENTION: No AFP fonts configured - using default setup
>
>
> but into fop.xconf I have
> ...
> 
>  
>  
>   ...
>  
>  
> ...
>
>
> Any idea is welcome
>
> Thanks
> Greg
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Multi Threaded FOP?

2011-06-09 Thread Peter Hancock
Hi Theresa,

I believe there are multi-threading gotchas when embedding FOP and her
dependencies; see
http://xmlgraphics.apache.org/fop/0.95/embedding.html#multithreading,

There are certainly many multi-threaded production systems that have
successfully embed FOP and it would be nice to know some of the issues
that were faced whilst they were being developed.  it would be very
useful to have a page on the website, or perhaps on the wiki dedicated
to this subject, included some war stories and solutions devised.

Peter

On Thu, Jun 9, 2011 at 9:26 AM, Theresa Jayne Forster
 wrote:
> I am looking into redoing my FOP integration and maybe adding it into some
> form of MQ service,
>
> So many applications can request fop functionality and then have their
> response sent on the MQQueue,
>
> How Threadsafe is the Fop engine? Or is the current newFopInstance from a
> singleton factory instance totally threadsafe?
>
>
>
> Are there any catcha’s I need to be aware of?
>
>
>
> Kindest regards
>
>
>
> Theresa Forster
>
> Senior Software Developer
>
>

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



Re: Arabic Font in FOP

2011-06-03 Thread Peter Hancock
Hi,

You are going to have to checkout the branch

http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ComplexScripts/
using subversion: info here http://xmlgraphics.apache.org/fop/download.html

Once you have the codebase you have to build it: info here
http://xmlgraphics.apache.org/fop/trunk/compiling.html

Good luck!

Pete

>

On Fri, Jun 3, 2011 at 6:12 AM, suri16kk  wrote:
>
> Hi Pete,
>
> Thanks for your reply.
> I am not sure how to get the fop version info. Please assist.
>
> I am using the "Intersystems ZEN" reporting engine to convert then xml to
> fo.
> I have attached the files for your reference.
>
> http://old.nabble.com/file/p31762930/pdfOutput.JPG pdfOutput.JPG
> http://old.nabble.com/file/p31762930/fop%2Bmessages.txt fop+messages.txt
> http://old.nabble.com/file/p31762930/xslfo.xml xslfo.xml
> http://old.nabble.com/file/p31762930/toxslfo.xml toxslfo.xml
> http://old.nabble.com/file/p31762930/tohtml.xml tohtml.xml
> --
> View this message in context: 
> http://old.nabble.com/Arabic-Font-in-FOP-tp31759175p31762930.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Arabic Font in FOP

2011-06-02 Thread Peter Hancock
Hi,

Are you using a version of FOP built from the arabic support branch?
Arabic support is not currently available in trunk, or any offical
release.  If you are not sure then reply and I will provide details
for getting this version.  Be warned however, this work is not
complete and may produce undesired results.

How are you transforming your xml data into fo?  Please provide the
transformed fo if you think that you are using the correct version of
FOP and we can investigate further.

Pete

On Thu, Jun 2, 2011 at 5:51 PM, suri16kk  wrote:
>
> Hi Team,
> I am having trouble getting arabic displayed in my PDF. I have fop setup on
> a Linux system.
>
> my XML contains
>  
> - 
> - 
>   ExpDateODBC="" arb="ن كيان الدولة وامنه" />
>  
>  
>
> fonts in the dir
> -rw-rw-r-- 1 cachesys cachegrp  77568 Jun  2 20:19 afridyah.ttf
> -rw-rw-r-- 1 cachesys cachegrp 751104 Jun  2 18:52 arialbd.ttf
> -rw-rw-r-- 1 cachesys cachegrp 563800 Jun  2 18:52 arialbi.ttf
> -rw-rw-r-- 1 cachesys cachegrp 557760 Jun  2 18:52 ariali.ttf
> -rw-rw-r-- 1 cachesys cachegrp  64416 Jun  2 18:38 arialmt.ttf
> -rw-rw-r-- 1 cachesys cachegrp 774476 Jun  2 18:52 arial.ttf
> -rw-rw-r-- 1 cachesys cachegrp  69464 Jun  2 19:52 symbol.ttf
>
> and font.xconf  has
>
>  
>    
>      
>        
>        flate
>
>        
>        
>
>        
>        
>      
>
>      
>        
>        
>
>        
>        /usr/share/fonts/trak
>         
>         
>      
>
>      
>      
>
>    
>
>
> But, when the PDF is rendered, the arabic text is displayed as ##...
> Please help.
> --
> View this message in context: 
> http://old.nabble.com/Arabic-Font-in-FOP-tp31759175p31759175.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: PDF giving first page as blank

2011-05-04 Thread Peter Hancock
Hi Vishal,

Each row of your table contains a single cell that is declared to span
2 rows and 1 column of your 2 column table.  Did you mean 1 row and 2
columns?  Please run fop against the sample and confirm the unexpected
behaviour you wish to report.

Pete

On Wed, May 4, 2011 at 9:28 AM, Peter Hancock  wrote:
> Hi Vishal,
>
> Sorry for the delayed reply.
>
> I have just attempted to render the sample and I got a validation
> exception related to .  I ran trunk with relaxed validation; which
> version are FOP are you running?
>
> Your question belongs on the fop-users list, hence the destination of
> this reply.
>
> Cheers,
>
> Pete
>
>
> -- Forwarded message --
> From: srmxslca 
> Date: Tue, Apr 26, 2011 at 11:11 AM
> Subject: Re: PDF giving first page as blank
> To: fop-...@xmlgraphics.apache.org
>
>
>
> Hi Pete,
>
> Thanks for the reply, as requested i sent the sample xml to your mailbox.
>
> Could you please check.
>
> Regards
> Vishal
>
>
> Peter Hancock-2 wrote:
>>
>> Hi,
>>
>> Can you provide an .fo file generated from this stylesheet that
>> demonstrated the problem, please.  If you are unsure how to do the
>> transform just send some input xml.  From there we can then run FOP
>> and take a closer look.
>>
>> Thanks,
>>
>> Pete
>>
>>
>> On Wed, Apr 20, 2011 at 4:05 PM, srmxslca  wrote:
>>>
>>> Hi ,
>>>
>>> I am new new ot xsl:fo , when i generate a PDF using xsl:fo it is giving
>>> initial page as blank if number of pages are more than 1, if total number
>>> of
>>> pages = 1 in that case it is not giving blank pages.
>>>
>>> And the code for xsl:fo is as follows:
>>>
>>>
>>> 
>>> >>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>>>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>>>
>>>
>>>  
>>>
>>>
>>>  
>>>
>>>    
>>>        >> page-height="11.5in">
>>>          >> margin-left="0.20in" margin-right="0.20in" />
>>>        
>>>      
>>>
>>>      
>>>
>>>        
>>>         
>>>           
>>>
>>>                
>>>                
>>>
>>>
>>>             
>>>                  
>>>                        
>>>                        
>>>                  
>>>             
>>>
>>>             
>>>
>>>
>>>                        >> select="report-bO/candidate-ro-details"/>
>>>
>>>             
>>>
>>>           
>>>          
>>>         
>>>        
>>>       
>>>      
>>>
>>>
>>>             
>>>
>>>                
>>>
>>>                        >> number-rows-spanned="2"
>>> number-columns-spanned="1">
>>>                                
>>>                                >> margin-left="40pt" font-size="8pt"
>>> white-space-collapse="false"
>>> white-space-treatment="preserve">>> select="attendancenumber"/>
>>>                                >> margin-left="40pt" font-size="8pt"
>>> white-space-collapse="false"
>>> white-space-treatment="preserve">>> select="roname"/>
>>>                                >> margin-left="40pt" font-size="8pt"
>>>>
>>>                                >> margin-left="40pt" font-size="8pt"
>>>>
>>>                                >> margin-left="40pt" font-size="8pt"
>>>>
>>>                                >> margin-left="40pt" font-size="8pt"
>>>>
>>>                                >> margin-left="40pt" font-size="8pt"
>>>>
>>>                                        
>>>                                                >> test="(string-length(addressline4)>0)">
>>>
>>>  , 
>>>                                                
>>>                                                
>>>                                                        
>>>                                                
>>>                                        
>>>
>>>                                
>>>                                >> margin-left="40pt"
>>> font-size="8pt">
>>>                                
>>>                                                >> test="(string-length(addressline6)>0)">
>>>
>>>  , 
>>>                                                
>>>                                                
>>>                                                        
>>>                                                
>>>                                        
>>>
>>>                                
>>>
>>>                                
>>>                
>>>
>>>
>>>                
>>>             
>>>    
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/PDF-giving-first-page-as-blank-tp31441979p31441979.html
>>> Sent from the FOP - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/PDF-giving-first-page-as-blank-tp31441979p31477096.html
> Sent from the FOP - Dev mailing list archive at Nabble.com.
>

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



Fwd: PDF giving first page as blank

2011-05-04 Thread Peter Hancock
Hi Vishal,

Sorry for the delayed reply.

I have just attempted to render the sample and I got a validation
exception related to .  I ran trunk with relaxed validation; which
version are FOP are you running?

Your question belongs on the fop-users list, hence the destination of
this reply.

Cheers,

Pete


-- Forwarded message --
From: srmxslca 
Date: Tue, Apr 26, 2011 at 11:11 AM
Subject: Re: PDF giving first page as blank
To: fop-...@xmlgraphics.apache.org



Hi Pete,

Thanks for the reply, as requested i sent the sample xml to your mailbox.

Could you please check.

Regards
Vishal


Peter Hancock-2 wrote:
>
> Hi,
>
> Can you provide an .fo file generated from this stylesheet that
> demonstrated the problem, please.  If you are unsure how to do the
> transform just send some input xml.  From there we can then run FOP
> and take a closer look.
>
> Thanks,
>
> Pete
>
>
> On Wed, Apr 20, 2011 at 4:05 PM, srmxslca  wrote:
>>
>> Hi ,
>>
>> I am new new ot xsl:fo , when i generate a PDF using xsl:fo it is giving
>> initial page as blank if number of pages are more than 1, if total number
>> of
>> pages = 1 in that case it is not giving blank pages.
>>
>> And the code for xsl:fo is as follows:
>>
>>
>> 
>> >  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>>
>>
>>  
>>
>>
>>  
>>
>>    
>>        > page-height="11.5in">
>>          > margin-left="0.20in" margin-right="0.20in" />
>>        
>>      
>>
>>      
>>
>>        
>>         
>>           
>>
>>                
>>                
>>
>>
>>             
>>                  
>>                        
>>                        
>>                  
>>             
>>
>>             
>>
>>
>>                        > select="report-bO/candidate-ro-details"/>
>>
>>             
>>
>>           
>>          
>>         
>>        
>>       
>>      
>>
>>
>>             
>>
>>                
>>
>>                        > number-rows-spanned="2"
>> number-columns-spanned="1">
>>                                
>>                                > margin-left="40pt" font-size="8pt"
>> white-space-collapse="false"
>> white-space-treatment="preserve">> select="attendancenumber"/>
>>                                > margin-left="40pt" font-size="8pt"
>> white-space-collapse="false"
>> white-space-treatment="preserve">> select="roname"/>
>>                                > margin-left="40pt" font-size="8pt"
>>>
>>                                > margin-left="40pt" font-size="8pt"
>>>
>>                                > margin-left="40pt" font-size="8pt"
>>>
>>                                > margin-left="40pt" font-size="8pt"
>>>
>>                                > margin-left="40pt" font-size="8pt"
>>>
>>                                        
>>                                                > test="(string-length(addressline4)>0)">
>>
>>  , 
>>                                                
>>                                                
>>                                                        
>>                                                
>>                                        
>>
>>                                
>>                                > margin-left="40pt"
>> font-size="8pt">
>>                                
>>                                                > test="(string-length(addressline6)>0)">
>>
>>  , 
>>                                                
>>                                                
>>                                                        
>>                                                
>>                                        
>>
>>                                
>>
>>                                
>>                
>>
>>
>>                
>>             
>>    
>>
>> --
>> View this message in context:
>> http://old.nabble.com/PDF-giving-first-page-as-blank-tp31441979p31441979.html
>> Sent from the FOP - Dev mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context:
http://old.nabble.com/PDF-giving-first-page-as-blank-tp31441979p31477096.html
Sent from the FOP - Dev mailing list archive at Nabble.com.

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



Re: Row span and keep-togehther.within-page problem

2011-03-17 Thread Peter Hancock
Hi Matthias,

This bug has been captured in bugzilla#45134.  I have had a quick look
at the code-base but I have not yet been able to determine why
 fo:table-cell@number-rows-spanned adversely affects table breaking
across pages or how difficult it would be to rectify.

Thanks,

Peter


On Thu, Mar 17, 2011 at 1:47 AM, Matthias Reischenbacher
 wrote:
>
> Hi,
>
> using the number-rows-spanned attribute on a table cell causes a page break
> in the middle of the table even though the fo:table element has the
> keep-together.within-page attribute set to "always". If I remove the span
> attribute the page break goes away.
>
> Am I doing something wrong here or is this a bug? I'm using latest trunk
> version of FOP.
>
> Test case:  http://old.nabble.com/file/p31169192/table-bug.xml table-bug.xml
> Output with span:  http://old.nabble.com/file/p31169192/table-bug.pdf
> table-bug.pdf
> Output without span:  http://old.nabble.com/file/p31169192/table-no-bug.pdf
> table-no-bug.pdf
>
> Best regards,
> Matthias Reischenbacher
> --
> View this message in context: 
> http://old.nabble.com/Row-span-and-keep-togehther.within-page-problem-tp31169192p31169192.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Peter Hancock
It seems that date.format-date.template.xsl is unavailable.

I suggest that you generate the fo first from the relavent xml and xsl
(this is out of scope of this mailing list - help can be found on
other mailing lists like http://www.mulberrytech.com/xsl/xsl-list/),
and then post the corresponding fo to this list if you are still
having problems processing it with FOP.

Thanks,

Peter



On Wed, Mar 9, 2011 at 2:25 PM, italocardwell  wrote:
>
> Sorry the -xm was a fat finger.  I was using -xml and even if I change the
> file name to test it still produces the same error.  Complete error below.
>
> SEVERE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
>  First element must be the fo:root formatting object. Found (Namespace URI:
> "",
> Local Name: "html") instead. Please make sure you're producing a valid
> XSL-FO do
> cument.
>
>
>
>
>
>
>
> Eric Douglas wrote:
>>
>> -xm?  Try -xml?
>> Then take the dashes out of your file name, or try putting it in quotes.
>>
>> -Original Message-
>> From: italocardwell [mailto:italo.cardw...@gmail.com]
>> Sent: Wednesday, March 09, 2011 9:10 AM
>> To: fop-users@xmlgraphics.apache.org
>> Subject: Re: Apache FOP Newbie needs Help Converting XML to PDF
>>
>>
>> I was using
>> fop -xm la91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
>>    -xsl ccr.xsl -pdf test.pdf
>>
>>
>>
>> Peter Hancock-2 wrote:
>>>
>>> Hi,
>>>
>>> Can you tell us exactly which files you are using when you invoke fop,
>>> please.
>>> Your command should look something like fop -xml foo.xml -xsl foo.xsl
>>> -pdf foo.pdf  judging by the files you have attached.
>>> I am guessing you missed out the -xml/-xsl flags, leading FOP to
>>> believe you were supplying an FO file.
>>>
>>> When an  XML and XSL files are supplied, FOP will perform an XSLT
>>> transform using the Xalan XSLT Xalan library (I am guessing you will
>>> need to know more about this stage in your project), generating the FO
>>> document stream that is then processed to generate the output in the
>>> desired format:
>>>
>>> XML + XSL -> [XSLT transformer] -> FO -> [XSL:FO processor] -> PDF
>>>
>>> This initial stage just saves on from having to do the transform first.
>>>
>>> I hope this info helps,
>>>
>>> Peter
>>>
>>>
>>>
>>> On Wed, Mar 9, 2011 at 12:43 PM, italocardwell
>>> 
>>> wrote:
>>>>
>>>> Ill be upfront I know nothing about XML.  I am a SQL developer and I
>>>> have a project where I need to convert XML files to a PDF.  The XML
>>>> are going to be the same format every time with different data in
>>>> them.  I am wanting to use apache fop 1.0 at the command line to
>>>> convert these.  I am getting an error every time that I attempt to do
>>>> this.  I will attach the files and the error.  Would someone please
>>>> help me out.  Thanks.
>>>> http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc
>>>> 415c.20110308172937.xml
>>>> a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
>>>> http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl
>>>> http://old.nabble.com/file/p31105999/date.format-date.template.xsl
>>>> date.format-date.template.xsl
>>>> http://old.nabble.com/file/p31105999/str.padding.template.xsl
>>>> str.padding.template.xsl
>>>>
>>>> The error that I get states that fo needs to be in xml-fo format.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-
>>>> PDF-tp31105999p31105999.html Sent from the FOP - Users mailing list
>>>> archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>>> For additional commands, e-mail:
>>>> fop-users-h...@xmlgraphics.apache.org
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional com

Re: Font Configuration

2011-03-09 Thread Peter Hancock
Hi Sandeep,
The answer to your question can be found at
 http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config
and
http://xmlgraphics.apache.org/fop/trunk/fonts.html#embedding

Peter


On Wed, Mar 9, 2011 at 1:38 PM, Sandeep Dhulia  wrote:
> Hi Guys,
>
> I need some help for afp-font configuration.  Currently my fo uses 2 fonts,
> TimeRoman-10-Normal and TimesRoman-10-Bold. I am using default fop
> configuration. When I generate afp file, I get the codepages (T1V10500) &
> character sets (C0N2 and C0N4) as external resource referenced in
> afp file. It seems the codepage and character set are mapped to following
> line in fop configuration
>
>  encoding="Cp500">
>
> 
>
>  encoding="Cp500">
>
> 
>
> I though the above configuration will embed the font information in the afp
> file but it is added as an external resource.
>
> The sample afp I received from client has embedded resource codepage
> T1GMCUSR (ibm-500_P100-
>
> 1995) with character - set C001 (Arial, 10) and character-set C002
> (ArialBold, 10).  I am not
>
> sure how to proceed with this. What all resources and configuration I would
> need to map and embed this
>
> Information in generated afp file.
>
>
>
> Attach is the afp file output.
>
>
>
> Please help.
>
>
>
> Thanks & Regards,
>
> Sandeep
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>

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



Re: Apache FOP Newbie needs Help Converting XML to PDF

2011-03-09 Thread Peter Hancock
Hi,

Can you tell us exactly which files you are using when you invoke fop, please.
Your command should look something like
fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
 judging by the files you have attached.
I am guessing you missed out the -xml/-xsl flags, leading FOP to
believe you were supplying an FO file.

When an  XML and XSL files are supplied, FOP will perform an XSLT
transform using the Xalan XSLT Xalan library (I am guessing you will
need to know more about this stage in your project), generating the FO
document stream that is then processed to generate the output in the
desired format:

XML + XSL -> [XSLT transformer] -> FO -> [XSL:FO processor] -> PDF

This initial stage just saves on from having to do the transform first.

I hope this info helps,

Peter



On Wed, Mar 9, 2011 at 12:43 PM, italocardwell  wrote:
>
> Ill be upfront I know nothing about XML.  I am a SQL developer and I have a
> project where I need to convert XML files to a PDF.  The XML are going to be
> the same format every time with different data in them.  I am wanting to use
> apache fop 1.0 at the command line to convert these.  I am getting an error
> every time that I attempt to do this.  I will attach the files and the
> error.  Would someone please help me out.  Thanks.
> http://old.nabble.com/file/p31105999/a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
> a91ec9d3-e021-4e5e-933f-54992cdc415c.20110308172937.xml
> http://old.nabble.com/file/p31105999/ccr.xsl ccr.xsl
> http://old.nabble.com/file/p31105999/date.format-date.template.xsl
> date.format-date.template.xsl
> http://old.nabble.com/file/p31105999/str.padding.template.xsl
> str.padding.template.xsl
>
> The error that I get states that fo needs to be in xml-fo format.
>
>
>
>
>
> --
> View this message in context: 
> http://old.nabble.com/Apache-FOP-Newbie-needs-Help-Converting-XML-to-PDF-tp31105999p31105999.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: FOP command-line option in ant task

2011-03-09 Thread Peter Hancock
Hi Walter,

Have you tried running FOP from the command line? This is the
preferred way to run FOP as a stand alone application.  If you can
invest a little time to set this up you will be rewarded with the
ability to fully configure FOP.

If you think you are truly bound to the ant task, then a modest
modification to org.apache.fop.tools.anttasks.Fop to parse the
properties for the encryption parameters, as suggested by Jeremias.
This is handled from the command line arguments by
org.apache.fop.cli.CommandLineOptions, which you may want to use for
inspiration.

Good luck,

Peter


On Wed, Mar 9, 2011 at 6:09 AM, Walter Kruse  wrote:
> I build PDF from DocBook with Ant in Eclipse. All works well.
>
> I want to pass the FOP command line args for -noprint, -nocopy, -noedit and
> -noannotations. I read about this in the FOP docs under security/encryption
> (http://xmlgraphics.apache.org/fop/0.95/pdfencryption.html). However, I
> cannot seem to find how to do this in my Ant build.xml
>
> The built-in ant task (http://xmlgraphics.apache.org/fop/0.95/anttask.html)
> makes provision for indir, outdir etc. parameters. How do I include the FOP
> command-line options though ?
>
> My target is as follows:
>
>          description="Generates PDF files from DocBook XML">
>         
>         
>                  basedir="${source.dir}" destdir="${fo.dir}">
>         
>         
>
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         
>
>
>          fofile="${fo.dir}/RubyRecipesForTesters.fo"
>         outfile="${target.dir}/RubyRecipesForTesters.pdf"/>
>          tofile="${publish.dir}/${pub.dir}/RubyRecipesforTesters.pdf"/>
>     
>
> Thanks in advance
> Walter Kruse
>

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



Re: AFP Rendering

2011-01-28 Thread Peter Hancock
Hi Sandeep,

Sorry for the delayed response.  The code that handles the rendering
of NOPs is within IFRenderer.renderPage() and I can confirm that FOP
will always render a  page header before a NOP.  I am not sure how
popular the use case is for declaring NOPs outside of the  page scope.
 The MO:DCA specification only stipulates that a NOP must be enclosed
within begin-end domain, and so your requirement is certainly valid.

Perhaps a FOP developer with the available time would be willing to
provide a patch that extends the afp:no-operation element with an
attribute to specify the placement of the NOP at document or page
level.  You should raise a feature request in the ASFs bugzilla
https://issues.apache.org/bugzilla, stating your requirements.  I
would also recommend that you advertise your request for this
requirement in a new thread on the fop-dev mailing list.

I hope I have been of help,

Pete

On Fri, Jan 28, 2011 at 5:11 AM, Dhulia, Sandeep
 wrote:
> Not yet!!!
>
> BR,
> Sandeep
>
> 
> From: Peter Weber [peter.we...@garaio.com]
> Sent: Thursday, January 27, 2011 7:33 PM
> To: fop-users@xmlgraphics.apache.org
> Cc: Dhulia, Sandeep
> Subject: RE: AFP Rendering
>
> Hello Sandeep
>
> Have You got an answer or a solution on that issue?
> I would really appreciate to place NOPs or other elements as valid NOPs in 
> the document structure.
>
> Otherwise, I have to find a way to solve this with TLEs, which needs change 
> in the solution of the customer.
>
> Thanks and Regards
> Peter
>
>
> -Original Message-
> From: Dhulia, Sandeep [mailto:sandeep.dhu...@patni.com]
> Sent: Dienstag, 18. Januar 2011 15:14
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: AFP Rendering
>
> Hi Peter,
>
> Thanks for your prompt response. Please find attached sample.fo which we are 
> generating. I am also attaching an image(snap) of what is getting printed in 
> afp file.
>
> As per the document we can use the tag only in simple page master, but is 
> there any configuration related parameters that can give me finer control on 
> output (like not print Named Group (BNG)  or position of NOP etc)
>
> Thanks & Regards,
> Sandeep
>
> 
> From: Peter Hancock [peter.hanc...@gmail.com]
> Sent: Tuesday, January 18, 2011 6:32 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: AFP Rendering
>
> Hi Sandeep,
>
>
> Reading http://xmlgraphics.apache.org/fop/trunk/output.html#afp-no-operation,
> it appears that FOP only allows  NOP declarations in the Simple Page Master, 
> and so there may not be a way to control the position relative to where pages 
> begin and end.
>
> Can you please attach the fo file or perhaps a suitably cut down version if 
> you require further investigation.
>
> Thanks,
>
> Peter
>
>
> On Tue, Jan 18, 2011 at 11:45 AM, Dhulia, Sandeep  
> wrote:
>> Hi All,
>>
>>
>>
>> I am new to Apache AFP rendering and need your help. I am using Apache
>> FOP to get an AFP output for printing. I am using an afp extension
>> (no-operation) in fo file inside simple page master tag. I get the afp
>> output  file with below structure i.e.
>>
>> (Document Start)
>>
>>                  
>>
>>                 .
>>
>>                 (Named Group Start)
>>
>>                                 (Page)
>>
>>                                                 
>>
>>                                                 
>>
>>                                                 (This is coming
>> at page
>> level)
>>
>>                                 (Page)
>>
>>                  (Named Group End)
>>
>>
>>
>> (Named Group)
>>
>>                                 (Page)
>>
>>                                                 
>>
>>                                                 
>>
>>                                                 (This is coming
>> at page
>> level)
>>
>>                                 (Page)
>>
>>                 (Named Group)
>>
>>
>>
>>  (Document End)
>>
>>
>>
>> But my client wants to see the output in below format (without BNG tag
>> and NOP at document level)
>>
>>
>>
>> (Document Start)
>>
>> (for page below at document level)
>>
>>  (Page Start)
>>
>> 
>>
>>                 
>>
>> (Page End)
>>
>> (for page below at document level)
>>
>> (Page Start)
>>

Re: circle or mask without svg

2011-01-26 Thread Peter Hancock
Hi Ingo,

There is no way to do this directly with FOP.  You will have to add
the frames before processing in FOP.  The EPS is a vector format
whilst tiff is a bitmap and so a different approach may be required
for each.  Are you able to transform the images to a format that you
can then use the SVG approach?

Peter

On Wed, Jan 26, 2011 at 5:58 PM, ingo peter  wrote:
> hi,
> i search for a solution to embed eps/tiff-images in a circle-frame.
> with svg i can do this only with jpg/png or svg.
>
> any suggestions?
>
> mfg/regards
> -ip-
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: AFP Rendering

2011-01-18 Thread Peter Hancock
Hi Sandeep,


Reading http://xmlgraphics.apache.org/fop/trunk/output.html#afp-no-operation,
it appears that FOP only allows  NOP declarations in the Simple Page
Master, and so there may not be a way to control the position relative
to where pages begin and end.

Can you please attach the fo file or perhaps a suitably cut down
version if you require further investigation.

Thanks,

Peter


On Tue, Jan 18, 2011 at 11:45 AM, Dhulia, Sandeep
 wrote:
> Hi All,
>
>
>
> I am new to Apache AFP rendering and need your help. I am using Apache FOP
> to get an AFP output for printing. I am using an afp extension
> (no-operation) in fo file inside simple page master tag. I get the afp
> output  file with below structure i.e.
>
> (Document Start)
>
>      ….
>
>     …..
>
>         (Named Group Start)
>
>         (Page)
>
>         ….
>
>         ….
>
>         (This is coming at page
> level)
>
>         (Page)
>
>      (Named Group End)
>
>
>
> (Named Group)
>
>         (Page)
>
>         ….
>
>         ….
>
>         (This is coming at page
> level)
>
>         (Page)
>
>         (Named Group)
>
>
>
>  (Document End)
>
>
>
> But my client wants to see the output in below format (without BNG tag and
> NOP at document level)
>
>
>
> (Document Start)
>
> (for page below at document level)
>
>  (Page Start)
>
> ….
>
>     ….
>
> (Page End)
>
> (for page below at document level)
>
> (Page Start)
>
>     …
>
>     ….
>
> (Page Start)
>
>   (Document End)
>
>
>
> How can I achieve this with Apache FOP.? I appreciate all your help. I am
> using FOP 1.0
>
>
>
> Thanks & Regards,
>
> Sandeep
>
> 
> Information contained and transmitted by this e-mail is confidential and
> proprietary to Patni Computer Systems Ltd and its affiliates (hitherto
> referred as Patni Computers) and is intended for use only by the recipient.
> If you are not the intended recipient , you are hereby notified that any
> dissemination, distribution, copying or use of this e-mail is strictly
> prohibited and you are requested to delete this e-mail immediately and
> notify the originator or netad...@patni.com. Patni Computers does not enter
> into any agreement with any party by e-mail. Any views expressed by an
> individual do not necessarily reflect the view of Patni Computers. Patni
> Computers is not responsible for the consequences of any actions taken on
> the basis of information provided, through this email. The contents of an
> attachment to this e-mail may contain software viruses, which could damage
> your own computer system. While Patni Computers has taken every reasonable
> precaution to minimise this risk, we cannot accept liability for any damage
> which you sustain as a result of software viruses. You should carry out your
> own virus checks before opening an attachment. To know more about Patni
> Computers please visit www.patni.com.
>

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



Re: Antialising issue with borders in PDF with fop-0.95

2011-01-13 Thread Peter Hancock
Hi Juergen,

What does a print of the pdf look like?  It may be the viewer (as
mentioned in the post you referenced) that is responsible for
anti-aliasing the pdf for screen display, and may not be a good
representation of the print.

Currently FOP draw each of the 4 border sections of a cell separately,
even when they should combine to form a continuous mark - likewise for
the neighbouring cells of a table.  Borders are represented as vector
drawing commands in a graphical stream within the PDF
 and the resolution of this drawing space is 1 millipoint - 1/1000th
of 1/72th of an inch.  The drawing commands are directly generated by
fop from the representation of the border - no intermediate Java2D ->
rasterisation process occurs, and so antialiasing is not an inherent
problem in the process.

I hope this helps,

Pete
On Thu, Jan 13, 2011 at 11:49 AM, Juergen Birkle
 wrote:
>
> Hi,
>
> when generating a table in PDF with FOP and XML the borders of the table
> appear in different width on the Screen (even with different PDF viewers!).
>
> I was searching the web and this forum and found the following Question in
> this forum:
> http://old.nabble.com/Rows-borders-look-so-bad...-td24715165.html
>
> In this thread "john farrow" wrote:
> "What you are seeing is Acrobat anti-aliasing some parts of the border and
> not others.  You can turn off anti-aliasing in Acrobat to make this go away
> (on your machine), otherwise FOP needs to be fixed to remove the problem.
> The problem occurs because some parts of the border are drawn using filled
> shapes and some are drawn using solid lines.  Acrobat applies anti-aliasing
> to one type of rendering and not the other."
>
>
> This is also my issue.
>
> This is my table at 100% in Acrobat Reader:
> http://old.nabble.com/file/p30661446/FOP_100.png FOP_100.png
>
> When looking at 400% at this image in gimp it is clearly visible, that the
> different borders are handled with different antialiasing:
> http://old.nabble.com/file/p30661446/FOP_100_400.png FOP_100_400.png
>
> Is there a patch available for FOP to solve this problem?
> Or is it possible to disable antialiasing from within XML or Java for
> borders? If that is possible, can you tell me how it is done. I couldn't
> find any reference for this at the web.
>
> From my point of view FOP should draw all lines of a table in the same way,
> not sometimes as filled shapes and sometimes as solid lines. Otherwise it is
> not possible to generate high quality tables with FOP!
>
> Best regards,
> Juergen
>
> --
> View this message in context: 
> http://old.nabble.com/Antialising-issue-with-borders-in-PDF-with-fop-0.95-tp30661446p30661446.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: FOP 1.0 line feed not visible

2011-01-12 Thread Peter Hancock
Hi Philippe,

PDFRender was removed from FOP in rev 989178 of trunk (along with the
other renders
 along with AFPRender, PCLRender and PSRender.)
PDFPainter (and other collaborators) now implements the functionality
previously handled by PDFRender.
Some information about the new architecture is available at
http://xmlgraphics.apache.org/fop/trunk/intermediate.html

I hope that helps,

Peter


On Wed, Jan 12, 2011 at 9:22 AM, Simon Pepping  wrote:
> On Wed, Jan 12, 2011 at 10:00:14AM +0100, Philippe Pithon wrote:
>> Hi,
>>
>> I try snapshots...
>>
>> But problem... in FOP 1.0 I extend class PDFRenderer and in snapshot
>> this class not found
>
> Snapshots are binary downloads. For source downloads, see
> http://xmlgraphics.apache.org/fop/download.html.
>
> Simon
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: FOP 1.0 line feed not visible

2011-01-07 Thread Peter Hancock
Hi Philippe,

I think perhaps the linefeed-treatment='preserve' property on the
fo:block may be what you require.
See  http://www.w3.org/TR/2006/REC-xsl11-20061205/#linefeed-treatment
for more detail.

I hope that works for you.

Pete

On Fri, Jan 7, 2011 at 10:02 AM, Philippe Pithon  wrote:
> Hi,
> A little problem with FOP 1.0 (it's works with FOP 0.20.5)
> if I have linefeed (exa 0A) in XML node text, it's not visible in PDF result
> Any ideas ?
> Philippe Pithon
>
> XML :
> --
> line 1 (0A)
> line 2 (0A)
> line 3 (0A)
> 
>
> XSL :
> --
>  hyphenate="true" language="fr" text-align="left"
> white-space-collapse="false">
> 
> 
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: FOP 1.0: Generate PDF with plain text inside

2011-01-07 Thread Peter Hancock
Hi,

I also have the setting


null


but I do not think that is relevant to your requirement.

Pete

On Fri, Jan 7, 2011 at 11:08 AM, Peter Hancock  wrote:
> Hi Friedel,
>
> This is my config to supress  Flate encoding:
> 
>       null
>  
>
> So your config should work.  Did you try it?
>
> Pete
>
>
> On Fri, Jan 7, 2011 at 10:28 AM, Friedel  wrote:
>>
>> Hi
>>
>> I use FOP 1.0 on Win and UNIX and it works well. I do get PDFs with
>> compression switched on/off and see the size of the PDF changing.
>>
>> But I also like to have a PDF with the text inside readable, not only the
>> objects readable.
>> All I get is most of the content encoded (not readable), except the objects
>> (readable).
>> I'd like to be able to read also the text in the PDF if I open the PDF with
>> an editor.
>>
>> fop.xconf:
>>      
>>        null
>>        
>>        
>>      
>>
>> Is the a configuration to enable inside plain text PDF generation?
>>
>> Regards,
>> Friedel
>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/FOP-1.0%3A-Generate-PDF-with-plain-text-inside-tp30612984p30612984.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>

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



Re: FOP 1.0: Generate PDF with plain text inside

2011-01-07 Thread Peter Hancock
Hi Friedel,

This is my config to supress  Flate encoding:

   null
 

So your config should work.  Did you try it?

Pete


On Fri, Jan 7, 2011 at 10:28 AM, Friedel  wrote:
>
> Hi
>
> I use FOP 1.0 on Win and UNIX and it works well. I do get PDFs with
> compression switched on/off and see the size of the PDF changing.
>
> But I also like to have a PDF with the text inside readable, not only the
> objects readable.
> All I get is most of the content encoded (not readable), except the objects
> (readable).
> I'd like to be able to read also the text in the PDF if I open the PDF with
> an editor.
>
> fop.xconf:
>      
>        null
>        
>        
>      
>
> Is the a configuration to enable inside plain text PDF generation?
>
> Regards,
> Friedel
>
>
> --
> View this message in context: 
> http://old.nabble.com/FOP-1.0%3A-Generate-PDF-with-plain-text-inside-tp30612984p30612984.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Creating Editable PDF forms with FOP

2010-12-09 Thread Peter Hancock
Hi Adam,

FOP does not currently support PDF forms, however I have been working
on an implementation against the AcroForms specification. I hope to
make this available to the community within the next few months; time
constraints have not allowed me to publish earlier.
Stay tuned!

Peter

On Thu, Dec 9, 2010 at 2:21 PM, Adam Kovacs  wrote:
> Dear All,
>
>  I have a simple and a complicated question.
> The simple is if FOP supports creating PDF forms? (I mean editable text 
> fields in the PDF)
> The complicated is if yes, how?
>
> Thanks in advance!
>
> Greetings,
>
> Adam Kovacs
> Using FOP 1.0
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Cropping output to content

2010-11-29 Thread Peter Hancock
Hi Craig,

I think that post processing the area tree will be the only solution -
FOP can only fit content to page view-ports and not the reverse.  To
make life easy you could use id's to demarcate  the section you want
to preview, making the extraction easier.

Ideally you should process a whole page sequence, and not just a
snippet: The problem with processing a section of the whole document
is that the layout of that section is dependent on the whole document
Generating just a small section will potentially yield a  preview that
does not match the final layout.

Pete


On Mon, Nov 29, 2010 at 8:44 AM, Craig Ringer
 wrote:
> Hi all
>
> For the project I'm working on, I'm finding myself with the need to
> generate previews of partial (snippet) XSL-FO content for users.
>
> As part of that, I'm finding that I want to "rubber band" or clip the
> output so that excess white space is omitted. As I don't seem to see any
> way to make a page template contract to fit the content I suspect I'll
> be post-processing the area tree or the final output to crop it around
> the content.
>
> I'm just wondering if there's some obvious approach I might be missing.
> I'm not loving the idea of more area tree processing, though it's worked
> very well for the vertical space distribution problem I had a while ago.
>
> --
> System & Network Administrator
> POST Newspapers
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Filesize of Images

2010-11-25 Thread Peter Hancock
On Thu, Nov 25, 2010 at 12:43 PM, JPee  wrote:
Hi JPee,

Have you tried adjusting the default resoulation settings in your
fop.xconf file (assuming you are using one-
http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-available)?
Have a look at the source-resolution/target-resolution settings
defined in  
http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements

I am not sure that any resizing can be done based on image resolution
but setting the size and target-resolution will alter the file size.

Pete

>
> Hello community,
>
> we are using FOP for rendering some pdf files from data. The pdf includes
> some images, which can be very big (up to 5mb). So the outcoming pdf with 3
> images is about 15+ mb. Inside the pdf the images are shown in a lower
> solution.
>
> Is there a way that the imagesize is also scaled down dependant on
> imagesolution?
>
>
> To prevent big pdfs our editors must customize the images at the moment. Is
> this step really necessary?
>
> Thanks
> JPee
> --
> View this message in context: 
> http://old.nabble.com/Filesize-of-Images-tp30304887p30304887.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: AW: How to hyphenate nonwords?

2010-11-23 Thread Peter Hancock
Hi Alexander,

Before questioning FOP's implementation you may want to consult the
xsl:fo specification at http://www.w3.org/TR/2006/REC-xsl11-20061205/
first.
If you believe that FOP strays from this, then please raise your
concern on this list.

Often times the solution to a particular problem cannot be elegantly
expressed in xsl:fo, however, xsl:fo is not designed as a human
writable/readable data format and xslt processors should not be phased
by a documents poor aesthetic quality.  Computers are good at doing
boring jobs like adding zero width space to strings so I would
recommend figuring out a way to process the things like serial numbers
when you include them in your fo.

Pete
On Tue, Nov 23, 2010 at 9:34 AM, Alexander Uvarov
 wrote:
>
> On 23.11.2010, at 14:21, Georg Datterl wrote:
>
>> Hi Alexander,
>>
>>> Sounds insane for me. I have a lot of places in documents where i need 
>>> forced hyphenation.
>>> It's unacceptable solution.
>>> I am wondering why fop don't offer any elegant solution.
>>
>> Well, can you think of an elegant solution?
>>
>>> Why not just consider all strings as strings with zero width space after 
>>> each characters?
>>
>> Because then hyphenation would not work at all, because after every 
>> character there would be a possible place to hyphenate. And that's simply 
>> not correct in normal language.
>
> Table cell overflow is also inappropriate. If string can't be successfully 
> hyphenated, in case of overflow forced hyphenation would be better than just 
> overflow. Imho.
>
>>
>> Regards,
>>
>> Georg Datterl
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: static content ignored

2010-11-19 Thread Peter Hancock
Hi Rob,

>       column-count="1" />
>      
This should be region-name I believe?

>      

Re: How to tell line# in input file that is generating error

2010-11-18 Thread Peter Hancock
Hi Steve,

I am not familiar with the DITA Open Toolkit, but to get line numbers you
need to explicitly pass fo to FOP and not the combination of xml and the
xslt that FOP initially transforms to fo.  Maybe DITA provides a way to get
the intermediate fo so that you can run it through fop yourself.

Pete

On Thu, Nov 18, 2010 at 2:19 AM, Steve Fogel  wrote:

>  Hi, all…
>
>
>
> With Apache FOP 0.95 (the one that comes with the DITA Open Toolkit), I’m
> getting many error messages like this:
>
>
>
>   [fop] Nov 17, 2010 3:58:21 PM
> org.apache.fop.fo.properties.LengthRangeProperty checkConsistency
>
>   [fop] SEVERE: forcing opt to min in LengthRange
>
>
>
> How can I tell which line # in the FO input file is generating the error?
> I’ve tried debug mode and verbose mode, but neither seems to do much. Any
> tricks?
>
>
>
> Thanks
>
>
>
> Steve
>
>
>
> P.S. – I know what the message means. It’s just that my FO input file is
> over 50K lines, so it’s hard to find the culprit.
>
>
>
> --
> [image: Oracle] 
> Steve Fogel | Information Architect, Oracle Database
> Phone: +1 6505064914 | Mobile: +1 4153098660
> 500 Oracle Parkway, M/S 4op1126 | Redwood Shores, CA 94065
>
> [image: Green Oracle] 
>
> Oracle is committed to developing practices and products that help protect
> the environment
>
>
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
<><>

Re: FOP 0.9.5 and Too many Files Open...image Files in my case...

2010-11-18 Thread Peter Hancock
Hi Durga,

Before trying to resolve this particular issue, are you able to
upgrade to 1.0?  It is possible that your particular issue has been
resolved after 0.95.
There are threads on the mailing list that report similiar problems, e.g.
http://old.nabble.com/Too-many-open-images--td25664263.html#a25664263
http://old.nabble.com/Keeping-memory-usage-low-when-FOP-is-not-running-and-avoid-open-file-handles-after-FOP-is-run-td29202650.html#a29205862

Let me know if you want further help

Pete

On Wed, Nov 17, 2010 at 3:49 PM, Nuvvula, Durga  wrote:
> Hi,
>
>
>
> I am using the FOP 0.9.5 for my pdf generation. I have made sure that I have
> closed all the input streams that I have opened for pdf generation.
>
>
>
> I am not opening the image files(.tiff,.gif,.png etc) directly but I am
> using them in my XSL. I have made sure that my xsl stream is closed properly
> in the finally block.
>
>
>
> When I track the number of open files through lsof, I am observing the image
> files(.tiff,.gif,.png etc) not closed because of this it is reaching the
> limit of number of open files and have to restart the server. Our server has
> the configuration of open files to 1024.
>
>
>
> Do I need to do anything extra for closing the image files that have opened
> by the FOP internally?
>
>
>
> Any help or suggestions towards the resolution of the problem is
> appreciated.
>
>
>
> Thanks In Advance.
>
>
>
> Best Regards,
>
> Durga Prasad
>
> 46943895956
>
>

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



Re: using an existing pdf as overlay

2010-11-02 Thread Peter Hancock
Hi Erik,

I am not sure if my solution is the most elegant but for ideas have a
look at the files in the attached zip.
in.fo is  for the final document- you will have to change the path to
the generated overlay.pdf.
overlay.fo was used to create overlay.pdf.
out.pdf is the final result.

For busy readers who do not have time to look at the attacmnet the
relavent fo snippet is



  
  Apache FOP (Formatting Objects Processor) is a print formatter driven by
  XSL formatting objects (XSL-FO) and an output independent formatter.
  It is a Java application that reads a formatting object (FO) tree and rend
  Output formats currently supported include
  PDF, PS, PCL, AFP, XML (area tree representation), Print,
  AWT and PNG, and to a lesser extent, RTF and TXT.
  The primary output target is PDF 









I hope this helps.

pete
On Tue, Nov 2, 2010 at 1:25 AM, erik pepermans  wrote:
> Hi,
>
>
>
> I tried to combine fop-pdf-images-2.0.0 with fop-1.0
>
> So far so good. How can I use the pdf document from the  fo:external-graphic
> command as an overlay for subsequent blocks ?
>
>
>
> Thanks
>
>
>
> Brgds
>
> Erik
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

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



Re: JEuclid and FOP

2010-11-01 Thread Peter Hancock
Hi Srikrishnan,

I have had success creating a pdf from the mathml.fo input found with
the 0.95 source code using FOP 1.0.
All I did to do was place jeuclid-core-3.1.9.jar and
jeuclid-fop-3.1.9.jar in FOP's lib directory as instructed.

I am not a windows user and so there may be an environmental reason
you are not have success but I do not think that is likely.

Maybe you could elaborate further on your setup and environment,
giving myself or perhaps another user more insight into your problem.

Pete




On Mon, Nov 1, 2010 at 11:11 AM, SriKrishnan  wrote:
> Hi Pete,
>
> Thanks for aware me about the new version. Now I have downloaded fop 1.0.
> Even in that I am not able to fix Mathml option.
>
> FYI: as per I mentioned in my mail "readme.fop" file which available inside
> the “jeuclid-3.1.9-distribution.zip”, itself they mentioned that both the
> jar files are copied into fop 0.95 version.
>
> Can you please help me to fix this problem either in fop 1.0 or fop 0.95?
>
> Thanks,
> Srikrishnan
>
> -Original Message-
> From: Peter Hancock [mailto:peter.hanc...@gmail.com]
> Sent: Monday, November 01, 2010 4:05 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: JEuclid and FOP
>
> Hi SriKrishnan,
>
> Recent versions of jeuclid are not compatible with fop 0.95:
> examples/mathml/build.xml of 0.95 refers to a jeuclid class
> net.sourceforge.jeuclid.MathBase, however this was removed from
> jeuclid in revision 425:c7cae27888cf (in 2007).
> The mathml support in FOP is now maintained by the JEuclid project, as
> stated in the examples/mathml/README of FOP trunk.
>
> I would recommend ugrading your version of FOP to 1.0 or even trunk
> and then follow the jeuclid-fop integration instructions that should
> be found  somewhere at either
> http://jeuclid.sourceforge.net/
> or
> http://sourceforge.net/projects/jeuclid/
>
> If you really need to use 0.95 (although I certainly recommend
> upgrading to at 1.0 or above) then you will have to figure out which
> version of jeuclid is compatible and then probably  build it from the
> source.  Shout out if this is your only practical solution and I can
> help you out further.
>
> Pete
>
>
> On Sun, Oct 31, 2010 at 8:44 AM, SriKrishnan 
> wrote:
>> Hi all,
>>
>>
>>
>> Can anybody provide me a step-by-step installation procedure document of
>> Jeuclid plugin in FOP? As I am new to FOP and java, I don’t know how to
>> solve this problem.
>>
>>
>>
>> Because I have downloaded and copied the following files:
>>
>>
>>
>> jeuclid-core-3.1.9.jar
>>
>> jeuclid-fop-3.1.9.jar
>>
>>
>>
>> in my “C:\fop-0.95\examples\mathml\lib”  folder (as per mentioned int the
>> readme.txt file residing inside that folder)
>>
>>
>>
>> also as per the below instruction in the “readme.fop” file which available
>> inside the “jeuclid-3.1.9-distribution.zip”,
>>
>>
>>
>>  ---
>>
>>   JEuclid FOP plug-in
>>
>>   ---
>>
>>
>>
>> Installation
>>
>>
>>
>> * Pre-requesites
>>
>>
>>
>>   The JEuclid FOP plug-in is tightly integrated with FOP development, it
>> will
>>
>>   therefore only work with specific versions of FOP. For this version you
>> need:
>>
>>
>>
>>   * FOP 0.95beta or 0.95
>>
>>
>>
>> * Actual installation
>>
>>
>>
>>   Copy the these files into your fop's lib/ directory
>>
>>
>>
>>   * jeuclid-core-x.x.x.jar
>>
>>
>>
>>   * jeuclid-fop-x.x.x.jar
>>
>>
>>
>>   []
>>
>>
>>
>>   If you have downloaded the full JEuclid distribution, these files can be
>> found in the
>>
>>   repo/ sub-directory.
>>
>>
>>
>> That's it! Enjoy MathML support in FOP.
>>
>>
>>
>> I have copied the two files inside the following folder “C:\fop-0.95\lib”
>>
>>
>>
>> Eventhough I encountered the same error as follows:
>>
>>
>>
>> C:\fop-0.95\examples\mathml\docs>fop mathml.fo mathml.pdf
>>
>> Oct 31, 2010 2:07:07 PM org.apache.fop.fo.ElementMappingRegistry
> findFOMaker
>>
>> WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
>>
>>
>>
>> Can anybody help me to fix this issue?
>>
>>
>>
>> FYI:
>>
>>
>>
>> MY OS: Windows xp professional
>>
>> My FOP Version: 0.95
>>
>>
>>
>> Thanks,
>>
>> Srikrishnan
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: JEuclid and FOP

2010-11-01 Thread Peter Hancock
Hi SriKrishnan,

Recent versions of jeuclid are not compatible with fop 0.95:
examples/mathml/build.xml of 0.95 refers to a jeuclid class
net.sourceforge.jeuclid.MathBase, however this was removed from
jeuclid in revision 425:c7cae27888cf (in 2007).
The mathml support in FOP is now maintained by the JEuclid project, as
stated in the examples/mathml/README of FOP trunk.

I would recommend ugrading your version of FOP to 1.0 or even trunk
and then follow the jeuclid-fop integration instructions that should
be found  somewhere at either
http://jeuclid.sourceforge.net/
or
http://sourceforge.net/projects/jeuclid/

If you really need to use 0.95 (although I certainly recommend
upgrading to at 1.0 or above) then you will have to figure out which
version of jeuclid is compatible and then probably  build it from the
source.  Shout out if this is your only practical solution and I can
help you out further.

Pete


On Sun, Oct 31, 2010 at 8:44 AM, SriKrishnan  wrote:
> Hi all,
>
>
>
> Can anybody provide me a step-by-step installation procedure document of
> Jeuclid plugin in FOP? As I am new to FOP and java, I don’t know how to
> solve this problem.
>
>
>
> Because I have downloaded and copied the following files:
>
>
>
> jeuclid-core-3.1.9.jar
>
> jeuclid-fop-3.1.9.jar
>
>
>
> in my “C:\fop-0.95\examples\mathml\lib”  folder (as per mentioned int the
> readme.txt file residing inside that folder)
>
>
>
> also as per the below instruction in the “readme.fop” file which available
> inside the “jeuclid-3.1.9-distribution.zip”,
>
>
>
>  ---
>
>   JEuclid FOP plug-in
>
>   ---
>
>
>
> Installation
>
>
>
> * Pre-requesites
>
>
>
>   The JEuclid FOP plug-in is tightly integrated with FOP development, it
> will
>
>   therefore only work with specific versions of FOP. For this version you
> need:
>
>
>
>   * FOP 0.95beta or 0.95
>
>
>
> * Actual installation
>
>
>
>   Copy the these files into your fop's lib/ directory
>
>
>
>   * jeuclid-core-x.x.x.jar
>
>
>
>   * jeuclid-fop-x.x.x.jar
>
>
>
>   []
>
>
>
>   If you have downloaded the full JEuclid distribution, these files can be
> found in the
>
>   repo/ sub-directory.
>
>
>
> That's it! Enjoy MathML support in FOP.
>
>
>
> I have copied the two files inside the following folder “C:\fop-0.95\lib”
>
>
>
> Eventhough I encountered the same error as follows:
>
>
>
> C:\fop-0.95\examples\mathml\docs>fop mathml.fo mathml.pdf
>
> Oct 31, 2010 2:07:07 PM org.apache.fop.fo.ElementMappingRegistry findFOMaker
>
> WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math
>
>
>
> Can anybody help me to fix this issue?
>
>
>
> FYI:
>
>
>
> MY OS: Windows xp professional
>
> My FOP Version: 0.95
>
>
>
> Thanks,
>
> Srikrishnan

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



Re: Wider TXTRender output

2010-10-28 Thread Peter Hancock
Hi Intasi,
The TXTRenderer produces ASCII text output which at best will be a
crude match of a PDF document: see
http://xmlgraphics.apache.org/fop/trunk/output.html#txt
A page layout has to be mapped to the ASCII text grid, with
predictable issues surrounding text spacing, graphics representation
etc.

The docs suggest that best results come from using monospaced fonts
with suitably calibrated font sizes and line heights.

I hope you project does not depend on eye-pleasing txt docs!

Pete

On Thu, Oct 28, 2010 at 12:14 PM, intasi  wrote:
> have any of you notice that, the TXTRender output is "Wider" than the PDF?
> any sugestions where i should look in to ?
>
> Thanks
> Asitha Weerasinghe

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



Re: Creating PDFs with fields using FOP

2010-10-07 Thread Peter Hancock
Hi Mithun,

I have been working on implementing AcroForms in FOP - see
http://www.mail-archive.com/fop-users@xmlgraphics.apache.org/msg15037.html

Unfortunately other commitments have not allowed me to ready the work
for submission to the community, although I have recently been tasked
to complete this work and will use this as an opportunity to submit my
work.

Watch this space!

Peter

On Thu, Oct 7, 2010 at 9:39 AM, Jeremias Maerki  wrote:
> FOP 1.0 allows to create tagged PDF: 
> http://xmlgraphics.apache.org/fop/trunk/accessibility.html
>
> As for AcroForms, FOP has currently nothing in this area. But if I'm not
> mistaken someone may be working on that. I'm also not sure if we have
> something in a Bugzilla issue somewhere.
>
> On 05.10.2010 22:21:46 mithunk wrote:
>>
>> Hi,
>> Can we create PDFs that have form fields (similar to Acroforms) using FOP?
>>
>> The reason why I am looking for this is: I need to create PDFs and send to
>> another program which stamps user signature on to the PDF that sent. So the
>> other program is taking pdf file and signature field (either coordinates or
>> field name) as input parameters. I am able to generate PDFs but not able to
>> identify position of the signature field, and neither I am able to find any
>> way of creating tagged pdf (pdf with fields).
>> Please share your idea on how can I achieve my requirement.
>>
>> Thanks,
>> Mithun Kulkarni
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/Creating-PDFs-with-fields-using-FOP-tp29890897p29890897.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>
>
> Jeremias Maerki
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: Font mapping for AFP Output

2010-09-30 Thread Peter Hancock
Hi Peter,

First off, what version of FOP are you using?  This will have some
baring on what support there will be available for you.

Have you taken a look at the FOP docs or the wiki?
 http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config
http://wiki.apache.org/xmlgraphics-fop/AFPFonts

There are a few problems i can spot with your config.   Most notably,
the afp-raster-f...@characterset should refer to the actual character
data for the custom font you want to embed and that you have made
available to FOP (see base element in
http://xmlgraphics.apache.org/fop/trunk/configuration.html#general or
afp-f...@base-uri) - you are instead referencing IBM base fonts that
should be available in  any AFP environments (Print servers or
viewers) that you are using.  The font-triplet element configures how
you can reference the font in your .fo document.  I am guessing that
the AFP you generate, whilst referencing ocrb[10], actually results in
the default Times Roman font.

To resolve this you need to first determine what kind of font you have
(outline (.OLN), raster- this usually comes with a collection of files
for different sizes and styles).  This may not be that obvious to you
and I have had trouble myself doing the same thing.  I have resorted
to using and AFP binary reader to determine this - maybe some other
AFP FOP users have some better instructions for you on this subject.

Once you know the font refer to the the FOP docs for the relevant
configuration and reply to this thread if troubles persist.

I hope I have been of some help.

Peter Hancock

On Wed, Sep 29, 2010 at 1:55 PM, Peter Weber  wrote:
> Hi all
>
>
>
> This week  i stuck at mapping fonts for AFP output format in fop.
>
>
>
> I don’t have any experience with fonts, codepages and charactersets…
>
> Can someone please explain me, how to map a font in the fop.xconf for AFP
> format?
>
>
>
> Following is a part of the config I am playing with:
>
>
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
>  base14-font="TimesRoman"/>
>
> 
>
> 
>
> 
>
> 
>
>
>
> -> This doesn't really works :)
>
>
>
> The name of the codepage 'T1E00877' I'm using here I have found on an IBM
> Documentation:
>
> http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=877/ENUSZP02-0594&appname=printers
>
>
>
> I'm absolutely unsure how to continue with this.
>
> Can I map OCR-B as a raster font? Is it a raster font?
>
> How do I find the correct character set? Is 'T1E00877' the correct codepage?
>
> I'm using the OCR font in 3 sizes: 9.5pt, 10pt and 11pt.
>
>
>
> Please, it's very difficult to find information about this topic. Hundreds
> of documents but I found anything helpful.
>
>
>
> I would really appreciate to get a solution for this.
>
> And much better if I understand how font mapping really works. :)
>
>
>
> Regars
>
> Peter

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



Re: PDF 1.7 ISO 32000

2010-09-28 Thread Peter Hancock
PDF is designed to be backward and forward compatible so in theory
there should not be any reader/browser issues.

Pete

On Tue, Sep 28, 2010 at 1:19 AM, Glenn Adams  wrote:
> probably more pdf readers support 1.4 than 1.7; also, PDF 1.7 does not have
> any particular features that 1.4 does not have that relate to multiple
> language support;
> which languages do you require support for?
> regards,
> glenn
>
> 2010/9/27 Daniel Sánchez González 
>>
>> We need multi-language support. We want to create ISO 32000 because it is
>> standar and we think that it can be viewed in any browser. Is it correct?
>>
>> On Mon, Sep 27, 2010 at 10:10 AM, Peter Hancock 
>> wrote:
>>>
>>> Hi Daniel,
>>>
>>> PDF support in FOP is currently limited to 1.4 - see FOP
>>> http://xmlgraphics.apache.org/fop/trunk/output.html#pdf
>>>
>>> I am not sure if there are any community plans to support later
>>> version of the format in the near future.  Are there any specific
>>> features that have been introduced in the later versions that you
>>> require in particular?
>>>
>>> Peter
>>>
>>> 2010/9/26 Daniel Sánchez González :
>>> > Is it possible to create a 1.7 pdf  version (ISO 32000) with apache
>>> > fop?
>>> >
>>> > Thanks in advance,
>>> > Daniel Sánchez
>>>
>>> -
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>
>>
>
>

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



Re: PDF 1.7 ISO 32000

2010-09-27 Thread Peter Hancock
Hi Daniel,

PDF support in FOP is currently limited to 1.4 - see FOP
http://xmlgraphics.apache.org/fop/trunk/output.html#pdf

I am not sure if there are any community plans to support later
version of the format in the near future.  Are there any specific
features that have been introduced in the later versions that you
require in particular?

Peter

2010/9/26 Daniel Sánchez González :
> Is it possible to create a 1.7 pdf  version (ISO 32000) with apache fop?
>
> Thanks in advance,
> Daniel Sánchez

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



Re: External AFP formdefs

2010-09-21 Thread Peter Hancock
Hi Jeremias,

> the same name is available on the target platform. So I believe that
> afp:include-form-map complements afp:invoke-medium-map but does not
> require it. HTH

That is the behaviour I was expecting too.  Thanks for confirming this with me.

Pete

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



Re: External AFP formdefs

2010-09-20 Thread Peter Hancock
Hi Chris,

I was wondering if a Form Def must be embedded and the reference to
the Medium Map must be contained within the embedded Form Def.

Thanks,

Peter

On Mon, Sep 20, 2010 at 12:23 PM, Chris Bowditch
 wrote:
> Peter Hancock wrote:
>>
>> Hi,
>
> Hi Peter,
>
>>
>> Does FOP support the declaration of formdefs/medium maps as references
>> to external resources?  I see from
>> http://xmlgraphics.apache.org/fop/1.0/output.html#afp-invoke-medium-map
>> that FOP can embed formdefs defined in a file, and it is not directly
>> clear to me if the name attribute of afp:invoke-medium-map can be a
>> reference to an IMM defined externally.
>
> Not sure I follow your question; Are you asking if the src attribute is
> optional? Or whether a Form Def must be embedded and the reference to the
> Medium Map must be contained within the embedded Form Def.
>
> Thanks,
>
> Chris
>
>>
>> Thanks in advance for any help,
>>
>> Peter
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



External AFP formdefs

2010-09-17 Thread Peter Hancock
Hi,

Does FOP support the declaration of formdefs/medium maps as references
to external resources?  I see from
http://xmlgraphics.apache.org/fop/1.0/output.html#afp-invoke-medium-map
that FOP can embed formdefs defined in a file, and it is not directly
clear to me if the name attribute of afp:invoke-medium-map can be a
reference to an IMM defined externally.

Thanks in advance for any help,

Peter

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



Re: FOP 1.0: images fail to render

2010-09-16 Thread Peter Hancock
Hi Dennis,

If it is any help the fop-1.0's MANIFEST.MF includes

Class-Path: avalon-framework-4.2.0.jar batik-all-1.7.jar commons-io-1.
 3.1.jar commons-logging-1.0.4.jar fop-hyph.jar serializer-2.7.0.jar s
 ervlet-2.2.jar xalan-2.7.0.jar xercesImpl-2.7.1.jar xml-apis-1.3.04.j
 ar xml-apis-ext-1.3.04.jar xmlgraphics-commons-1.4.jar

Other than checking those dependencies I can only suggest checking out
the source from subversion
(http://svn.eu.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0) and
building a clean version.
I was able to run your example fine with my build of 1.0.

Pete

On Thu, Sep 16, 2010 at 1:11 PM, Eric Douglas  wrote:
> Dependancies have surely changed between FOP 0.95 and 1.0.  Read the
> manifest and make sure you have all the referenced jars.
> The manifest classpath was causing problems for me so I downloaded the
> source and compiled without it.
> Hopefully the classpath will be removed from the manifests in the next
> available binary with some documentation listing jar dependancies for
> the classpath.
> I searched the manifests of all the jars I had for FOP and found that
> xalan had a classpath in it's manifest as well so I have my own compile
> of that one also from the source download to exclude it.
>
>
> -Original Message-
> From: Dennis van Zoerlandt [mailto:dvzoerla...@vanboxtel.nl]
> Sent: Thursday, September 16, 2010 5:00 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 1.0: images fail to render
>
>
> I am running the application under root (uid 0). I tested it a minute
> ago with a newly created non-root user in its own newly created group,
> but it got the same result. The log files also reported no different
> messages.
>
> Your hint about batik-all-1.7.jar I tried also. I formerly used
> batik-1.7 already, but then with all included Batik libraries one by one
> in my IDE (Eclipse). Now I use the all-in-one library, but with no
> changes in result.
> I tried this before and after the change of the user id under which the
> application is running.
>
> I already used xmlgraphics-commons-1.4.jar, so that's already right.
>
> Regards,
> Dennis
>
>
> Glenn Adams-2 wrote:
>>
>> would you happen to be running as root user (uid 0), or non-root? i
>> recently encountered a similar problem on 1.0 when running junit tests
>
>> as root; the other thing to check is verify you are using
>> xmlgraphics-commons-1.4.jar and batik-all-1.7.jar;
>>
>> On Thu, Sep 16, 2010 at 3:42 PM, dvzoerlandt
>> wrote:
>>
>>>
>>> Hello,
>>>
>>> Since the migration from Apache FOP 0.95 to FOP 1.00 in our Java
>>> application images fail to render. The interesting part of the
>>> logging is as follows:
>>>
>>> ---
>>> Image not available. URI:
>>> file:/u/vbs/stylesheets/images/compas_vbfooter.bmp. Reason:
>>> org.apache.xmlgraphics.image.loader.ImageException: The file format
>>> is not supported. No ImagePreloader found for
>>> file:/u/vbs/stylesheets/images/compas_vbfooter.bmp (No context info
>>> available)
>>> ---
>>>
>>> I also had to upgrade Apache XML Graphics Commons from 1.3.1 to 1.4.
>>> When reverting back to FOP 0.95 (and to XML Graphics Commons 1.3.1)
>>> images are working again. The combination FOP 0.95 with XML Graphics
>>> Commons 1.4 also results in working images.
>>>
>>> As well as BMP files as JPEG files are failing to render. With both
>>> file types the same message is reported.
>>>
>>> I enabled finest logging for org.apache.fop and
>>> org.apache.xmlgraphics but I didn't find no corresponding messages
>>> about an ImagePreloader.
>>>
>>> I also installed JAI Image I/O Tools and the corresponding JAI
>>> (according to
>>> http://xmlgraphics.apache.org/fop/1.0/graphics.html#imageio ) but to
>>> no success regarding to this problem.
>>>
>>> Can anyone give me a pointer in the right direction?
>>>
>>> Regards,
>>> Dennis
>>> --
>>> View this message in context:
>>> http://old.nabble.com/FOP-1.0%3A-images-fail-to-render-tp29725748p297
>>> 25748.html Sent from the FOP - Users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional commands, e-mail:
>>> fop-users-h...@xmlgraphics.apache.org
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/FOP-1.0%3A-images-fail-to-render-tp29725748p297262
> 49.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

-
To unsubscri

Re: FOP 1.0: images fail to render

2010-09-16 Thread Peter Hancock
Hi Dennis,

Could you provide a simple set of example files that demonstrate the
problem, please.

Pete

On Thu, Sep 16, 2010 at 10:00 AM, Dennis van Zoerlandt
 wrote:
>
> I am running the application under root (uid 0). I tested it a minute ago
> with a newly created non-root user in its own newly created group, but it
> got the same result. The log files also reported no different messages.
>
> Your hint about batik-all-1.7.jar I tried also. I formerly used batik-1.7
> already, but then with all included Batik libraries one by one in my IDE
> (Eclipse). Now I use the all-in-one library, but with no changes in result.
> I tried this before and after the change of the user id under which the
> application is running.
>
> I already used xmlgraphics-commons-1.4.jar, so that's already right.
>
> Regards,
> Dennis
>
>
> Glenn Adams-2 wrote:
>>
>> would you happen to be running as root user (uid 0), or non-root? i
>> recently
>> encountered a similar problem on 1.0 when running junit tests as root; the
>> other thing to check is verify you are using xmlgraphics-commons-1.4.jar
>> and
>> batik-all-1.7.jar;
>>
>> On Thu, Sep 16, 2010 at 3:42 PM, dvzoerlandt
>> wrote:
>>
>>>
>>> Hello,
>>>
>>> Since the migration from Apache FOP 0.95 to FOP 1.00 in our Java
>>> application
>>> images fail to render. The interesting part of the logging is as follows:
>>>
>>> ---
>>> Image not available. URI:
>>> file:/u/vbs/stylesheets/images/compas_vbfooter.bmp. Reason:
>>> org.apache.xmlgraphics.image.loader.ImageException: The file format is
>>> not
>>> supported. No ImagePreloader found for
>>> file:/u/vbs/stylesheets/images/compas_vbfooter.bmp (No context info
>>> available)
>>> ---
>>>
>>> I also had to upgrade Apache XML Graphics Commons from 1.3.1 to 1.4. When
>>> reverting back to FOP 0.95 (and to XML Graphics Commons 1.3.1) images are
>>> working again. The combination FOP 0.95 with XML Graphics Commons 1.4
>>> also
>>> results in working images.
>>>
>>> As well as BMP files as JPEG files are failing to render. With both file
>>> types the same message is reported.
>>>
>>> I enabled finest logging for org.apache.fop and org.apache.xmlgraphics
>>> but
>>> I
>>> didn't find no corresponding messages about an ImagePreloader.
>>>
>>> I also installed JAI Image I/O Tools and the corresponding JAI (according
>>> to
>>> http://xmlgraphics.apache.org/fop/1.0/graphics.html#imageio ) but to no
>>> success regarding to this problem.
>>>
>>> Can anyone give me a pointer in the right direction?
>>>
>>> Regards,
>>> Dennis
>>> --
>>> View this message in context:
>>> http://old.nabble.com/FOP-1.0%3A-images-fail-to-render-tp29725748p29725748.html
>>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/FOP-1.0%3A-images-fail-to-render-tp29725748p29726249.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: unable to use afp:resource-level="external" for

2010-08-17 Thread Peter Hancock
Hi,

Yep my patch for feature
(https://issues.apache.org/bugzilla/show_bug.cgi?id=49379) included a
fix.  It would be great if a commiter could review that patch and
commit the fix with the feature.

Pete

On Tue, Aug 17, 2010 at 11:52 AM, Peter Hancock  wrote:
> Hi,
> There is a bug in src/java/org/apache/fop/afp/AFPStreamer.java around line 
> 160:
>  Iterator it = pathResourceGroupMap.entrySet().iterator();
> should be
>  Iterator it = pathResourceGroupMap.values().iterator();
>
> I think I fixed this is a patch I submitted recently.  Let me check..
>
> Pete
>
> On Tue, Aug 17, 2010 at 11:24 AM, Julien Aymé  wrote:
>> Hi,
>>
>> Could you provide the full stack trace, so that we can investigate the code?
>>
>> Thanks,
>>
>> Julien
>>
>> 2010/8/17 Mrutyunjay Sahasrabudhe :
>>> Hi,
>>>
>>> I am using FOP 1.0 version.
>>>
>>> I am trying to use the afp:resource-level="external" for 
>>> 
>>> but getting an exception as below:
>>>
>>> java.lang.ClassCastException: java.util.HashMap$Entry cannot be cast to
>>> org.apache.fop.afp.modca.StreamedResourceGroup
>>>
>>> I did check replies on a similar query posted earlier and ensured that the
>>> user running FOP does have write persmissions to the file/directory where 
>>> the
>>> external resource file is expected to be created.
>>>
>>> It would be really great if you could help here.
>>>
>>> Thanks & regards,
>>> Mrutyunjay
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>

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



Re: unable to use afp:resource-level="external" for

2010-08-17 Thread Peter Hancock
Hi,
There is a bug in src/java/org/apache/fop/afp/AFPStreamer.java around line 160:
  Iterator it = pathResourceGroupMap.entrySet().iterator();
should be
  Iterator it = pathResourceGroupMap.values().iterator();

I think I fixed this is a patch I submitted recently.  Let me check..

Pete

On Tue, Aug 17, 2010 at 11:24 AM, Julien Aymé  wrote:
> Hi,
>
> Could you provide the full stack trace, so that we can investigate the code?
>
> Thanks,
>
> Julien
>
> 2010/8/17 Mrutyunjay Sahasrabudhe :
>> Hi,
>>
>> I am using FOP 1.0 version.
>>
>> I am trying to use the afp:resource-level="external" for 
>> 
>> but getting an exception as below:
>>
>> java.lang.ClassCastException: java.util.HashMap$Entry cannot be cast to
>> org.apache.fop.afp.modca.StreamedResourceGroup
>>
>> I did check replies on a similar query posted earlier and ensured that the
>> user running FOP does have write persmissions to the file/directory where the
>> external resource file is expected to be created.
>>
>> It would be really great if you could help here.
>>
>> Thanks & regards,
>> Mrutyunjay
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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



Re: fop region-body border and padding issue

2010-08-13 Thread Peter Hancock
Hi Muralidhar,

Since the region-body statically positioned relative to the page (as
determined by margins of simple-page-master), then perhaps you can achieve
your desired layout by just combining the effective padding into the margins
of region-before?

Pete

On Fri, Aug 13, 2010 at 3:17 PM, Muralidhar Kulkarni <
muralidha...@igiindia.com> wrote:

>   in the XSL-FO is having border and padding attributes
> with same value. Because of this I am getting the validation exception while
> transforming the XSL-FO file to get the pdf document. If I set strict
> validation to false on fopFactory object, then I will get pdf without proper
> alignment. Please suggest how to get rid of this issue.
>
>
>
> Thanks,
>
>
>
> [image: IGI Health]
> Muralidhar Kulkarni
> Senior Software Engineer
> 371 Hoes Lane
> Piscataway NJ, 08854
> www.igihealth.com
>
> 732-271-0600 X1616
> muralidha...@igiindia.com
>
>
>
<>

Re: Keeping memory usage low when FOP is not running and avoid open file handles after FOP is run

2010-07-19 Thread Peter Hancock
Hi Dominik,

This could well be a bug, akin to the issue dealt with here
https://issues.apache.org/bugzilla/show_bug.cgi?id=49060

Pete

On Mon, Jul 19, 2010 at 9:53 AM, Dominik Stadler
 wrote:
> Hi,
>
>
>
> my use-case is to have FOP integrated into a larger server application,
> where FOP is only executed sporadically.
>
>
>
> We already evaluated running FOP externally, but had severe trouble doing so
> for various reasons. Therefore we need to try to keep memory usage of FOP as
> low as possible when it is not running, I already had to do some workarounds
> to keep FOP from storing memory in caches or in thread locals, partly also
> the XML implementation from Sun interferes and keeps the whole FOP SAX
> Handler as thread local. Also any intermediate files need to be removed when
> FOP is finished rendering, something that caused me a bit of headache last
> week.
>
>
>
> I have one final item that I just found and would like to get input if there
> is a better solution:
>
> The FOUserAgent holds an element “imageSessionContext” which holds
> SoftReferences to Source/ImageSource elements via
> AbstractImageSessionContext.sessionSources. The memory for these items is
> cleaned correctly when we un-reference the FOUserAgent object, however the
> Source-items still hold a file-handle via the InputStream that is included
> in StreamSource/ImageStreamSource object. The effect is that I cannot remove
> intermediate image files that are used during PDF generation, but would like
> to delete after the PDF is created.
>
>
>
> Currently I employ an ugly hack where I remember the file-names and
> afterwards use FOUserAgent.getImageSessionContext().getSource() to retrieve
> the Source and do the “close()” on the item manually.
>
>
>
> -  Is this a bug, as file handles are kept open this way and are
> only given up, when the SoftReference is collected? So this can easily cause
> “out of handle” type of errors if a lot of memory is available and thus
> SoftReferences are not collected for a long time.
>
> -  Is there a way to not keep these references in the first run? I
> use different images throughout the document, so image caching is not very
> useful for me anyway.
>
>
>
> Thanks… Dominik.
>
>
>
> Dominik Stadler, Team Lead
> F +43 732 21018 | E dominik.stad...@dynatrace.com | Skype:
> stadler.dominik
>
> dynaTrace is Continuous APM >> Monitor. Resolve. Prevent. >>
>
> Web: http://www.dynatrace.com | Blog: http://blog.dynatrace.com
>
> Learn about dynaTrace in 2 minutes | Forrester rates dynaTrace “On Fire”.
> Get your copy of the report here.
>
> This e-mail message, including any attachments, is confidential and may
> contain legally privileged information. This message is intended solely for
> the use of the addressee. Use by others is prohibited. Disclosure, copying
> and distribution of this information to third parties is not permitted. If
> you have received this message in error, please notify us immediately and
> delete it from your system. The integrity and security of this message
> cannot be guaranteed and it may be subject to data corruption, interception
> and unauthorized amendment, for which we accept no liability.
>
>

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



Re: Log4j Woes

2010-05-25 Thread Peter Hancock
Hi Nancy,

The suggested method fails because all arguments to fop are passed as
arguments to the application, not the JVM.
You could change the fop script and add '-Dlog4j.configuration=...' *
directly* before or after '$HEADLESS'  on the line 'run_java ...'.

Better still you could put something like $MY_JVM_VARS instead and run
* export MY_JVM_VARS='-Dlog4j.configuration=file:///wherever/log4j.xml' fop*

Any other JVM arguments required can be placed in the MY_JVM_VARS variable.

The problem with this would be when an update changes the /usr/bin/fop.  You
might want to copy this script into ~/ somewhere and run that instead,
merging any potential future changes to fop when thy occur.

Pete

On Tue, May 25, 2010 at 4:34 PM, nancy_b  wrote:

>
> Hi Julien!
>
> Thanks a lot for trying to help me. Unfortunately, fop fails printing the
> following error:
> 2010-05-25 18:32:35,176 [main] ERROR FOP - Exception
> java.lang.IllegalArgumentException: Error creating InputHandler object.
>at
>
> org.apache.fop.cli.CommandLineOptions.createInputHandler(CommandLineOptions.java:849)
>at
> org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:167)
>at org.apache.fop.cli.Main.startFOP(Main.java:154)
>at org.apache.fop.cli.Main.main(Main.java:197)
>
> Please, advise!
> Thanks a lot again!
> Nancy
>
>
> Julien Aymé wrote:
> >
> > Hello,
> >
> > Assuming your log4j configuration file is placed in the
> > "/home/cozy/doc/xsl/" folder,
> > you can tell fop to use your log4j file like this:
> >
> > fop -Dlog4j.configuration=file:///home/cozy/doc.xsl/log4j.xml-c
> > /home/cozy/doc/xsl/myconf.xml -fo  \
> >  user_manual.fo -pdf  user_manual.pdf
> >
> > (replace log4j.xml with the actual name of your configuration file).
> >
> > HTH,
> > Julian
> >
> > 2010/5/25 nancy_b :
> >>
> >> From http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupLog4JLogging:
> >>
> >> "Set the following system property when you start the JVM:
> >> -Dlog4j.configuration=file:///C:/Dev/FOP/log4j.properties
> >> ..."
> >> Does anybody know how do I define this on Linux Debian and where?
> >>
> >> Thanks a lot in advance!
> >> nancy
> >>
> >>
> >> nancy_b wrote:
> >>>
> >>> Hi Folks!
> >>>
> >>> I use FOP 0.95 to compile PDF documents from DocBook sources on my
> Linux
> >>> Debian machine. After upgrading my Debian to v5.2, I get the following
> >>> log4j-related problem:
> >>>
> >>> fop -c /home/cozy/doc/xsl/myconf.xml -fo  \
> >>>   user_manual.fo -pdf  user_manual.pdf
> >>> log4j:WARN No appenders could be found for logger
> >>> (org.apache.fop.util.ContentHandlerFactoryRegistry).
> >>> log4j:WARN Please initialize the log4j system properly.
> >>>
> >>> and FOP does not produce any compilation-related warnings that I expect
> >>> it
> >>> to print in the console.
> >>> 2.6.18.3
> >>> I did not have this problem before (on my Debian v.2.6.18.3).
> >>>
> >>> After reading related posts on this forum, I did the following:
> >>>
> >>> 1) Created a log4j conf file (log4j-properties.xml) with the following
> >>> contents:
> >>>
> >>> 
> >>> 
> >>>
> >>> http://jakarta.apache.org/log4j/";>
> >>>   
> >>>
> >>> 
> >>>
> >>> 
> >>>   
> >>>   
> >>> 
> >>>
> >>> 
> >>>   
> >>>   
> >>>   
> >>> 
> >>> 
> >>>   
> >>>   
> >>>
> >>>
> >>>   
> >>> 
> >>>
> >>> It sits together with log4j in the /usr/share/java/ directory. I also
> >>> placed there the log4j.dtd file.
> >>>
> >>> 2) In bashrc, I defined the following:
> >>>
> >>> export
> >>>
> LOG4J_OPTS="-Dlog4j.configuration=/usr/share/java/log4j-properties.xml".
> >>>
> >>> But, guess what? It did not help at all. I still get the log4j message.
> >>> The posts also mention that it is necessary to define the conf. file in
> >>> the classpath. I have no idea what it is and how to find it
> >>>
> >>> Please, people, help! :-(
> >>>
> >>> Thanks a lot in advance
> >>> nancy
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/Log4j-Woes-tp28658124p28669034.html
> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Log4j-Woes-tp28658124p28669930.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.or

Re: Log4j Woes

2010-05-25 Thread Peter Hancock
Hi Nancy,

I have just realised that you are using fop via the package manager, and not
from a direct fop download - whoops!
I am sorry, but I am not sure I can help with your configuration.  Perhaps
there is a Debian mailing list that might help?  I wonder if the LOG4J_OPTS
variable is used by java-wrappers.sh script referenced in the fop script?
Maybe you could email the author fourm...@debian.org?

If you have no luck you could alternatively checkout fop with subversion and
run that using the configuration discussed in my last response.  This will
require a bit more work to set things up, but it is well documented at
 http://xmlgraphics.apache.org/fop/quickstartguide.html

I am for the confusion caused by my assumption about your fop setup!

Pete

On Tue, May 25, 2010 at 11:33 AM, nancy_b  wrote:

>
> Hi dear Peter,
>
> Thank you for your prompt response!!!
> --First put the log4j jar in fop's lib directory
>
> I don't have such a directory. I do have
> 1) /usr/bin/fop (where fop is the script)
> 2) /usr/share/java/fop-0.95.jar and /usr/share/java/fop.jar
>
> --Put your log4j.xml file in the root of the fop project.
> where is this exactly?
>
> -Uncomment the following line...
>
> I dont have such a line. Here what I have in the fop script:
> ~
> #! /bin/sh
> # Shell script wrapper around the fop program,
> # Copyright 2008 by Vincent Fourmond 
> #
> # Licensed under the same terms as fop itself, that is under
> # the conditions of the Apache 2 licence.
>
> # Include the wrappers utility script
> . /usr/lib/java-wrappers/java-wrappers.sh
>
> # comment this line if you want fop to run without headless property,
> # or write a line containing
> #  HEADLESS=
> # in your fop configuration file.
> HEADLESS=-Djava.awt.headless=true
>
> # Load system-wide configuration, if any
> if [ -f /etc/fop.conf ]; then
>. /etc/fop.conf
> fi
>
> # Load user's preferences, if any
> if [ -f "$HOME/.foprc" ]; then
>. $HOME/.foprc
> fi
>
> # We prefer to use openjdk or Sun's java if available
> find_java_runtime openjdk sun  || find_java_runtime
>
> find_jars commons-io avalon-framework serializer xalan2 xml-apis
> find_jars batik-all commons-logging servlet-api xercesImpl
> xmlgraphics-commons
> find_jars xml-apis-ext
>
> # We load the hyphenation jar at the request of the user.
> if [ "$FOP_HYPHENATION_PATH" ]; then
>find_jars $FOP_HYPHENATION_PATH
> fi
> find_jars fop
>
> run_java $HEADLESS org.apache.fop.cli.Main "$@"
> ~~~
>
> Please advise!
>
> thanks a lot in advance!!!
> Nancy
>
>
> Peter Hancock-2 wrote:
> >
> > Hi Nancy,
> >
> > I am not sure how the LOG4J_OPTS environmental variable is supposed to be
> > handled by the log4j library (I would like to know!) so I would recommend
> > changing the fop script.
> >
> > First put the log4j jar in fop's lib directory.  You can download it from
> > http://logging.apache.org/log4j/1.2/manual.html
> > Put your log4j.xml file in the root of the fop project.
> > Edit fop:
> > Uncomment the following line
> > *
> >
> LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> > *
> >
> > edit the fop_exec_command variable (bottom of fop file) to include
> >  -Dlog4j.configuration=log4j.xml
> >
> > This approach will keep the log4j config local to fop which is preferred.
> > Other java applications using log4j would want different config.  Also
> you
> > should not have to modify /usr/share/java since it is managed by Debian.
> >
> > I hope this works for you
> >
> > Pete
> >
> > On Mon, May 24, 2010 at 9:01 PM, nancy_b  wrote:
> >
> >>
> >> Hi Pete,
> >>
> >> Thanks a lot for your prompt response!!!
> >>
> >> -- Did you change the fop script to specify the LOGCHOICE variable?
> >>
> >> No, why should I? I didn't do anything in my previous Linux, and it was
> >> fine...
> >>
> >> --Also, is the log4j.jar on your classpath too?
> >>
> >> Don't know, how do I check that??
> >>
> >> Please, advise! ;-)
> >>
> >> My best wishes,
> >> Nancy
> >>
> >>
> >>
> >> Peter Hancock-2 wrote:
> >> >
> >> > Hi Nancy,
> >> >
> >> > Did you change the fop script to specify the LOGCHOICE variable?  At
> >> the
> >> > bottom of the fop script you will find some  commented out exampl

Re: Log4j Woes

2010-05-25 Thread Peter Hancock
Hi Nancy,

I am not sure how the LOG4J_OPTS environmental variable is supposed to be
handled by the log4j library (I would like to know!) so I would recommend
changing the fop script.

First put the log4j jar in fop's lib directory.  You can download it from
http://logging.apache.org/log4j/1.2/manual.html
Put your log4j.xml file in the root of the fop project.
Edit fop:
Uncomment the following line
*
LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
*

edit the fop_exec_command variable (bottom of fop file) to include
 -Dlog4j.configuration=log4j.xml

This approach will keep the log4j config local to fop which is preferred.
Other java applications using log4j would want different config.  Also you
should not have to modify /usr/share/java since it is managed by Debian.

I hope this works for you

Pete

On Mon, May 24, 2010 at 9:01 PM, nancy_b  wrote:

>
> Hi Pete,
>
> Thanks a lot for your prompt response!!!
>
> -- Did you change the fop script to specify the LOGCHOICE variable?
>
> No, why should I? I didn't do anything in my previous Linux, and it was
> fine...
>
> --Also, is the log4j.jar on your classpath too?
>
> Don't know, how do I check that??
>
> Please, advise! ;-)
>
> My best wishes,
> Nancy
>
>
>
> Peter Hancock-2 wrote:
> >
> > Hi Nancy,
> >
> > Did you change the fop script to specify the LOGCHOICE variable?  At the
> > bottom of the fop script you will find some  commented out examples of
> > setting this variable.  The convention is to name the log4j file
> > log4j.xml,
> > but it should not matter as you refer to it explicitly with the
> LOG4J_OPTS
> > system variable.  Also, is the log4j.jar on your classpath too?
> >
> > I hope this helps,
> >
> > Pete
> >
> >
> > On Mon, May 24, 2010 at 4:25 PM, nancy_b  wrote:
> >
> >>
> >> Hi Folks!
> >>
> >> I use FOP 0.95 to compile PDF documents from DocBook sources on my Linux
> >> Debian machine. After upgrading my Debian to v5.2, I get the following
> >> log4j-related problem:
> >>
> >> fop -c /home/cozy/doc/xsl/myconf.xml -fo  \
> >>  user_manual.fo -pdf  user_manual.pdf
> >> log4j:WARN No appenders could be found for logger
> >> (org.apache.fop.util.ContentHandlerFactoryRegistry).
> >> log4j:WARN Please initialize the log4j system properly.
> >>
> >> and FOP does not produce any compilation-related warnings that I expect
> >> it
> >> to print in the console.
> >> 2.6.18.3
> >> I did not have this problem before (on my Debian v.2.6.18.3).
> >>
> >> After reading related posts on this forum, I did the following:
> >>
> >> 1) Created a log4j conf file (log4j-properties.xml) with the following
> >> contents:
> >>
> >> 
> >> 
> >>
> >> http://jakarta.apache.org/log4j/";>
> >>  
> >>
> >>
> >>
> >>
> >>  
> >>  
> >>
> >>
> >>
> >>  
> >>  
> >>  
> >>
> >>
> >>  
> >>  
> >>   
> >>   
> >>  
> >> 
> >>
> >> It sits together with log4j in the /usr/share/java/ directory. I also
> >> placed
> >> there the log4j.dtd file.
> >>
> >> 2) In bashrc, I defined the following:
> >>
> >> export
> >> LOG4J_OPTS="-Dlog4j.configuration=/usr/share/java/log4j-properties.xml".
> >>
> >> But, guess what? It did not help at all. I still get the log4j message.
> >> The
> >> posts also mention that it is necessary to define the conf. file in the
> >> classpath. I have no idea what it is and how to find it
> >>
> >> Please, people, help! :-(
> >>
> >> Thanks a lot in advance
> >> nancy
> >>
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/Log4j-Woes-tp28658124p28658124.html
> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Log4j-Woes-tp28658124p28661171.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Log4j Woes

2010-05-24 Thread Peter Hancock
Hi Nancy,

Did you change the fop script to specify the LOGCHOICE variable?  At the
bottom of the fop script you will find some  commented out examples of
setting this variable.  The convention is to name the log4j file log4j.xml,
but it should not matter as you refer to it explicitly with the LOG4J_OPTS
system variable.  Also, is the log4j.jar on your classpath too?

I hope this helps,

Pete


On Mon, May 24, 2010 at 4:25 PM, nancy_b  wrote:

>
> Hi Folks!
>
> I use FOP 0.95 to compile PDF documents from DocBook sources on my Linux
> Debian machine. After upgrading my Debian to v5.2, I get the following
> log4j-related problem:
>
> fop -c /home/cozy/doc/xsl/myconf.xml -fo  \
>  user_manual.fo -pdf  user_manual.pdf
> log4j:WARN No appenders could be found for logger
> (org.apache.fop.util.ContentHandlerFactoryRegistry).
> log4j:WARN Please initialize the log4j system properly.
>
> and FOP does not produce any compilation-related warnings that I expect it
> to print in the console.
> 2.6.18.3
> I did not have this problem before (on my Debian v.2.6.18.3).
>
> After reading related posts on this forum, I did the following:
>
> 1) Created a log4j conf file (log4j-properties.xml) with the following
> contents:
>
> 
> 
>
> http://jakarta.apache.org/log4j/";>
>  
>
>
>
>
>  
>  
>
>
>
>  
>  
>  
>
>
>  
>  
>   
>   
>  
> 
>
> It sits together with log4j in the /usr/share/java/ directory. I also
> placed
> there the log4j.dtd file.
>
> 2) In bashrc, I defined the following:
>
> export
> LOG4J_OPTS="-Dlog4j.configuration=/usr/share/java/log4j-properties.xml".
>
> But, guess what? It did not help at all. I still get the log4j message. The
> posts also mention that it is necessary to define the conf. file in the
> classpath. I have no idea what it is and how to find it
>
> Please, people, help! :-(
>
> Thanks a lot in advance
> nancy
>
>
> --
> View this message in context:
> http://old.nabble.com/Log4j-Woes-tp28658124p28658124.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: AcroForm extension

2010-05-11 Thread Peter Hancock
Hi Alessandro,

First off this is a development discussion and should be moved to fop-dev
mailing list - if you have not subscribed to this yet I suggest you do for
further discussion (see http://xmlgraphics.apache.org/fop/maillist.html).

I have been working on an implementation of AcroForms (Following PDF Ref 1.4
- FOP's PDF library mostly adheres to this spec).

Before you take on this task alone it would be a good idea if you review my
progress:
I am at a fairly early stage although
 * Written draft specification for fox extensions
 * Extended FOP's  PDF library (package org.apache.fop.pdf) to include a
fairly comprehensive set of PDF's acroform elements
 * Implemented a simple text label and pushbutton usecase

I will shortly submit a patch to FOP and put documentation on the FOP wiki.

It would be fantastic to get your thoughts on this and hopefully save you
independently doing the same thing!

Your approach to develop the extension as a pluggable module is
theoretically the correct approach, however you may run into problems-
perhaps insurmountable ones!
 Althougth the FO tree building and the layout/ area tree building stages
both support pluggable extension in principle,  some parts of the system
currently do not: The rendering of fox extension elements, for example, is
handled by the core renderers/painters and it does not seem trivial
(possible?) to delegate at these stages to an external handler.

I see some of the major challenges in developing the right implementation
including:
 * Defining fox elements that exploit the rich appearances that can be
prescribed to pdf fields
 * With regards to layout, defining the right bridge between existing fo
elements and PDF e.g. text labels may behave like fo:inline elements,
multiline text fields may have the layout behaviour of fo:blocks etc)
 * Externalising the rendering/painting code - perhaps not possible


Peter

On Mon, May 10, 2010 at 8:14 PM, Alessandro Marino
wrote:

> I'm trying to implement an extension to add AcroForm (§ 8.6 page 671 of PDF
> Reference 1.7) to a PDF document.
> Below there are my thoughts about the process of building such extension,
> could anyone tell me if there's somethig wrong?
>
> I have to create a jar and configure an ElementMapping provider adding the
> file /META-INF/services/org.apache.fop.fo.ElementMapping with the fully
> qualified classname of my ElementMapping implementation class.
> The ElementMapping implementation is responsible to provide a "Maker class"
> that adds an objectified representation of the xsl tag to the FOTree.
>
> After the creation of the FOTree the LayoutManagerMapping is initialized
> inside the AreaTreeHandler. The LayoutManagerMapping holds the association
> between each FONode and its LM.
>
> For the first version of this extension I would prefer (to simplify things)
> to have a LM that puts an AcroForm field on its own line.
> How do I configure a LM for these objects?
> It doesn't seem to exist an extension point for LM, obvious extension
> points are represented by: ElementMapping, ContentHandlerFactory, Renderer,
> FOEventHandler, PDFImageHandler, XMLHandler (for which I can configure an
> implementation class provider in META-INF/services).
> I saw the LayoutManagerMaker interface that has various methods for
> creating a LM from a FONode or from another LM.
> Do I need to add another method to this interface?
>
> Then I needs two things to render an AcroForm in PDF:
>
> * an array in the catalog dictionary (§ 3.6.1 page 141) that holds all
> references to each field.
>   Do I need to patch the PDFRoot object to add such array for example
> with a method "setAcroForm"?
>
> * a field dictionary (page 674) for each field
>
> Thanks and regards,
> Alessandro
>


Re: FOP, hypenation. How to compile hyph pattern? my own

2010-04-29 Thread Peter Hancock
You should have and use the standard build.xml that shipped with fox.  The
target 'compile-hyphenation' is defined in this.  See Simon's post for where
to go from here.

On Thu, Apr 29, 2010 at 2:59 PM, lexa2009  wrote:

>
> hihi, thx.
> u think problem in this? it is only warning. on some forum i read that it
> does not metter when create hyph.
>
> what must be in build.xml ?? i really do not know what to write in it.
>
> Peter Hancock-2 wrote:
> >
> > Hi,
> > Googling lead me to the suggestion that you need JAVA_HOME to point to
> the
> > jdk, not the jre.  see http://forums.sun.com/thread.jspa?threadID=757039
> >
> > Pete
> >
> > On Thu, Apr 29, 2010 at 12:08 PM, lexa2009  wrote:
> >
> >>
> >> done. now i use it from fop directory but have the same output -
> >> C:\fop-0.95>ant compile-hyphenation
> >> Unable to locate tools.jar. Expected to find it in C:\Program
> >> Files\Java\jre6\li
> >> b\tools.jar
> >> Buildfile: C:\fop-0.95\build.xml
> >>
> >> BUILD FAILED
> >> Target "compile-hyphenation" does not exist in the project "null".
> >>
> >> Total time: 0 seconds
> >>
> >>
> >>
> >> Peter Hancock-2 wrote:
> >> >
> >> > You should run ant from the your fop dir.
> >> > If ant is not in your path see http://ant.apache.org/ for details.
> >> >
> >> > Pete
> >> >
> >> > On Thu, Apr 29, 2010 at 10:58 AM, lexa2009 
> wrote:
> >> >
> >> >>
> >> >> Hi! Thx a lot, i change my pattern file for this (for example)
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> 
> >> >> -->
> >> >> +5a
> >> >> a5+
> >> >> +5b
> >> >> b5+
> >> >> 
> >> >> 
> >> >>
> >> >> when i try to compile it( in cmd i go to ant/bin and write ant.bat
> >> >> compile-hyphenation i have an error
> >> >>
> >> >> Unable to locate tools.jar. Expected to find it in C:\Program
> >> >> Files\Java\jre6\lib\tools.jar
> >> >> Buildfile: C:\ant\bin\build.xml
> >> >>
> >> >> BUILD FAILED
> >> >> Target "compile-hyphenation" does not exist in the project "null".
> >> >>
> >> >> Total time: 0 seconds
> >> >>
> >> >> i use google and fing that i can ignore Unable to locate tools.jar.
> >> >> Expected
> >> >> to find it in C:\Program Files\Java\jre6\lib\tools.jar because i do
> >> not
> >> >> need
> >> >> it for my task.
> >> >> but what to do with Target "compile-hyphenation" does not exist in
> the
> >> >> project "null".?
> >> >> i have to write build.xml by myself?
> >> >> thx!
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28398640.html
> >> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> >> >> For additional commands, e-mail:
> fop-users-h...@xmlgraphics.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28399146.html
> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28400915.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: FOP, hypenation. How to compile hyph pattern? my own

2010-04-29 Thread Peter Hancock
Hi,
Googling lead me to the suggestion that you need JAVA_HOME to point to the
jdk, not the jre.  see http://forums.sun.com/thread.jspa?threadID=757039

Pete

On Thu, Apr 29, 2010 at 12:08 PM, lexa2009  wrote:

>
> done. now i use it from fop directory but have the same output -
> C:\fop-0.95>ant compile-hyphenation
> Unable to locate tools.jar. Expected to find it in C:\Program
> Files\Java\jre6\li
> b\tools.jar
> Buildfile: C:\fop-0.95\build.xml
>
> BUILD FAILED
> Target "compile-hyphenation" does not exist in the project "null".
>
> Total time: 0 seconds
>
>
>
> Peter Hancock-2 wrote:
> >
> > You should run ant from the your fop dir.
> > If ant is not in your path see http://ant.apache.org/ for details.
> >
> > Pete
> >
> > On Thu, Apr 29, 2010 at 10:58 AM, lexa2009  wrote:
> >
> >>
> >> Hi! Thx a lot, i change my pattern file for this (for example)
> >> 
> >> 
> >> 
> >> 
> >> 
> >> -->
> >> +5a
> >> a5+
> >> +5b
> >> b5+
> >> 
> >> 
> >>
> >> when i try to compile it( in cmd i go to ant/bin and write ant.bat
> >> compile-hyphenation i have an error
> >>
> >> Unable to locate tools.jar. Expected to find it in C:\Program
> >> Files\Java\jre6\lib\tools.jar
> >> Buildfile: C:\ant\bin\build.xml
> >>
> >> BUILD FAILED
> >> Target "compile-hyphenation" does not exist in the project "null".
> >>
> >> Total time: 0 seconds
> >>
> >> i use google and fing that i can ignore Unable to locate tools.jar.
> >> Expected
> >> to find it in C:\Program Files\Java\jre6\lib\tools.jar because i do not
> >> need
> >> it for my task.
> >> but what to do with Target "compile-hyphenation" does not exist in the
> >> project "null".?
> >> i have to write build.xml by myself?
> >> thx!
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28398640.html
> >> Sent from the FOP - Users mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28399146.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: FOP, hypenation. How to compile hyph pattern? my own

2010-04-29 Thread Peter Hancock
You should run ant from the your fop dir.
If ant is not in your path see http://ant.apache.org/ for details.

Pete

On Thu, Apr 29, 2010 at 10:58 AM, lexa2009  wrote:

>
> Hi! Thx a lot, i change my pattern file for this (for example)
> 
> 
> 
> 
> 
> -->
> +5a
> a5+
> +5b
> b5+
> 
> 
>
> when i try to compile it( in cmd i go to ant/bin and write ant.bat
> compile-hyphenation i have an error
>
> Unable to locate tools.jar. Expected to find it in C:\Program
> Files\Java\jre6\lib\tools.jar
> Buildfile: C:\ant\bin\build.xml
>
> BUILD FAILED
> Target "compile-hyphenation" does not exist in the project "null".
>
> Total time: 0 seconds
>
> i use google and fing that i can ignore Unable to locate tools.jar.
> Expected
> to find it in C:\Program Files\Java\jre6\lib\tools.jar because i do not
> need
> it for my task.
> but what to do with Target "compile-hyphenation" does not exist in the
> project "null".?
> i have to write build.xml by myself?
> thx!
> --
> View this message in context:
> http://old.nabble.com/FOP%2C-hypenation.-How-to-compile-hyph-pattern--my-own-tp28340019p28398640.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Image Rotate

2010-04-26 Thread Peter Hancock
You can also use the extension attribute 'translate':



You have finer control of the angle, however the absolute-position must be
set to "absolute" or "fixed" ( relative to the block-containers parent).

Pete
On Mon, Apr 26, 2010 at 10:45 AM, Venkat Reddy <
vanukuri.ven...@googlemail.com> wrote:

> You can rotate the image in the following way...
>
>
>
> Venkat.
>
>
> Thomas Peterson wrote:
>
>> Is it possible to rotate an Image Element width degrees?
>>
>> Best regards
>>
>> Thomas Peterson
>> Geschaftsfuhrender Gesellschafter - Software Development
>>
>> ***
>> PrintshopCreator GmbH
>> WebToPrint Losungen fur die Druckindustrie.
>> GF: Thomas Peterson, Heinz Broskamp
>> Am Mittelhafen 42-44
>> D - 48155 Munster
>> Tel.: +49 (0) 251-136 56 33 8
>> Fax.: +49 (0) 251-136 56 33 9
>> Web: www.printshopcreator.de
>> Email: tpeter...@printshopcreator.de
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: afp images

2010-04-23 Thread Peter Hancock
Hi Sekhar,
The xml you have provided is not xsl fo (looks like a style sheet).  Could
you provide the actual fo you have used - you can strip out unrelated stuff
and we can replace the image with something local.

Cheers,
Pete

On Fri, Apr 23, 2010 at 12:28 PM, afp images  wrote:

>
> Dear All
> I am new to AFP and i am unable to work with color images
> i have used  in xconf file and in the xsl file i am
> specifing that in simple-page-master as
>  src="C:\FOP\images\combo_big.jpg"/> and inside the block container my code
> is as
>  right=".45in">
> 
> 
> name="src">C:\FOP\images\combo_big.jpg
>  
> 
> now the problem is i am able to view b+w image but not color images.plz
> help
> me out how to over come this issue.my image is of 30kb file.
>
> Thanks in advance
>
> Regards
> Sekhar.
> --
> View this message in context:
> http://old.nabble.com/afp-images-tp28340117p28340117.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Help embeding fonts

2010-04-15 Thread Peter Hancock
It should be file:///C:/Program Files(x86)/fop-0.95/fonts.
base-uri is an attribute of 

Pete

On Thu, Apr 15, 2010 at 2:51 PM, bonekrusher  wrote:

>
> Thanks for the help.
>
> I added
> .
>
> to the .xconf file, but get the same message and the fonts are not
> embedding.
>
> Is my markup correct in the xconf file?
>
> Thanks,
> --
> View this message in context:
> http://old.nabble.com/Help-embeding-fonts-tp28254961p28255545.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Help embeding fonts

2010-04-15 Thread Peter Hancock
Hi Bonekrusher,
The  element has to be contained in the  element- see
http://xmlgraphics.apache.org/fop/0.95/fonts.html for the configuration
documentation.

You may need to include file:///C:/Program Files(x86)/fop-0.95/fonts in the
base-uri attribute, or in the  element of your fop.xconf

Pete


On Thu, Apr 15, 2010 at 2:02 PM, bonekrusher  wrote:

>
> Hi,
>
> I am using the following in my fop.xconf to embed fonts. Everything works
> on
> my PC, but when I run on a different machine, the fonts are not found:
>
> fop.xconf
>
> 
>
>
>
>
> weight="normal"/>
>
>
>
>
>
>
>
>
> 
>
> I have converted the font matrix with org.apache.fop.fonts.apps.TTFReader
> to
> xml and placed them in a folder "file:///C:/Program Files
> (x86)/fop-0.95/fonts"
>
> FOP reports:
>
> Apr 13, 2010 2:05:47 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
> WARNING: Font 'Arial,normal,700' not found. Substituting with
> 'any,normal,700'.
>
> The file structure is the same on both machines...
>
> Any thoughts?
>
> Thanks,
>
>
> --
> View this message in context:
> http://old.nabble.com/Help-embeding-fonts-tp28254961p28254961.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Change logging level?

2010-04-01 Thread Peter Hancock
Hi Philip,

Do you have the log4j jar in the FOP/your app classpath?  It does not come
shipped with FOP.

I hope that helps,

Pete

On Thu, Apr 1, 2010 at 2:40 PM, Phillip Oldham  wrote:

>  How can I change the logging level to only fatal errors? I've tried
> adding an log4j.properties/.xml file to the classpath but it was
> unsuccessful.
> --
>
> *Phillip B Oldham*
> ActivityHQ
> ph...@activityhq.com 
> --
>
> *Policies*
>
> This e-mail and its attachments are intended for the above named
> recipient(s) only and may be confidential. If they have come to you in
> error, please reply to this e-mail and highlight the error. No action should
> be taken regarding content, nor must you copy or show them to anyone.
>
> This e-mail has been created in the knowledge that Internet e-mail is not a
> 100% secure communications medium, and we have taken steps to ensure that
> this e-mail and attachments are free from any virus. We must advise that in
> keeping with good computing practice the recipient should ensure they are
> completely virus free, and that you understand and observe the lack of
> security when e-mailing us.
> --
>


Re: FOP 0.95 printing

2010-03-30 Thread Peter Hancock
Hi Eric,

Trunk is the development branch of the Subversion repository that houses the
FOP codebase. Subversion is a VCS (
http://en.wikipedia.org/wiki/Revision_control) - a code management tool.
http://xmlgraphics.apache.org/fop/dev/tools.html - this link will guide you
through the process of getting up and running with FOP's source code.  It is
worth making the effort to go through these simple steps as many Java
projects live in a Subversion repository and use Ant for build automation.

I hope this helps,

Pete


On Mon, Mar 29, 2010 at 4:55 PM, Eric Douglas wrote:

>  How do I download the trunk?  If there's no compiled version, is there a
> source package?
> Am I looking at the wrong thing?  I went to the FOP site and clicked on
> Trunk, then Repository.  I see .java files in there.  Do I need to download
> all those one at a time??
>
>  ----------
> *From:* Peter Hancock [mailto:peter.hanc...@gmail.com]
> *Sent:* Tuesday, March 23, 2010 8:38 AM
>
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: FOP 0.95 printing
>
> Hi Eric,
>
> You will have to compile FOP trunk yourself I am afraid.  It is straight
> forward but requires you to have ant installed.  From the FOP trunk checkout
> dir you can just run 'ant' from the command line and it will build the Fop
> jars for you. For more details see
> http://xmlgraphics.apache.org/fop/0.95/compiling.html
>
> I am not really sure how FOP auto loads fonts from the font base url, or
> which renders support it.
>
> Pete
>
> On Tue, Mar 23, 2010 at 12:20 PM, Eric Douglas wrote:
>
>>  Hi Pete,
>>
>> I may just need to look at this again, and maybe I missed something the
>> first time.  I'll look for that example and see if that helps.  I was trying
>> to use java.awt.PrinterJob but it can't doing anything until I transform,
>> and the transform method was sending output to the printer, so I couldn't
>> quite figure out where to specify which printer to use.
>>
>> I am embedding the code, not in Java but in a secondary language which is
>> able to include any Java code with slightly different syntax.  It is also
>> able to call Java code if there's anything which needs to be written in Java
>> that it can't emulate.
>>
>> I did run into some difficulties trying to code the same output to 3
>> different formats (screen, PDF, printer) since they require different
>> renderers which are in different paths.  I see the SVGRenderer,
>> TIFFRenderer, AWTRenderer, PrintRenderer, PNGRenderer, and a
>> PNGRenderer_onthefly are subclasses of Java2DRenderer while PSRenderer and
>> PDFRenderer are not.
>>
>> I would like to print using specific fonts from specific TTF files.  I
>> don't want to rely on the fonts being installed in the OS on the machine
>> running the application.  We did that in the past and ran into a problem
>> where someone's OS didn't have the font or someone had a different version
>> of the same font and they got different output.  I'm finding it difficult in
>> FOP to connect my custom font to the different renderers.  I added the font
>> references in the fop.xconf file.  The AWTRenderer seems to find it just
>> fine with the FopFactory.setFontBaseURL method while the PDFRenderer
>> doesn't.  The PDFRenderer seems to find the font correctly if I add a block
>> of code using the TTFFontLoader to create an EmbedFontInfo with the xml
>> metrics generated by FOP, passing it into the setFontList, but the font size
>> comes out different than the AWTRenderer.
>>
>> How do I upgrade to the Trunk?  I didn't see a compiled download.  I
>> believe I found a source download for it, but I'm not sure how to compile
>> it.
>>
>>  --
>> *From:* Peter Hancock [mailto:peter.hanc...@gmail.com]
>> *Sent:* Tuesday, March 23, 2010 6:04 AM
>> *To:* fop-users@xmlgraphics.apache.org
>> *Subject:* Re: FOP 0.95 printing
>>
>>   Hi Eric,
>>
>> Do you run FOP standalone from the command line, or do you embed it in
>> your own app?  The reason I ask is because the example
>> embedding.ExampleFO2OldStylePrint.java in examples/embedding/java of the FOP
>> 0.95 source illustrates the minimal utility of  java.awt.print.PrinterJob
>> for printing, and you may be able to adapt it for your own needs.  I am not
>> familiar with PrinterJob but I am guessing it can be configured with your
>> printer destination etc.
>>
>> The FOP docs are a little minimal see:
>> http://xmlgraphics.apache.org/fop/0.95/output.html#print
>> http://xmlgraphics.apach

Re: Difficulties with FOP-trunk, AFP and IBM raster fonts

2010-03-24 Thread Peter Hancock
Hi Olov,

Your base-uri should be "file:///C:/TEST1/" and not "file:/C:/TEST1/".

I hope that fixes things for you!

Pete

If that does not work you might try setting the 
2010/3/24 Olov Häggström 

> Hi,
>
> I am trying to create an afp-file with IBM Raster fonts. To create the
> fonts I
> used http://www-01.ibm.com/support/docview.wss?uid=psd1P4000840 together
> with a
> true type font.
>
> I then use xml and xslt files that only contains text using the
> "MyTestFont"
> font. The fo-file has been tested and works fine when generating PDF with
> the
> TTF-font.
>
> When trying to run FOP i encounter the following error:
>
> 2010-mar-24 09:15:30 org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-height set to: 11in
> 2010-mar-24 09:15:30 org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-width set to: 8.26in
> 2010-mar-24 09:15:30 org.apache.fop.afp.fonts.CharacterSetBuilder build
> ALLVARLIG: Failed to load the character set metrics for code page T1V10500
> 2010-mar-24 09:15:30 org.apache.fop.cli.Main startFOP
> ALLVARLIG: Exception
> java.lang.RuntimeException: Failed to read font control structured fieldin
> character set C0A08060
>at
>
> org.apache.fop.afp.fonts.CharacterSetBuilder.build(CharacterSetBuilder.java:242
>)
>at
>
> org.apache.fop.render.afp.AFPRendererConfigurator.fontFromType(AFPRendererConfi
>gurator.java:205)
>at
>
> org.apache.fop.render.afp.AFPRendererConfigurator.buildFont(AFPRendererConfigur
>ator.java:138)
>at
>
> org.apache.fop.render.afp.AFPRendererConfigurator.buildFontListFromConfiguratio
>n(AFPRendererConfigurator.java:296)
>at
>
> org.apache.fop.render.afp.AFPRendererConfigurator.setupFontInfo(AFPRendererConf
>igurator.java:454)
>at
> org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)
>at
> org.apache.fop.render.intermediate.IFRenderer.setupFontInfo
>(IFRenderer.java:181)
>at org.apache.fop.area.RenderPagesModel.
>(RenderPagesModel.java:73)
>at org.apache.fop.area.AreaTreeHandler.setupModel
>(AreaTreeHandler.java:130)
>at
> org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:102)
>at
> org.apache.fop.render.RendererFactory.createFOEventHandler
>(RendererFactory.java:359)
>at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:105)
>at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)
>at org.apache.fop.apps.Fop.(Fop.java:79)
>at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)
>at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:109)
>at org.apache.fop.cli.Main.startFOP(Main.java:174)
>at org.apache.fop.cli.Main.main(Main.java:205)
>
> Problem is somewhere when reading my config. I set up the config according
> to
> the configuration examples and my afp section looks like below:
>
> 
>
>  
>  240
>  resources.afp
>  
>
>  
>
>   base-uri="file:/C:/TEST1/">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  
>  
>
>
>  
>
> The names of the files in c:\test1 (ugly URI, i know) are corresponding
> with the
> characterset values.
>
> I can't seem to figure out what FOP lacks.
>
> Any help is appreciated.
>
> Regards
>
> Olov
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: FOP 0.95 printing

2010-03-23 Thread Peter Hancock
Hi Eric,

You will have to compile FOP trunk yourself I am afraid.  It is straight
forward but requires you to have ant installed.  From the FOP trunk checkout
dir you can just run 'ant' from the command line and it will build the Fop
jars for you. For more details see
http://xmlgraphics.apache.org/fop/0.95/compiling.html

I am not really sure how FOP auto loads fonts from the font base url, or
which renders support it.

Pete

On Tue, Mar 23, 2010 at 12:20 PM, Eric Douglas wrote:

>  Hi Pete,
>
> I may just need to look at this again, and maybe I missed something the
> first time.  I'll look for that example and see if that helps.  I was trying
> to use java.awt.PrinterJob but it can't doing anything until I transform,
> and the transform method was sending output to the printer, so I couldn't
> quite figure out where to specify which printer to use.
>
> I am embedding the code, not in Java but in a secondary language which is
> able to include any Java code with slightly different syntax.  It is also
> able to call Java code if there's anything which needs to be written in Java
> that it can't emulate.
>
> I did run into some difficulties trying to code the same output to 3
> different formats (screen, PDF, printer) since they require different
> renderers which are in different paths.  I see the SVGRenderer,
> TIFFRenderer, AWTRenderer, PrintRenderer, PNGRenderer, and a
> PNGRenderer_onthefly are subclasses of Java2DRenderer while PSRenderer and
> PDFRenderer are not.
>
> I would like to print using specific fonts from specific TTF files.  I
> don't want to rely on the fonts being installed in the OS on the machine
> running the application.  We did that in the past and ran into a problem
> where someone's OS didn't have the font or someone had a different version
> of the same font and they got different output.  I'm finding it difficult in
> FOP to connect my custom font to the different renderers.  I added the font
> references in the fop.xconf file.  The AWTRenderer seems to find it just
> fine with the FopFactory.setFontBaseURL method while the PDFRenderer
> doesn't.  The PDFRenderer seems to find the font correctly if I add a block
> of code using the TTFFontLoader to create an EmbedFontInfo with the xml
> metrics generated by FOP, passing it into the setFontList, but the font size
> comes out different than the AWTRenderer.
>
> How do I upgrade to the Trunk?  I didn't see a compiled download.  I
> believe I found a source download for it, but I'm not sure how to compile
> it.
>
>  --
> *From:* Peter Hancock [mailto:peter.hanc...@gmail.com]
> *Sent:* Tuesday, March 23, 2010 6:04 AM
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: FOP 0.95 printing
>
> Hi Eric,
>
> Do you run FOP standalone from the command line, or do you embed it in your
> own app?  The reason I ask is because the example
> embedding.ExampleFO2OldStylePrint.java in examples/embedding/java of the FOP
> 0.95 source illustrates the minimal utility of  java.awt.print.PrinterJob
> for printing, and you may be able to adapt it for your own needs.  I am not
> familiar with PrinterJob but I am guessing it can be configured with your
> printer destination etc.
>
> The FOP docs are a little minimal see:
> http://xmlgraphics.apache.org/fop/0.95/output.html#print
> http://xmlgraphics.apache.org/fop/0.95/fonts.html#awt
>
> They do explain that the available fonts are those configured on your OS,
> and that PrintRenderer uses java2D to create the output.
>
> I briefly took a look at the trunk code, and I do notice any functional
> improvements made to the PrintRenderer.  However, upgrading your version of
> FOP from 0.95 to trunk is recommenced if possible.
>
> I hope some of this helps!
>
> Pete
>
> On Mon, Mar 22, 2010 at 7:52 PM, Eric Douglas wrote:
>
>>  How do I set up FOP 0.95 for printing a custom font?
>> I have a truetype font file and it works fine printing to PDF or a preview
>> window, but I can't get it to print directly to the printer.
>>
>> If I use the PrintRenderer I can't figure out a way to tell it which
>> printer to print to.
>> If I use the PSRenderer it finds the right printer but of course it
>> doesn't work (yet?) with truetype fonts.
>> I don't seem to have a valid Type 1 font file and I don't know how I can
>> create one or where I could download one (free).
>>
>
>


Re: FOP 0.95 printing

2010-03-23 Thread Peter Hancock
Hi Eric,

Do you run FOP standalone from the command line, or do you embed it in your
own app?  The reason I ask is because the example
embedding.ExampleFO2OldStylePrint.java in examples/embedding/java of the FOP
0.95 source illustrates the minimal utility of  java.awt.print.PrinterJob
for printing, and you may be able to adapt it for your own needs.  I am not
familiar with PrinterJob but I am guessing it can be configured with your
printer destination etc.

The FOP docs are a little minimal see:
http://xmlgraphics.apache.org/fop/0.95/output.html#print
http://xmlgraphics.apache.org/fop/0.95/fonts.html#awt

They do explain that the available fonts are those configured on your OS,
and that PrintRenderer uses java2D to create the output.

I briefly took a look at the trunk code, and I do notice any functional
improvements made to the PrintRenderer.  However, upgrading your version of
FOP from 0.95 to trunk is recommenced if possible.

I hope some of this helps!

Pete

On Mon, Mar 22, 2010 at 7:52 PM, Eric Douglas wrote:

>  How do I set up FOP 0.95 for printing a custom font?
> I have a truetype font file and it works fine printing to PDF or a preview
> window, but I can't get it to print directly to the printer.
>
> If I use the PrintRenderer I can't figure out a way to tell it which
> printer to print to.
> If I use the PSRenderer it finds the right printer but of course it doesn't
> work (yet?) with truetype fonts.
> I don't seem to have a valid Type 1 font file and I don't know how I can
> create one or where I could download one (free).
>


Re: Garbled PDF text

2010-03-19 Thread Peter Hancock
Hi,
I think this is a tricky one to solve without an example .fo document that
generates this error.
Pete

On Thu, Mar 18, 2010 at 3:06 PM, superglue wrote:

>
> Hi All,
>we are using FOP 0.95 to generate PDF documents. Recently, one of
> our customers reported on garbled PDF text. The PDF document generated is
> 39
> pages and everything looks fine upto end of page 3; the text is garbled
> from
> page 4 onwards. the isuse doesn't happen all the time and is occasional. We
> tried recreating the issue with similar set up and we are unable to
> recreate
> the same. At this time, any guidance on this will be greatly helpful for us
> to troubleshoot/resolution of this issue.
>Interesting fact about the garbled text is that there is one ASCII shift
> in the text displayed.
> For example, the garbled text Dpnqmfrfe” is “Completed”. P is rendered as Q
> and A is rendered as B and so on. We are treating this as garbled text and
> troubleshooting rather than investigating on the character shift.
>   The PDF properties by going to File -> properties on a PDF image has the
> PDF producer and the fonts null. In a good case, the PDF producer proprty
> on
> description tag is Apache FOP .95 and 2 fonts are listed on the fonts tab.
> Please see the attached documents.
>
> http://old.nabble.com/file/p27946921/Garbled-PDFText.docx
> Garbled-PDFText.docx
>
> http://old.nabble.com/file/p27946921/Garbled-PDFText-properties.docx
> Garbled-PDFText-properties.docx
>
> http://old.nabble.com/file/p27946921/Good-PDFText-properties.docx
> Good-PDFText-properties.docx
> --
> View this message in context:
> http://old.nabble.com/Garbled-PDF-text-tp27946921p27946921.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Compiling translets & packaging in project ear by MAVEN build

2010-02-03 Thread Peter Hancock
Hi Tamugrg,

FOP is only a client of JAXP and so I am not so sure that the fop mailing
list is the right place to get help on this issue. You are more likely to
find answers looking on JAXP related mailing lists.

Pete

On Tue, Feb 2, 2010 at 10:45 PM, tamugrg wrote:

>
> Hi,
>
> Has anyone compiled the translets & packaged in ear file using MAVEN build?
> This is to remove having to compile the translets everytime xsl is changed.
> Any examples of pom.xml using the 'org.apache.xalan.xsltc.cmdline.Compile'
>
> Cheers,
> tamu
> --
> View this message in context:
> http://old.nabble.com/Compiling-translets---packaging-in-project-ear-by-MAVEN-build-tp27428720p27428720.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Using Apache FOP translets in java EE application

2010-01-29 Thread Peter Hancock
Hi Tamurg,

The quickest way to prove you are using the compiled transformation would be
to remove the stylesheets from the classpath of the application at runtime.
You would get a error if the application is trying to locate the
stylesheets.  Alternatively introduce a measurable difference between the
compiled and raw stylesheet.
How are you embedding fop in your application?  Are you following the
documentation at
http://xmlgraphics.apache.org/fop/trunk/embedding.html#render-with-xslt ?
This may help too -
http://xmlgraphics.apache.org/fop/trunk/running.html#check-input

Pete



On Thu, Jan 28, 2010 at 10:27 PM, tamugrg wrote:

>
> Hi,
> I am trying to use Apache FOP translets which would hopefully improve my
> performance than creating new transfomer (even for the first time). I could
> not find an example of using Apache FOP translets. I am not sure whether my
> code uses translets or not. Would anyone know whether I am doing it the
> correct way in terms of compiling & using the translets &  also whether
> there is anyway that I can verify that even for the first time the xsl's
> are
> being used in the application (after server startup), it is using the
> compiled translets (from the jar file that i have put in my maven
> repository
> p1.p2.myTranslet.jar) AND not compiling the xsl's into templates again.
> Below lists what I have done.
>
> Translet Compiling
> 
> => SET CLASSPATH=xalan-2.7.1.jar;xml-apis-1.3.04.jar;xercesIm
> pl-2.9.1.jar;serializer-2.7.1.jar
> => ava org.apache.xalan.xsltc.cmdline.Compile -p p1.p2 -x -j myTranslet.jar
> stylesheet1.xsl stylesheet2.jar
>
> Using the translets
> 
>
> // Static part of the class has a section that creates the templates from
> all our xsl's & puts it in HashMap 'templatesStore'
>
>for (String label_xsl : LABEL_XSL_RESOURCES)
>{
>Source source = classpathSource(label_xsl);
>templatesStore.put(label_xsl,
> trasformerFactory.newTemplates(source));
>}
>
>
> Using Translets
> ==
>trasformerFactory = TransformerFactory.newInstance();
>trasformerFactory.setURIResolver(new
> ClassUriResolver(LABEL_XSL_RESOURCE_PATH));
>
>
>// For using the translets
>// Set the TransformerFactory system property.
>// Note: For more flexibility, load properties from a properties
> file.
>trasformerFactory.setAttribute("debug", Boolean.TRUE);
> //trasformerFactory.setAttribute("use-classpath", Boolean.TRUE);
>trasformerFactory.setAttribute("package-name", "p1.p2");
>trasformerFactory.setAttribute("jar-name", "myTranslet");
>trasformerFactory.setAttribute("translet-name", "myTranslet");
>
>String key = "javax.xml.transform.TransformerFactory";
>String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl";
>Properties props = System.getProperties();
>props.put(key, value);
>System.setProperties(props);
>
>
> // Using the translets
>Templates templates = (Templates) templatesStore.get(xsltResourceName);
>if (templates != null) {
>return templates.newTransformer();
>}
>else
>{
>throw new TransformerException("Could not create a new
> Transformer for " + xsltResourceName + "; Template not found.");
>}
> --
> View this message in context:
> http://old.nabble.com/Using-Apache-FOP-translets-in-java-EE-application-tp27364146p27364146.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Batik not in class path

2010-01-27 Thread Peter Hancock
Hi David,

What is the ant target you are calling when you get this error?

Whilst investigating this issue, I was first going to  first try and confirm
that the classpath stated is indeed passed to the JVM running fop.

Does the DITA project have any documentation on fop integration?

Peter

On Tue, Jan 26, 2010 at 6:18 PM, DavidJKelly  wrote:

>
> I hope I'm not posting in the wrong place.  I am using the DITA Open
> Toolkit
> 1.4.2.1 with FOP 0.95 added to it.  The classpath (echoed just before
> executing FOP from Ant) looks like this:
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\lib;
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\lib\dost.jar;
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\lib\resolver.jar;
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\lib\icu4j.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\saxon\saxon.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\build\fop.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\avalon-framework-4.2.0.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\batik-all-1.7.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\xml-apis-1.3.04.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\xercesImpl-2.7.1.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\xmlgraphics-commons-1.3.1.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\commons-io-1.3.1.jar;
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\lib\commons-logging-1.0.4.jar;
> .;
> c:\saxon\saxon9.jar;
> C:\xalan\serializer.jar;
> C:\Program Files\Java\jre6\lib\ext\QTJava.zip;
>
> I have double-checked that the Batik and Avalon-Framework jar files are
> where they should be.
>
> I have tested to make sure the fop.jar in
>
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\techpubs-tools\fop-0.95\build
> is the one that is executing, rather than the older version packaged with
> the DITA OT, and this is the case.  The source code references an SVG file.
> When FOP executes, the following message appears:
>
>  [fop] Jan 26, 2010 1:10:10 PM org.apache.fop.apps.FopFactoryConfigurator
> configure
>  [fop] INFO: Default page-height set to: 11in
>  [fop] Jan 26, 2010 1:10:10 PM org.apache.fop.apps.FopFactoryConfigurator
> configure
>  [fop] INFO: Default page-width set to: 8.25in
>  [fop]
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\win\pdf_out\win\win.fo->
> C:\Users\David\Documents\qualcomm\ditaot_qualcomm\win\pdf_out\win\win.pdf
>  [fop] Jan 26, 2010 1:10:12 PM
> org.apache.fop.image.loader.batik.PreloaderSVG$Loader getImage
>  [fop] WARNING: Batik not in class path
>  [fop] java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
>  [fop] at java.lang.ClassLoader.defineClass1(Native Method)
>  [fop] at java.lang.ClassLoader.defineClass(Unknown Source)
>  [fop] at java.security.SecureClassLoader.defineClass(Unknown
> Source)
>  [fop] at java.net.URLClassLoader.defineClass(Unknown Source)
>  [fop] at java.net.URLClassLoader.access$000(Unknown Source)
>  [fop] at java.net.URLClassLoader$1.run(Unknown Source)
>  [fop] at java.security.AccessController.doPrivileged(Native
> Method)
>  [fop] at java.net.URLClassLoader.findClass(Unknown Source)
>  [fop] at java.lang.ClassLoader.loadClass(Unknown Source)
>  [fop] at java.lang.ClassLoader.loadClass(Unknown Source)
>  [fop] at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>  [fop] at
> org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(Unknown
> Source)
>  [fop] at
> org.apache.batik.dom.util.SAXDocumentFactory.startElement(Unknown Source)
>  [fop] at
> com.icl.saxon.aelfred.SAXDriver.startElement(SAXDriver.java:757)
>  [fop] at
> com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1036)
>  [fop] at
> com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510)
>  [fop] at
> com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163)
>  [fop] at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320)
>  [fop] at
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
>  [fop] at
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
>  [fop] at
> org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
> Source)
>  [fop] at
> org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown
> Source)
>  [fop] at
>
> org.apache.fop.image.loader.batik.PreloaderSVG$Loader.getImage(PreloaderSVG.java:122)
>  [fop] at
>
> org.apache.fop.image.loader.batik.PreloaderSVG$Loader.access$100(PreloaderSVG.java:105)
>  [fop] at
>
> org.apache.fop.imag

Re: Create damaged PDF file

2010-01-22 Thread Peter Hancock
Hi Zemin,

Are you able to extract a  snippet of the fo that is supposedly missing this
child element?  If you can show that the fo is indeed well formed it would
support the argument that the problem is in FOP.

Thanks,

Pete

On Fri, Jan 22, 2010 at 5:05 PM, Hu, Zemin  wrote:

> I am new here and have a question.
>
> I am creating PDF on the fly for a web application. A PDF file is supposed
> to open when user clicks on a link. Occasionally the created PDF file cannot
> be opened and the error message says: "File is damaged and could not be
> repaired".
>
> When I read log file, I can find error message:
> SystemErr R (Location of error
> unknown)org.apache.fop.fo.ValidationException: Error(Unknown location):
> fo:table-row is missing child elements. Required Content Model:
> (table-cell+)
>
> The weird thing is that this error only happens at first time or first few
> times, then the PDF file generation goes fine. Then if user browses other
> pages and comes back, this can happen again. This error is not consistent,
> sometimes everything is just fine. This is really frustrating and hard to
> debug.
>
> This never happened in my unit test and local environment. So I am thinking
> it might be the cache issue or web server configuration issue. But I have no
> clue. This is tough one.
>
> Any suggestions or solutions?
>
> Thanks.
>
> Zemin
>
> --
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, notify the sender immediately by
> return email and delete the message and any attachments from your system.
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Invalid ICC Profile

2010-01-22 Thread Peter Hancock
Hi Stuart,

It might be that you have an Invalid ICC profile :-) but it would be hard
for us to confirm this without taking a look at the input you supplied to
fop 0.93.
If you do not want to post the input , please provide another example that
also leads to this error.

Is there any reason why you cannot update to a newer version of fop?

Cheers,

Pete



On Fri, Jan 22, 2010 at 4:11 PM, Stuart Scott <
stuart.sc...@countrywideplc.co.uk> wrote:

>  I am getting the following error:
>
> SEVERE: Invalid ICC profile: java.lang.IllegalArgumentException: Invalid
> ICC Profile Data
> java.lang.IllegalArgumentException: Invalid ICC Profile Data
>
> I am using FOP 0.93
>
> I have looked up this error and it states a problem with JPEG images that
> have ICC Profile Data.
>
> Can someone tell me if this has been fixed in a later FOP version?
>
>
> Kind regards
>
> **
>
> *Stuart Scott *
>
>
> For email disclaimer details please click or visit -
> http://www.countrywideplc.co.uk/disclaimer
>
>
>


Re: Absolute position of original text in final PDF

2010-01-12 Thread Peter Hancock
Hi Igor,

> Is there more information on what Traits are?
>
A defintion can be infered here
http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-common
And a brief relation to fop here
http://xmlgraphics.apache.org/fop/dev/design/areas.html#traits

Am I right in thinking that when defined,   block.getTraits().get(org.
> apache.fop.area.Trait.PROD_ID)
> will yield the original id that was defined in the ?
>

If you change you output to at (render using he fop command and use '-at
out.at') you get the an xml serializtrio nof the area tree.

e.g
...
Block 1
...

may look something like
...

-

-

Block
 
1



...

This might help you debug you app.

Pete

On Tue, Jan 12, 2010 at 8:45 AM, Igor Rosenberg <
igor.rosenb...@atosresearch.eu> wrote:

> Hello,
> Within the rendering classes, I understand that each Object within the
> AreaTree gets rendered individually. I hope that assumption's correct...
> Especially
>  org.apache.fop.render.pdf.PDFRenderer.renderBlock
> (org.apache.fop.area.Block block)
>
> Within this method, I have discovered that the Block object retains the
> original id information:
>Map t = block.getTraits();
>if (t!=null)
>for (Object key : t.keySet()) {
>Object tt = t.get(key);
>System.out.println("  TRAIT " + key + " ==> " +
> tt);
>}
>
> The output of that provides
> TRAITS
>  TRAIT 8 ==> #N10011
>  TRAIT 30 ==> 8000
>
> Is there more information on what Traits are? The javadoc states:
>public class org.apache.fop.area.Trait
>Area traits used for rendering. This class represents an
> area
>trait that specifies a value for rendering.
>
> Am I right in thinking that when defined,
> block.getTraits().get(org.apache.fop.area.Trait.PROD_ID)
> will yield the original id that was defined in the ?
>
> And secondly, do I already have the positioning information of the Block in
> the final PDF, at the end of the renderBlock method? I would think that I
> have:
>Final width = ipd
>Final height = bpd
> But how do I get the x and y positioning?
>
> Thanks for the help...
>
> Igor
>
> ---
> From: Igor Rosenberg
> Sent: lunes, 11 de enero de 2010 18:44
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Absolute position of original text in final PDF
>
> Hi,
> The ids get generated on the fly during the XML to FO transformation, for
> the original  tags, and get output in the FO format as 
> . This is expressed as
>  in the XSL document. See generate-id() in
> http://www.w3schools.com/XSL/func_generateid.asp . So basically, I'm just
> doing the XSLT transformation (my own format to FO), and adding as bonus the
> id generation. Find the XSLT and FO details below
> Cheers
> Igor
>
> --
>
> The relevant parts of the XSL look like
>
> 
>  space-before.optimum="4pt">
> 
> 
> 
>
>   
> 
>  font-size="8pt" font-weight="normal" font-family="sans-serif"
> line-height="9pt" space-after.optimum="8pt" text-align="left">
> 
> 
> 
>
> --
> A section of the output fo, as produced by apache fo, looks like this
> (indented by me) - see how the ids appear in the fo:block tags
>
> 
>   line-height="9pt" font-family="sans-serif" font-weight="normal"
> font-size="8pt" id="#N10011">
>  Adress 1 line
>  
>   line-height="9pt" font-family="sans-serif" font-weight="normal"
> font-size="8pt" id="#N10017">
>  Address 2 line
>  
>   line-height="13pt" font-family="sans-serif" font-weight="normal"
> font-size="12pt" id="#N1001F">
>  Another text line in different font
>  
> 
>
>
> From: Peter Hancock [mailto:peter.hanc...@gmail.com]
> Sent: lunes, 11 de enero de 2010 18:30
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Absolute position of original text in final PDF
>
> Hi Igor,
>
> It is not clear to me how these  elements are defined - in your xml
> input?  If so how do you transform them to fo whilst retaining the id
> attribute?  Could you provide a small example of the 

Re: Absolute position of original text in final PDF

2010-01-11 Thread Peter Hancock
Hi Igor,

It is not clear to me how these  elements are defined - in your xml
input?  If so how do you transform them to fo whilst retaining the id
attribute?  Could you provide a small example of the xml and the
corresponding xsl that you wish to be input of fop.

Thanks,

Pete

On Mon, Jan 11, 2010 at 4:39 PM, Igor Rosenberg <
igor.rosenb...@atosresearch.eu> wrote:

>  Dear FOP mailinglist readers,
>
>
>
> I’ve been fighting with the Apache FOP source for a week, but I can’t solve
> my problem alone…
>
>
>
> One of the features of the application I’m writing produces a PDF, based on
> an XML that follows a simple schema (header info, tables, images and text,
> but nothing fancy). Generating the FO then the PDF are the easy steps. Fop
> does the job marvelously. Now I need to output to the user the coordinates
> of bounding boxes. Those  bounding boxes must represent the placement in the
> PDF of the original text within the XML. To provide an example:
>
>
>
> If I had in my original XML ,
>
> This text appears somewhere in the PDF
>
> I would want, during the XML to PDF process, to output something like
>
> Bounding_box {id=”xxx”, x=34, y=45, w=444,h=25}
>
> I understand this as “the original text of tag xxx is contained in the pdf
> in the rectangle starting at point (34,45), of width 444, and height 25”
>
> (if the text is split into several pages or areas, receiving a list of
> rectangles would be fine)
>
>
>
> To summarize: how can I know the position in the final PDF of the original
> text?
>
>
>
> I’ve tried decorating different classes of FOP, looking at the
> FOTreeBuilder, the AreaTreeParser, but failed to maintain the identifier of
> the original text tags.
>
> I’d prefer staying with release 0.95, but can also use the trunk if
> required.
>
>
>
> While browsing, I thought that the  accessibility features might help, but
> couldn’t figure out how
>
>
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml?view=markup
>
> I thought relying on the Area Tree, but couldn’t retrieve the original id
> that were set to the original XML tags.
>
>
> http://wiki.apache.org/xmlgraphics-fop/AreaTreeXMLDocumentation
>
> http://old.nabble.com/Area-Tree-Handling-to24431098.html
>
>
>
> Thanks for any  help
>
>
>
> Igor
>
> --
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> --
>


Re: Use of AWTRenderer/Java2dRenderer

2010-01-07 Thread Peter Hancock
Hi Chris,

I think it should be able to fetch the images of the pdf pages out of
> the renderer and display in my own frame and image component?
>

This is what PreviewPanel does with help from ImageProxyPanel.   If you want
to resize the embedded PreviewPanel you call setScaleFactor method on it.
You can  listen for resizing events of your parent window, and resize the
Panel accordingly.

I hope this helps,

Peter

On Thu, Jan 7, 2010 at 8:43 AM, Chris Joelly wrote:

> Hi Peter,
>
> thanks for your response. As i am curious i already looked at the source
> to investigate what possibilities i have :)
>
> Yes. This seems to be the only possibility to get rid of those two
> buttons :) Should be no problem.
>
> Whats more interesting is the sizing of the preview image and the
> possibility to align the image size to the preview dialogs frame. I
> looked through the source but did not find an easy solution for that
> issue by now...
>
> I think it should be able to fetch the images of the pdf pages out of
> the renderer and display in my own frame and image component?
>
> Is this the way of working when one needs to embed the preview images
> into an application?
>
> Thanks,
>
> Chris
>
>
> On Mit, Jän 06, 2010, Peter Hancock wrote:
> > Hi Chris,
> >
> > Did you compile fop yourself?  You will need a local checkout of the
> code-base
> > to address this issue:
> >  The AWTViewer instance creates a PreviewDialog instance (by calling the
> > factory method PreviewDialog.createPreviewDialog)  which is a JFrame
> composed
> > of the toolbar and the page preview.  The inclusion of the debug and info
> > buttons along with the frame size is declared in PreviewDialog's
> constructor.
> >   You may want to create a more configurable PreviewDialog (subclassing
> > PreviewDialog and perhaps just overriding the constructor?) and then
> change
> > AWTViewer to use that instead.  Recompile and create your new fop.jar by
> > running ant  from the root of your local fop code-base.
> >
> > I hope that helps you,
> >
> > Peter
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Use of AWTRenderer/Java2dRenderer

2010-01-06 Thread Peter Hancock
Hi Chris,

Did you compile fop yourself?  You will need a local checkout of the
code-base to address this issue:
 The AWTViewer instance creates a PreviewDialog instance (by calling the
factory method PreviewDialog.createPreviewDialog)  which is a JFrame
composed of the toolbar and the page preview.  The inclusion of the debug
and info buttons along with the frame size is declared in PreviewDialog's
constructor.
  You may want to create a more configurable PreviewDialog (subclassing
PreviewDialog and perhaps just overriding the constructor?) and then change
AWTViewer to use that instead.  Recompile and create your new fop.jar by
running ant  from the root of your local fop code-base.

I hope that helps you,

Peter



PreviewDialog, whilst the size of the
On Wed, Jan 6, 2010 at 11:34 AM, Chris Joelly wrote:

> Hi all,
>
> i managed to use the AWTRenderer within my own Swing application and
> want to adapt the size of the AWT viewer window whithin the PDF preview
> image is displayed.
>
> Is it possible to set the window size and then adjust the image of the
> PDF to the window size?
>
> And is it possible to hide the debug and fop inf button which are
> displayed in the toolbar?
>
> Thanks,
>
> Chris
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Reading into xsl:value-of directly from attributes file

2009-11-23 Thread Peter Hancock
Hi Sangam,

Am I correct in thinking that you are after a way of specifying variables
externally?  Or are you refering to an attribute called 'file'?  Refering to
variables declared in external (from the main xsl) is straight forward as
the following example should show:

.xml


.xsl





props.xsl


Aplying the stylesheet would yield


red

If I am way off track here can you please try re-wording the problem and
perhaps provide a concrete example of what you want.

You may also like to try asking for help in an xslt-centric forum e.g
http://www.mulberrytech.com/xsl/xsl-list/index.html

Pete


On Mon, Nov 23, 2009 at 7:17 AM, Sangam Uprety wrote:

> Hi all. I would like to read into a xsl:variable or xsl:value-of element
> directly from attribute file. For example, xsl:value-of
> select="value-from-attribute-file" Here, I don't want something like
> select="/myRoot/mynode", rather I would like to read this value from the
> attribute file, much like in fo:block
> xsl:use-attribute-sets="myAttrSetName". Although we can do this like in
> xsl:value-of select="/myRoot/mynode", it is sometimes very useful to have
> such values from attribute file, which means we would have added
> flexibility. Any ideas please? Thanks in advance!
> --
> View this message in context: Reading into xsl:value-of directly from
> attributes 
> file
> Sent from the FOP - Users mailing list 
> archiveat Nabble.com.
>


Re: xml:base

2009-11-17 Thread Peter Hancock
Hi Jack,

This is really an xslt problem (javax.xml.transform.
TransformerException) and as such you may find a satisfactory solution by
posting to a related mailing list.

A possible solution maybe to download the content locally and  resolve the
relative urls of the imgs manually.

Peter




On Mon, Nov 16, 2009 at 7:42 PM, Jack Bates  wrote:

> A stylesheet I'm writing includes this template,
>
>  
>
>  
>
> - but when I process it with FOP I get errors like,
>
>  $ fop -xml index.html -xsl index.xsl index.pdf
>  [...]
>  16-Nov-2009 11:06:32 AM org.apache.fop.events.LoggingEventListener
> processEvent
>  SEVERE: Image not found. URI:
> /docs/images/thumb/b/bb/UM-2.1.png/500px-UM-2.1.png. (No context info
> available)
>  [...]
>
> - and the generated PDF is missing some images
>
> I built FOP revision 828778 from source
>
> I think this is because the stylesheet uses the document() function to
> get HTML pages from the web,
>
>  
>
>  
>
>  
>
> - and these pages, e.g. http://ica-atom.org/docs/index.php?title=UM-2.1
>
> - use some relative images,
> e.g. /docs/images/thumb/b/bb/UM-2.1.png/500px-UM-2.1.png
>
> While the original  element is part of the HTML document, and so
> relative to http://ica-atom.org/docs/index.php?title=UM-2.1, the
>  element isn't?
>
> So I tried adding an xml:base="" attribute,
>
>  
>
>  
>
>  
>
> Here's a simplified, complete example,
>
> http://www.sfu.ca/~jdbates/tmp/fop/200911160/index.html
>
> http://www.sfu.ca/~jdbates/tmp/fop/200911160/index.xsl
>
> But when I process this example with FOP I get this error,
>
>  $ fop -xml index.html -xsl index.xsl index.pdf
>  16-Nov-2009 11:29:57 AM org.apache.fop.cli.Main startFOP
>  SEVERE: Exception
>  javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException: Invalid property encountered on
> "fo:block": xml:base (No context info available)
> at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:314)
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:146)
> at org.apache.fop.cli.Main.startFOP(Main.java:174)
> at org.apache.fop.cli.Main.main(Main.java:205)
>  [...]
>
> Here's the complete stderr,
> http://www.sfu.ca/~jdbates/tmp/fop/200911160/stderr
>
> How can I convert these HTML pages to a PDF with XSL-FO, without
> changing the HTML pages?
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: How to install hyphenation patterns in FOP?

2009-11-09 Thread Peter Hancock
Hi,
You should just need  fop-hyph.jar  which you can get from
http://offo.sourceforge.net/hyphenation/fop-stable/installation.html

The installation just involves putting this in the lib directory and the fop
command will place it in the classpath.  Also, make sure that the
build.properties (or build-local.properties) does not declare the
user.hyph.dir property - you may have uncommented this declaration whilst
trying to get things working.

HTH,
Peter

On Mon, Nov 9, 2009 at 4:01 PM, Jerzy Jalocha N  wrote:

> Hi, everyone!
> Since a few days, I am trying to install the OFFO hyphenation patterns
> in my FOP install, but I've failed miserably, so far. I guess, I am
> missing just a tiny little detail, because It seems like I've really
> tried everything. (Please see details below.)
>
> So my question is: In order to use hyphenation with the FOP processor,
> what files do I have to install, and how do I tell FOP where they are
> installed?
>
> Any help is really appreciated.
> Thanks!
> - Jerzy
>
>
> DETAILS:
> ==
>
> My system:
>  * Operating system: Xubuntu 9.06 Jaunty Jackalope.
>  * Out-of-the-box kernel: linux-image-2.6.28-16-generic (ix86)
>  * FOP from the Xubuntu repository: 1:0.95.dfsg-2ubuntu1
>  * Both Sun Java and GCJ seem to be installed, so I am not sure which
> one is running. Here is the output of 'java -version':
> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
>
> In the following sample usage scenario:
> /home/work/source.fo
> /home/work/hyphenation/fop-hyph.jar
>
>  * The 'source.fo' file contains hyphenate="true" and language="en"
> and language="es" attributes where necessary.
>  * The fop-hyph.jar file was downloaded from the
> 'offo-hyphenation-fop-stable_v1.2.zip' archive from Sourceforge.
>
> The following instructions do not work. They produce "Couldn't find
> hyphenation pattern en" and "es" messages.
>
> $ export FOP_HYPHENATION_PATH=/home/work/hyphenation/fop-hyph.jar
> $ fop source.fo result.pdf
>
> $ export CLASSPATH=$CLASSPATH:/home/work/hyphenation/fop-hyph.jar
> $ fop source.fo result.pdf
>
> I also tried other paths, such as 'hyphenation',
> 'hyphenation/fop-hyph.jar', './hyphenation/fop-hyph.jar', etc.
>
> I also tried putting the FOP_HYPHENATION_PATH variable in a
> /home/work/.foprc file without success.
>
> The documentation also tells me to install the 'fop-hyph.jar' in a
> "lib directory of the your FOP installation" or in a "build directory
> of the your FOP installation". But I can't find such directories. (I
> don't know enough about Java to understand what/where they are.)
>
> Since the documentation also mentions a 'hyphenation-base'
> configuration parameter, I tried putting absolute and relative paths
> to 'fop-hyph.jar' and 'hyphenation' in a
> '/home/work/hyphenation/fop.xconf' file. But I only got huge error
> messages.
>
> I also downloaded the 'offo-hyphenation_v1.2.zip' archive from
> Sourceforge, and tried to point the 'hyphenation-base' parameter to
> the 'en.xml' and 'es.xml' files, but FOP complained about missing
> '*.hyp' files (whatever these might be).
>
>
> I have honestly tried to read and understand the available documentation:
>  * http://xmlgraphics.apache.org/fop/0.95/hyphenation.html
>  * http://xmlgraphics.apache.org/fop/faq.html#hyphenation-fails
>  * http://xmlgraphics.apache.org/fop/0.95/configuration.html
>  * http://offo.sourceforge.net/hyphenation/installation.html
> I've also read through all relevant mailing list archives, without success.
>
>
> I've also asked for help through the official Ubuntu channels without
> success:
> https://answers.launchpad.net/ubuntu/+source/fop/+question/88559
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>