[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    RE: Printed blank page when running example class ExampleFO2JPSPrint.java
From:       Robert Meyer <rmeyer () hotmail ! co ! uk>
Date:       2012-11-30 15:33:08
Message-ID: SNT002-W186ACB54D2AB09BD83BC82C86430 () phx ! gbl
[Download RAW message or body]

Hi,

Yes I do get some data which does not equal -1. I used the following:

        BufferedImage img = renderer.getPageImage(0);
        for (int i = 0;i < img.getRaster().getDataBuffer().getSize();i++) {
            if (img.getRaster().getDataBuffer().getElem(i) != -1) {
                System.out.println(img.getRaster().getDataBuffer().getElem(i));
            }
        }

and got the following output:

-16777216
...
-14935012
-789517
-2368549
-16777216
-4605511
...
-11711155
-16053493
-14540254
-4737097
-16777216
-16777216

We do have a bug open which 
occurs on MacOS, although it might also occur on other systems which results in blank \
pages being sent to the printer. It is  still open at this stage and can be found \
here: https://issues.apache.org/bugzilla/show_bug.cgi?id=53249.

Could you tell us the version of FOP you are running and the operating system?

Regards,

Robert Meyer 

> Date: Fri, 30 Nov 2012 06:47:14 -0800
> From: massimo.iasevoli@snai.it
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Printed blank page when running example class ExampleFO2JPSPrint.java
> 
> Hi Robert.
> 
> Thanks for your quick response.
> 
> I already have those referenced, except xmlgraphics-commons-1.4svn.jar where
> i have xmlgraphics-commons-1.5.jar.
> 
> When i run i get this messages:
> 
> *FOP ExampleFO2JPSPrint
> 
> Preparing...
> Input: XSL-FO (.\xml\fo\helloworld.fo)
> Output: JPS (Java Printing System)
> 
> Transforming...
> Success!*
> 
> No error and no "Hello world".
> 
> Can you tell me if calling *renderer.getPageImage(0)* you see byte raster
> with values *!=* "-1"?
> 
> 
> 
> --
> View this message in context: \
> http://apache-fop.1065347.n5.nabble.com/Printed-blank-page-when-running-example-class-ExampleFO2JPSPrint-java-tp37429p37431.html
>  Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
 		 	   		  


[Attachment #3 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br><br>Yes I do get some data which does \
not equal -1. I used the following:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
BufferedImage img = renderer.getPageImage(0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
for (int i = 0;i &lt; img.getRaster().getDataBuffer().getSize();i++) \
{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if \
(img.getRaster().getDataBuffer().getElem(i) != -1) \
{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
System.out.println(img.getRaster().getDataBuffer().getElem(i));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>and got the following \
output:<br><br>-16777216<br>...<br>-14935012<br>-789517<br>-2368549<br>-16777216<br>-4 \
605511<br>...<br>-11711155<br>-16053493<br>-14540254<br>-4737097<br>-16777216<br>-16777216<br><br>We \
do have a bug open which  occurs on MacOS, although it might also occur on other \
systems which results in blank pages being sent to the printer. It is  still open at \
this stage and can be found here: \
https://issues.apache.org/bugzilla/show_bug.cgi?id=53249.<br><br>Could you tell us \
the version of FOP you are running and the operating \
system?<br><br>Regards,<br><br>Robert Meyer <br><br><div><div \
id="SkyDrivePlaceholder"></div>&gt; Date: Fri, 30 Nov 2012 06:47:14 -0800<br>&gt; \
From: massimo.iasevoli@snai.it<br>&gt; To: fop-users@xmlgraphics.apache.org<br>&gt; \
Subject: RE: Printed blank page when running example class \
ExampleFO2JPSPrint.java<br>&gt; <br>&gt; Hi Robert.<br>&gt; <br>&gt; Thanks for your \
quick response.<br>&gt; <br>&gt; I already have those referenced, except \
xmlgraphics-commons-1.4svn.jar where<br>&gt; i have \
xmlgraphics-commons-1.5.jar.<br>&gt; <br>&gt; When i run i get this messages:<br>&gt; \
<br>&gt; *FOP ExampleFO2JPSPrint<br>&gt; <br>&gt; Preparing...<br>&gt; Input: XSL-FO \
(.\xml\fo\helloworld.fo)<br>&gt; Output: JPS (Java Printing System)<br>&gt; <br>&gt; \
Transforming...<br>&gt; Success!*<br>&gt; <br>&gt; No error and no "Hello \
world".<br>&gt; <br>&gt; Can you tell me if calling *renderer.getPageImage(0)* you \
see byte raster<br>&gt; with values *!=* "-1"?<br>&gt; <br>&gt; <br>&gt; <br>&gt; \
--<br>&gt; View this message in context: \
http://apache-fop.1065347.n5.nabble.com/Printed-blank-page-when-running-example-class-ExampleFO2JPSPrint-java-tp37429p37431.html<br>&gt; \
Sent from the FOP - Users mailing list archive at Nabble.com.<br>&gt; <br>&gt; \
---------------------------------------------------------------------<br>&gt; To \
unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org<br>&gt; For \
additional commands, e-mail: fop-users-help@xmlgraphics.apache.org<br>&gt; <br></div> \
</div></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic