RE: Strange scaling of GIF images

2007-03-27 Thread Pascal Sancho
Hi Daniel,

Your GIF image appears to be buggy.

In AWT renderer, I get an exception, and I loose black pixels when I try to 
save for the Web your GIF from my picture editor... 

Exception in thread AWT-EventQueue-0 java.awt.image.RasterFormatException: 
Data array too small (should be 155042 )


Pascal

 -Message d'origine-
 De : Daniel Noll [mailto:[EMAIL PROTECTED] 
 Envoyé : mardi 27 mars 2007 01:40
 
 Hi all.
 
 It seems FOP is doing some strange image scaling on GIF 
 images.  I have trimmed my FO down to a really simple example 
 (literally just a fo:block with an fo:external-graphic 
 with only the src attribute.
 
 This zip contains the source FO, the GIF file and the resulting PDF:
 
http://trypticon.org/files/fop-gif-scaling-bug.zip
 
 As you can see from the PDF, the GIF is scaled in a weird 
 fashion, but not only that, the black lines have vanished 
 somehow too (so it's omitting data.)
 
 I've loaded the same image using ImageIcon and confirmed that 
 Java itself can load the image correctly.
 
 I assume that this is a FOP bug, but wanted to check here 
 first so that I could ask if anyone else has encountered it, 
 and whether there is a known workaround.
 
 Daniel

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



Re: Accessing the object Tree structure of FOP

2007-03-27 Thread Mukku Sarath Kiran

Hi

 which programming language you are using? in PHP you can use
 
 xpath_eval() function. see php manual for help.

 sarath


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



Re: Email

2007-03-27 Thread Mukku Sarath Kiran

liam grimes liamgrimes at gmail.com writes:

 
 Hi all have anyone tried to render the fo stream to pdf and email it to an 
recipient.?? Is it possible in java.. if so can you please help.Thanx


Hi,

 render fo stream to pdf : download fop 0.93 , see there is example   
   ExampleFO2PDF.java. you can get an idea.


 for emailing pdf, you can write program like

 javax.mail.Session mailSession   = javax.mail.Session.getDefaultInstance( 
  properties, null );
Multipart  mep= new MimeMultipart();
MimeBodyPart mebp1  = new MimeBodyPart();
MimeBodyPart mebp2  = new MimeBodyPart();

message = new MimeMessage( mailSession );
message.setFrom( );
message.setRecipients( );

try {
if (Attachment!=null) {
FileDataSource fds = new FileDataSource( Attachment );
mebp2.setDataHandler( new DataHandler( fds ));
mebp2.setFileName( fds.getName() );
}
}
   
mebp1.setText( );
mep.addBodyPart( mebp1 );
mep.addBodyPart( mebp2 );

// add the Multipart to the message
message.setContent( mep );

Transport.send( message, addrRecipient );

  sarath




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



RE: Accessing the object Tree structure of FOP

2007-03-27 Thread Harshini Madurapperuma
Hi
I'm using java. Do u have any idea bat that in java??

/Harshini 

-Original Message-
From: Mukku Sarath Kiran [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 2:44 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Accessing the object Tree structure of FOP


Hi

 which programming language you are using? in PHP you can use
 
 xpath_eval() function. see php manual for help.

 sarath


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

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



Re: fop romanian diacritic fonts

2007-03-27 Thread Mukku Sarath Kiran
 I'm using Debian GNU/Linux testing (etch) fop 0.25-? (but downloaded
 0.93). I can provide the sources if needed (i can't right now, not at
 home). I'm just starting out so if you can directly me to some nice
 tutorials on using xml + xsl-fo + how to get romanian language
 supported in pdf output :) it would be super.
 
 p.s. I'm a newbie so please be gentle.
 


Hi,

 If you download the fop 0.95 you can find the fop/conf/fop.xonf

 In the file add your font, giving example here.

font metrics-url=arial.xml kerning=yes embed-url=arial.ttf
  font-triplet name=Arial style=normal weight=normal/
  font-triplet name=ArialMT style=normal weight=normal/
/font
font metrics-url=arialb.xml kerning=yes embed-url=arialb.ttf
  font-triplet name=Arial style=normal weight=bold/
  font-triplet name=ArialMT style=normal weight=bold/
/font


 get the yourfont.ttf file from your system font folder,
 then use fop/ttc.bat to genereate yourfont.xml.
 place both yourfont.ttf, yourfont.xml files in the fop base directory.

 In your java program tell the fop.xconf file path with

 fopFactory.setUserConfig(new File(C://../fop/conf/fop.xconf));

 hope this help,
 
 sarath


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



fop pagebreak problems / errors

2007-03-27 Thread Dirk Bromberg

Hi fops,


I've got some strange behaviour of the fop-mechanisms when I try to 
force a page break from within a table. Basically the page breaks seem 
to have no effect, as long as the height of an enclosing row is not 
reached. I'm using fop-0.93.




I attached a small set of files to illustrate that. In the file 
not_paging.fo, the page-break is the only block element within a row 
with enforced height of 10. The page break is ignored here. Changing to 
break-before doesn't change that.




After inserting a bit of text (as in is_paging.fo), the height of the 
cell is taller than indicated in the fo, and surprisingly the page break 
*is* included. Can you please check, if this is an intended behaviour? 
If so: How can I enforce a page break then without having to remove the 
height constraints?



Thanks

Dirk





PS - On a different note: break-after crashes in the fo given in 
crash.fo with an illegal state exception (this surely is a bug, isn't it?):




java.lang.IllegalStateException: Invalid break class: -1

   at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)


   at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

   at org.apache.fop.cli.Main.startFOP(Main.java:160)

   at org.apache.fop.cli.Main.main(Main.java:191)



When I change to break-before, it doesn't crash.

?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;!-- defines page layout --
	fo:layout-master-set
		fo:simple-page-master master-name=1 page-height=297mm
			page-width=210mm
			fo:region-body /
		/fo:simple-page-master
	/fo:layout-master-set
	fo:page-sequence master-reference=1
		fo:flow flow-name=xsl-region-body
			fo:table table-layout=fixed width=100%
fo:table-body
	fo:table-row
		fo:table-cell
			fo:table table-layout=fixed
width=100%
fo:table-body
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
linefeed-treatment=ignore font-family=Helvetica
font-size=12pt
page
			/fo:block
		/fo:table-cell
	/fo:table-row
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
break-after=page /
		/fo:table-cell
	/fo:table-row
/fo:table-body
			/fo:table
		/fo:table-cell
	/fo:table-row
	fo:table-row
		fo:table-cell
			fo:table table-layout=fixed
width=100%
fo:table-body
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
linefeed-treatment=ignore font-family=Helvetica
font-size=12pt
page
			/fo:block
		/fo:table-cell
	/fo:table-row
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
break-after=page /
		/fo:table-cell
	/fo:table-row
/fo:table-body
			/fo:table
		/fo:table-cell
	/fo:table-row
	fo:table-row
		fo:table-cell
			fo:table table-layout=fixed
width=100%
fo:table-body
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
linefeed-treatment=ignore font-family=Helvetica
font-size=12pt
page
			/fo:block
		/fo:table-cell
	/fo:table-row
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
break-after=page /
		/fo:table-cell
	/fo:table-row
/fo:table-body
			/fo:table
		/fo:table-cell
	/fo:table-row
	fo:table-row
		fo:table-cell
			fo:table table-layout=fixed
width=100%
fo:table-body
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
linefeed-treatment=ignore font-family=Helvetica
font-size=12pt
page
			/fo:block
		/fo:table-cell
	/fo:table-row
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
break-after=page /
		/fo:table-cell
	/fo:table-row
/fo:table-body
			/fo:table
		/fo:table-cell
	/fo:table-row
	fo:table-row
		fo:table-cell
			fo:table table-layout=fixed
width=100%
fo:table-body
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block
linefeed-treatment=ignore font-family=Helvetica
font-size=12pt
page
			/fo:block
		/fo:table-cell
	/fo:table-row
	fo:table-row 
		fo:table-cell
			display-align=auto text-align=start
			fo:block

Re: Accessing the object Tree structure of FOP

2007-03-27 Thread Andreas L Delmelle

On Mar 27, 2007, at 11:38, Harshini Madurapperuma wrote:


Hi,


I'm using java. Do u have any idea bat that in java??


I still don't quite get the intention. You're talking of an  
fo:external-graphic being added as a child of fo:root. Note that that  
would make your input illegal FO.

The content-model of an fo:root is (XSL 1.1):
(layout-master-set,declarations?,bookmark-tree?,(page-sequence|page- 
sequence-wrapper)+)


No external-graphic possible here.



Cheers,

Andreas

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



Re: fop pagebreak problems / errors

2007-03-27 Thread Andreas L Delmelle

On Mar 27, 2007, at 17:25, Dirk Bromberg wrote:

Hi Dirk,

Considering the following:

PS - On a different note: break-after crashes in the fo given in  
crash.fo with an illegal state exception (this surely is a bug,  
isn't it?):


Yep, this is definitely a bug! Thanks for mentioning.

Interesting to note that the crash only seems to happen if the break- 
after is specified on the last cell in the table.


As to your other remarks:

I've got some strange behaviour of the fop-mechanisms when I try to  
force a page break from within a table. Basically the page breaks  
seem to have no effect, as long as the height of an enclosing row  
is not reached. I'm using fop-0.93.



I attached a small set of files to illustrate that. In the file  
not_paging.fo, the page-break is the only block element within a  
row with enforced height of 10. The page break is ignored here.  
Changing to break-before doesn't change that.


Either some of the attachments weren't pasted as intended, or  
something has changed in FOP Trunk, but playing with your examples,  
even when I remove the height property or the fo:block with the text,  
the break on the empty fo:block seems to be processed correctly... ?


Am I missing something?


Cheers,

Andreas

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



Re: Strange scaling of GIF images

2007-03-27 Thread Daniel Noll

Pascal Sancho wrote:

Hi Daniel,

Your GIF image appears to be buggy.


It isn't, however.


In AWT renderer, I get an exception, and I loose black pixels when I
try to save for the Web your GIF from my picture editor...


This doesn't happen on my copy of GIMP.  It renders correctly and with 
the correct margin, and when I save it, it works.


(And BTW, I'm pretty sure it isn't possible to loose pixels.)


Exception in thread AWT-EventQueue-0
java.awt.image.RasterFormatException: Data array too small (should be
155042 )


Sounds like the AWT renderer is encountering the same bug as the PDF 
renderer, only the PDF renderer is silently losing data while the AWT 
renderer is throwing an exception. :-(


The two must be using different methods of reading the GIF.  (And 
neither method is providing a result similar to ImageIcon's correct 
rendering.)


Daniel

--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://nuix.com/   Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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