HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Deployment / Configuration issues › PRob generating PDF on Linux works fine on windows
- This topic has 7 replies, 2 voices, and was last updated Jan 27, 2014
19:34:50 byPD4ML.
-
AuthorPosts
-
January 24, 2014 at 10:44#26902
Hi ,
I am facing the issue . It works well on windows but Gives Error on Linux Machine. Can any one tell me is there really difference between linux and windows behavior .
For me its works fine in windows with error “getOutputStream() has already been called” . In windows it gives the Error but opens the document in PDF.
while in Linux its gives error getOutputStream() has already been called” and message “there was an error opening this document.the file is damanged and could not be repaired” . So on linux it doesnt generate the PDf.
Regards
JordanJanuary 24, 2014 at 11:02#29474A problem reason and a workaround is explained in the post:
pdf-generation-troubleshooting-f4/getoutputstream-has-already-been-called-exception-t14.html“getOutputStream() has already been called” error has different “fatality” on different JSP platforms, probably that explains why it works on Win and does not on Linux. But the best solution would be to update the JSP to suppress the error.
January 24, 2014 at 18:06#29475Hi ,
Thank you for your reply , but there isnt any space in
“
%@page contentType="text/html; charset=ISO8859_1" %><pd4ml:transform
” . The jsp file is same on Win and Linux. Can you please Explain in Detail.Can you please guide me for troubleshooting or provide me direction where should i look for the answer.
Regards
JordanJanuary 24, 2014 at 18:24January 24, 2014 at 19:44#29477Hi ,
Thank you for your quick Response , i will send the Jsp 2morrow but by the time can you tell me the possible points to trouble shoot.
I am getting Errror on jsp is “getoutputstream has already been called for this response java lang illegalstateexception”. but with this exception its works fine on Win but give the error on linux.
January 24, 2014 at 19:51#29478There should be a whitespace before
<pd4ml:transform>tag. It can be not obvious in JSP code, but the exception tells, that probably a new line char has been already sent to HTTP stream (JSP container implicitly opens HTTP stream for that).<pd4ml:transform>tries to open the stream again, and causes the exception.As I wrote, for different JSP containers the situation has a different severity. On Win it is just a warning, on Linux it could be fatal.
Could you please just copy paste a top part of your JSP and publish here?
January 27, 2014 at 03:48#29479Hi ,
As par the discussion please find the Top part of Jsp attached. Also the Tag
is closed at very bottom like
“</html:form> </body> </html> </pd4ml:transform>
” …Plese provide me your suggestions.
Regards
JordanJanuary 27, 2014 at 19:34#29480Your code:
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/c-rt" prefix="c-rt"%> <%@ page errorPage="/general/ErrorPage.jsp"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ page isELIgnored="false"%> <%@ page contentType="text/html;charset=UTF-8"%> <%@page import="java.util.ArrayList,java.util.Iterator,com.website.utils.DateUtil"%> <%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.5" prefix="pd4ml" %><pd4ml:transform screenWidth="1500" pageFormat="A4" pageOrientation="landscape" pageInsets="5,5,5,5,mm" enableImageSplit="false" fileName="Transporter Registration for transhipment" inline="false" debug="true" >
Should be (all new line characters ‘n’ before
<pd4ml:transform>removed):<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%><%@ taglib uri="/WEB-INF/c-rt" prefix="c-rt"%><%@ page errorPage="/general/ErrorPage.jsp"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%@ page isELIgnored="false"%><%@ page contentType="text/html;charset=UTF-8"%><%@ page import="java.util.ArrayList,java.util.Iterator,com.website.utils.DateUtil"%><%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.5" prefix="pd4ml" %><pd4ml:transform screenWidth="1500" pageFormat="A4" pageOrientation="landscape" pageInsets="5,5,5,5,mm" enableImageSplit="false" fileName="Transporter Registration for transhipment" inline="false" debug="true" >
-
AuthorPosts
The forum ‘Deployment / Configuration issues’ is closed to new topics and replies.
