More info added to the original message...

-----Mensaje original-----
De: Carmona Perez, David 
Enviado el: lunes, 04 de agosto de 2003 11:54
Para: 'Paulo Soares'
Asunto: RE: [iText-questions] PdfPTableEvent and Templates

I have more clues about what really happens.

I'm working in a servlet environment (using Cocoon), and having a strange problem.  
* When I create a page with a link to my PDF file, and right-click and select Save 
as...., then everything is ok, when I open the file with Acrobat reader.
* But when I try to open directly with the browser (Internet Explorer 6 and Acrobat 
Reader 5.01), the connection is closed prematurely.  I know it because I receive the 
following call stack:

java.net.SocketException: Software caused connection abort: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at 
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:668)
        at 
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:160)
        at 
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:523)

Other times, when browsing to the page where I have added the templates, the following 
error is shown by Acrobat Reader:
"There is an error processing a page.  Invalid annotation object"
and the page appears empty.  Subsequent pages are shown ok.
So, PDF files are viewed ok from the file system, but not directly from a Web 
browser!!!!
It appears that templates are confusing Acrobat Reader when trying to download a PDF 
file
The problem is not related to PdfPTableEvent as I suppose at first.

Does anyone have any more clues about this?
Thanks in advance


--------
David

-----Mensaje original-----
De: Paulo Soares [mailto:[EMAIL PROTECTED]
Enviado el: s�bado, 02 de agosto de 2003 11:04
Para: Carmona Perez, David; Itext-Questions (E-mail)
Asunto: Re: [iText-questions] PdfPTableEvent and Templates

That can happen if the template covers the text although I don't understand
why regular Table would be affected. Please post a complete small runnable
code exhibiting the problem.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Carmona Perez, David" <[EMAIL PROTECTED]>
To: "Itext-Questions (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 13:06
Subject: [iText-questions] PdfPTableEvent and Templates


> Hi all,
>
> During a PdfPTableEvent, I add templates.  The effect is that all the
> tables (including regular Table's in addition to PdfPTable's) are
> rendered blank except the border.
>
>       class EventsTblIndice implements PdfPTableEvent {
>             public void tableLayout(PdfPTable table, float[][] widths,
> float[] heights,
> int headerRows, int rowStart, PdfContentByte[] canvases)
> {
>                   PdfContentByte cb = canvases[PdfPTable.TEXTCANVAS];
>                   for (int i = 0; i < table.size()-rowStart; i++) {
>                         cb.addTemplate(myTemplates[i], widths[0][1],
> heights[rowStart+i+1]);
>                   }
>             }
>       }
>
> If I comment out the cb.addTemplate() line, everything works ok.
>
> The templates are empty, nothing is written in them, to keep things
> simpler.
>
> Does anyone know the cause?
>
> Thanks in advance.
> --------
> David
>
>


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to