RE: Absolute position of original text in final PDF

2010-01-12 Thread Igor Rosenberg
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 
    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 

    
    
    
    
    

  
    
    
    
    
    
  
--
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  

    
      
  Adress 1 line
      
      
  Address 2 line 
      
      
  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 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 
 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/

AW: Absolute position of original text in final PDF

2010-01-12 Thread Georg Datterl
Hi Igor, 

since you already work with the area tree, try this: Don't autogenerate the id 
but give each text in your XML a unique id. Set this id as the block id. Now in 
the area tree you can find the block which contains your text (prod-id is your 
id). This block has a width (ipd) and a height (bpd) as well as your id 
(prod-id). Now for the positioning, I have not yet done that and a fast try did 
not give me a clear picture, but worst case you can fake the horizontal 
starting point by knowing the left margin and calculating the vertical starting 
point by adding the bpd of previous blocks in the area tree. But I guess, those 
who know the area tree better, may have a better solution for that.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu] 
Gesendet: Montag, 11. Januar 2010 18:44
An: fop-users@xmlgraphics.apache.org
Betreff: 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 

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 

 











 

  











  

--

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  

 



 
   

Adress 1 line



 
   

Address 2 line 






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 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 
 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 

 

-

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 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 bo

Re: hypenation of numbers in fop

2010-01-12 Thread lexa2009

thx i make 200b between all letters and numbers and all ok
-- 
View this message in context: 
http://old.nabble.com/hypenation-of-numbers-in-fop-tp27109660p27125476.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: problem with fo:inline and fo:external-graphic, overflows

2010-01-12 Thread lexa2009

or another example

 
http://www.w3.org/1999/XSL/Format"; 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:m="http://www.w3.org/1998/Math/MathML";> 
 
http://www.w3.org/1998/Math/MathML";
xmlns:fo="http://www.w3.org/1999/XSL/Format";> 
 
 
 
 
 
 
 

​
​
​
​
​
​ 



 
 
 
 



http://old.nabble.com/file/p27125610/name.pdf name.pdf 
http://old.nabble.com/file/p27125610/0001.tif 0001.tif 

what to do? help pls?
i MUST use fo:inline, not fo:block
-- 
View this message in context: 
http://old.nabble.com/problem-with-fo%3Ainline-and-fo%3Aexternal-graphic%2C-overflows-tp26941207p27125610.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/Embedding fonts with FOP

2010-01-12 Thread Chris Bowditch

Ari Army wrote:

Hi


Here is my whole font file:

I mean the font's section of my userConfig.xml file

Also wanted to add, that all options, even the automatic ones not
specifying an embed url (options 1 and 2) embedded the font so worked
on others computers.


Yes fonts are always embedded by default in latest FOP versions. If you 
are using FOP trunk then you can take advantage of new configuration 
section  to allow Fonts to be referenced instead, see 
here for more information: 
http://xmlgraphics.apache.org/fop/trunk/fonts.html#embedding


Thanks,

Chris



Thanks all!,
Ari

-
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: Absolute position of original text in final PDF

2010-01-12 Thread Igor Rosenberg
Hello,
Does anyone know how to go down the Area Tree, looking for specific elements 
(in my case Blocks), and managing to infer the element's x and y coordinates?  
The Area Tree is truly complicated - it's hierarchical, is there any way of 
going down all the nodes, without having to know precisely what the Node's 
class is? 
Regards
Igor


-Original Message-
From: Georg Datterl [mailto:georg.datt...@geneon.de] 
Sent: martes, 12 de enero de 2010 10:40
To: fop-users@xmlgraphics.apache.org
Subject: AW: Absolute position of original text in final PDF

Hi Igor, 

since you already work with the area tree, try this: Don't autogenerate the id 
but give each text in your XML a unique id. Set this id as the block id. Now in 
the area tree you can find the block which contains your text (prod-id is your 
id). This block has a width (ipd) and a height (bpd) as well as your id 
(prod-id). Now for the positioning, I have not yet done that and a fast try did 
not give me a clear picture, but worst case you can fake the horizontal 
starting point by knowing the left margin and calculating the vertical starting 
point by adding the bpd of previous blocks in the area tree. But I guess, those 
who know the area tree better, may have a better solution for that.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu] 
Gesendet: Montag, 11. Januar 2010 18:44
An: fop-users@xmlgraphics.apache.org
Betreff: 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 

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 

 











 

  











  

--

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  

 



 
   

Adress 1 line



 
   

Address 2 line 






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 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 
 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 th

RE: Absolute position of original text in final PDF

2010-01-12 Thread Igor Rosenberg
Hello,

Thanks Peter for the pointers… 

I’ve kept up the hread through Georg’s answer

Cheers

Igor

 

From: Peter Hancock [mailto:peter.hanc...@gmail.com] 
Sent: martes, 12 de enero de 2010 11:00
To: fop-users@xmlgraphics.apache.org
Subject: Re: Absolute position of original text in final PDF

 

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 
 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
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







  





 
--
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 

   
  
  
 Adress 1 line

  
  
 Address 2 line


 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 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 
 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 

FOP generate Barcode 128 subset C ?

2010-01-12 Thread Magdikova

How can I set the fop to generate barcode 128 subset C

subset a:

038914200731150100030803102113

subset c:

03 80 00 00 00 09 00 00 14 20 07 30 00 01 15 01 00 03 08 00 00 03 10 21 13

It is possible?

-- 
View this message in context: 
http://old.nabble.com/FOP-generate-Barcode-128-subset-C---tp27126975p27126975.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



AW: Absolute position of original text in final PDF

2010-01-12 Thread Georg Datterl
Hi Igor, 

I get the area tree as a DOM Node and get the nodes I'm interest in by XPath 
expressions.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu] 
Gesendet: Dienstag, 12. Januar 2010 13:18
An: fop-users@xmlgraphics.apache.org
Betreff: RE: Absolute position of original text in final PDF

Hello,
Does anyone know how to go down the Area Tree, looking for specific elements 
(in my case Blocks), and managing to infer the element's x and y coordinates?  
The Area Tree is truly complicated - it's hierarchical, is there any way of 
going down all the nodes, without having to know precisely what the Node's 
class is? 
Regards
Igor


-Original Message-
From: Georg Datterl [mailto:georg.datt...@geneon.de]
Sent: martes, 12 de enero de 2010 10:40
To: fop-users@xmlgraphics.apache.org
Subject: AW: Absolute position of original text in final PDF

Hi Igor, 

since you already work with the area tree, try this: Don't autogenerate the id 
but give each text in your XML a unique id. Set this id as the block id. Now in 
the area tree you can find the block which contains your text (prod-id is your 
id). This block has a width (ipd) and a height (bpd) as well as your id 
(prod-id). Now for the positioning, I have not yet done that and a fast try did 
not give me a clear picture, but worst case you can fake the horizontal 
starting point by knowing the left margin and calculating the vertical starting 
point by adding the bpd of previous blocks in the area tree. But I guess, those 
who know the area tree better, may have a better solution for that.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu]
Gesendet: Montag, 11. Januar 2010 18:44
An: fop-users@xmlgraphics.apache.org
Betreff: 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 

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 

 











 

  











  

--

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  

 



 
   

Adress 1 line



 
   

Address 2 line 






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 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 
 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 exam

Re: AFP Form Defs example

2010-01-12 Thread Venkat Reddy

Hi Jeremias,

Thanks for your input source. The Form Defs sample working for me and I 
will be able to go through the source code with
the current sample. I have used the following sample to understand Form 
Defs/Maps AFP extension...


Sample:


http://www.w3.org/1999/XSL/Format"; 
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp";>

   
   page-height="297mm" page-width="210mm">

   
   
   
   
   
 
   
   
   
   This is a test
   
   


I have downloaded the sample resource form map from the IBM AFP Workbench.

Thanks,
Venkat.

Jeremias Maerki wrote:

We don't currently have any code in FOP to create form maps. Usually,
someone creates a form map using some third-party AFP tool. I don't have
any myself and I've never generated one myself. I've just received some
test files from a colleague to test with. You can use the f1samp.fde
that is installed with the IBM AFP Workbench for testing.

HTH

On 08.01.2010 12:50:19 Venkat Reddy wrote:
  

Hi,

I want to run a sample XSL:FO file with the AFP extension Form Def/Map 
in it. I have got the sample from as below


http://www.w3.org/1999/XSL/Format"; 
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp";>

[..]




In the above sample, the source file 'f1samp1.fde' to be presented when 
running this example. I don't know how to generate a sample of this kind...


Can some please attach a sample? if you have... otherwise give me an 
idea how to generate this file...


Thanks,
Venkat.






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: Absolute position of original text in final PDF

2010-01-12 Thread Igor Rosenberg
Hello,
My original problem was: 
how can I know the position in the final PDF of the original text?

I've just discovered the following method: 
  org.apache.fop.render.pdf.PDFRenderer.saveBlockPosIfTargetable(Block)

The javadoc says: 
* id + absolute position will  be saved. The saved position is 
* only correct if this function is called at the very start of 
renderBlock!

This method is called always when a Block gets rendered. I guess that if I 
modify this method, I can retrieve for every Block its absolute positions. I'll 
try to fiddle with that. As I can infer from the Blocks the text that is 
included, I recon I'll have the solution to making my bounding boxes 

Cheers
Igor

-Original Message-
From: Georg Datterl [mailto:georg.datt...@geneon.de] 
Sent: martes, 12 de enero de 2010 13:40
To: fop-users@xmlgraphics.apache.org
Subject: AW: Absolute position of original text in final PDF

Hi Igor, 

I get the area tree as a DOM Node and get the nodes I'm interest in by XPath 
expressions.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu] 
Gesendet: Dienstag, 12. Januar 2010 13:18
An: fop-users@xmlgraphics.apache.org
Betreff: RE: Absolute position of original text in final PDF

Hello,
Does anyone know how to go down the Area Tree, looking for specific elements 
(in my case Blocks), and managing to infer the element's x and y coordinates?  
The Area Tree is truly complicated - it's hierarchical, is there any way of 
going down all the nodes, without having to know precisely what the Node's 
class is? 
Regards
Igor


-Original Message-
From: Georg Datterl [mailto:georg.datt...@geneon.de]
Sent: martes, 12 de enero de 2010 10:40
To: fop-users@xmlgraphics.apache.org
Subject: AW: Absolute position of original text in final PDF

Hi Igor, 

since you already work with the area tree, try this: Don't autogenerate the id 
but give each text in your XML a unique id. Set this id as the block id. Now in 
the area tree you can find the block which contains your text (prod-id is your 
id). This block has a width (ipd) and a height (bpd) as well as your id 
(prod-id). Now for the positioning, I have not yet done that and a fast try did 
not give me a clear picture, but worst case you can fake the horizontal 
starting point by knowing the left margin and calculating the vertical starting 
point by adding the bpd of previous blocks in the area tree. But I guess, those 
who know the area tree better, may have a better solution for that.

Regards,
 
Georg Datterl
 
-- Kontakt --
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:www.irs-nbg.de 
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de 
-Ursprüngliche Nachricht-
Von: Igor Rosenberg [mailto:igor.rosenb...@atosresearch.eu]
Gesendet: Montag, 11. Januar 2010 18:44
An: fop-users@xmlgraphics.apache.org
Betreff: 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 

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 

 











 

  











  

--

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  

 



 
   

Adress 1 line



 
   

Address 2 line 






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