Forum Replies Created

Viewing 15 posts - 2,566 through 2,580 (of 4,234 total)
  • Author
    Posts
  • in reply to: changePageOrientation in RTF
    #29455

    @PD4ML wrote:

    Portrait:
    pd4ml.setPageSize( PD4Constants.A4 );
    Landscape:
    pd4ml.setPageSize( pd4ml.changePageOrientation( PD4Constants.A4 ) );

    Yes, i use always second type, but it have no effect:

    private static int PDF = 1;<br /> private static int RTF = 2;<br /> <br /> @Test<br /> public void pd4TestRun() throws Exception {<br /> convert(<path>, "C:\result.rtf", RTF);<br /> convert(<path>, "C:\result.pdf", PDF);<br /> }<br /> <br /> private void convert(String input, String output, int type) throws Exception {<br /> FileOutputStream fos = new FileOutputStream(new File(output));<br /> <br /> PD4ML pd4ml = new PD4ML();<br /> if (type == RTF) pd4ml.outputFormat(PD4Constants.RTF);<br /> pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));<br /> pd4ml.setPageInsets(new Insets(20, 20, 20, 20));<br /> pd4ml.setHtmlWidth(1024);<br /> pd4ml.disableHyperlinks();<br /> pd4ml.useTTF("java:fonts", true);<br /> pd4ml.setDefaultTTFs("Times New Roman", "Arial", "Courier New");<br /> InputStream is = new FileInputStream(new File(input));<br /> InputStreamReader inputStreamReader = new InputStreamReader(is);<br /> pd4ml.render(inputStreamReader, fos, new File(input).toURL());<br /> fos.close();<br /> }
    This code generate 2 files (attached to this message). But PDF is landscape, and RTF is portrait.
    I need landscape both.

    in reply to: changePageOrientation in RTF
    #29456

    You are right: we’ve just found a bug in our code. A solution will be available with the new maintenance release in 1-2 weeks. Or request a dev build by email from support pd4ml com

    in reply to: General questions / FAQ
    #26899

    That depends on where you define

    in reply to: Deployment / Configuration issues
    #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
    Jordan

    in reply to: Html to Pdf Conversion is not happening in linux
    #28982

    Hi ,

    I am facing the same issue , can you please tell me hwo did you resolve the issue?

    As its working fine for me in windows bt on linux gives the error.

    Regards
    Jordan

    in reply to: PRob generating PDF on Linux works fine on windows
    #29474

    A 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.

    in reply to: PRob generating PDF on Linux works fine on windows
    #29475

    Hi ,

    Thank you for your reply , but there isnt any space in

    “%@page contentType=”text/html; charset=ISO8859_1”
    %>

    in reply to: PRob generating PDF on Linux works fine on windows
    #29476

    Could you please attach your JSP sample or just send it to support pd4ml com

    Thank you!

    in reply to: PRob generating PDF on Linux works fine on windows
    #29477

    Hi ,

    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.

    in reply to: PRob generating PDF on Linux works fine on windows
    #29478

    There should be a whitespace before 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). 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?

    in reply to: PRob generating PDF on Linux works fine on windows
    #29479

    Hi ,

    As par the discussion please find the Top part of Jsp attached. Also the Tag
    is closed at very bottom like

    ” …

    Plese provide me your suggestions.

    Regards
    Jordan

    in reply to: PRob generating PDF on Linux works fine on windows
    #29480

    Your code:

    [language=xml:gax5r7a2]<%@ 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="http://pd4ml.com/tlds/pd4ml/2.5" prefix="pd4ml" %>[/language:gax5r7a2]

    Should be (all new line characters ‘n’ before removed):

    [language=xml:gax5r7a2]<%@ 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="http://pd4ml.com/tlds/pd4ml/2.5" prefix="pd4ml" %>[/language:gax5r7a2]

    in reply to: Troubleshooting
    #26904

    can PD4ML support the ligatures words in indian languge..

    in reply to: Troubleshooting
    #26908

    Hello,
    in our application we generate PDF-Files with forms. The generated files were read with the pdf lib Apache pdfbox. Since we updated pd4ml (Version 3.8.1fx2 to 3.8.5fx6) pdfbox can’t read the generated files with form-elements (text- and checkboxes). The error message is: “Error: Expected a long type, actual=’>>'”
    If i open the resulting PDF with an text editor i count one more “>>”-token than “<<". Am i right that these tokens wrap pdf objects and i should find the same number of both tokens? Is this behaviour a bug? Example HTML: <br /> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br /> <html><br /> <head><br /> <title>Test</title><br /> </head><br /> <body><br /> <input type="text" value="test"/><br /> </body><br /> </html><br /> transform html to pdf on command line: <br /> java -Xmx512m -cp .pd4ml-3.8.5fx6.jar Pd4Cmd file:Test.html 1200 -pdfforms -out Example.pdf<br /> pdfbox reading example (java): <br /> public static void main(String[] args)<br /> throws IOException {<br /> PDDocument.load(new File("Example.pdf"));<br /> } I am looking forward to get an helpful answer 🙂 Thank you

    in reply to: Can not read a pd4ml-PDF with checkbox with pdfbox
    #29493

    Yes, it was a bug in our code. Please contact support pd4ml com for an updated version.

Viewing 15 posts - 2,566 through 2,580 (of 4,234 total)