You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Andreas L Delmelle <a_...@pandora.be> on 2007/12/01 23:26:53 UTC

Re: FOP creates only blank pages

On Nov 30, 2007, at 11:45, Michael Siepmann wrote:

Hi

> we have a content management system, which can create FO and with  
> the help of FOP PDF. The system uses an Apache Tomcat 5 and we have  
> used FOP 0.20. This combination works.
> But now, I've switched to FOP 0.94 and changed the code which  
> creates the PDF. At this moment, FOP only creates white pages  
> without any text. The number of pages is correct, for example when  
> I create a FO with 2 pages, 2 pages will be in the PDF, but all are  
> white.
> The FO-Code is still ok, which can be demonstrated by copying the  
> FO-Code to a special test-program. Even the new code, which is  
> copied to this test-program. But I don't see the problem, why the  
> same code doesn't work inside the Tomcat.

<snip />

Very long shot, but could it have something to do with the encryption?

Can you try commenting out the following line:

>    userAgent.getRendererOptions().put("encryption-params", new  
> PDFEncryptionParams(null, null, true, false, false, false));



Cheers

Andreas


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


Re: FOP creates only blank pages

Posted by Michael Siepmann <mi...@gmx.net>.
Hi Andreas,

yes, I'm sure, the FO is the same and correct. Even if I took a small example directly from the FOP-Source (the easiest one is the simple.fo from FOP\examples\fo\basic), a blank page will be created. And this simple.fo works, if I use it inside the test-program.
I can copy the generated code while debugging my servlet-bean and test this code inside the test-program too and this works fine. The only thing that could happen during the copy'n'paste is a conversion between UTF-8 to ISO-8859-1. But I don't think, this is a problem because the simple.fo works with copy'n'paste.

Michael

> 
> One more thing to check (don't know if you already took that step):
> Are you certain that the FO that gets passed to FOP (= the result of  
> the XSL transformation) is identical in both cases?
> 
> If there is nothing in the FO but two fo:page-sequences with one  
> empty fo:block, this could explain the two empty pages.
> 
> Via the command-line, you can obtain the FO through the '-foout'  
> command-line option.
> You could then try testing the servlet by passing it that FO and an  
> XSLT stylesheet performing an identity transform.
> 
> Another option is to alter the servlet to dump the intermediate FO to  
> a file, so you can inspect it.
> 
> 
> HTH!
> 
> Andreas

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


Re: FOP creates only blank pages

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Dec 2, 2007, at 22:27, Michael Siepmann wrote:

Hi Michael

> snip
>
>> Very long shot, but could it have something to do with the  
>> encryption?
>>
>> Can you try commenting out the following line:
>>
>>>    userAgent.getRendererOptions().put("encryption-params", new
>>> PDFEncryptionParams(null, null, true, false, false, false));
>>
>
> As I've said before: the code with the userAgent can be removed. My  
> first version was without this code and with the same result.

One more thing to check (don't know if you already took that step):
Are you certain that the FO that gets passed to FOP (= the result of  
the XSL transformation) is identical in both cases?

If there is nothing in the FO but two fo:page-sequences with one  
empty fo:block, this could explain the two empty pages.

Via the command-line, you can obtain the FO through the '-foout'  
command-line option.
You could then try testing the servlet by passing it that FO and an  
XSLT stylesheet performing an identity transform.

Another option is to alter the servlet to dump the intermediate FO to  
a file, so you can inspect it.


HTH!

Andreas

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


Re: FOP creates only blank pages

Posted by Michael Siepmann <mi...@gmx.net>.
Hi Andreas,

snip

> Very long shot, but could it have something to do with the encryption?
> 
> Can you try commenting out the following line:
> 
> >    userAgent.getRendererOptions().put("encryption-params", new  
> > PDFEncryptionParams(null, null, true, false, false, false));
> 

As I've said before: the code with the userAgent can be removed. My first version was without this code and with the same result.

Michael

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