Forum Replies Created

Viewing 15 posts - 2,356 through 2,370 (of 4,243 total)
  • Author
    Posts
  • in reply to: Not able to extract a PDF attachment from DXL File
    #29324

    Current XSL by an occurrence of an lookups a matching .

    You would only need to implement (before the closing ) an iterator through tags, which tests that there is no referenced .

    The solution is not going to impact the remaining XSL logic.

    in reply to: Stop displaying dynamic data when user saves the document
    #29310

    We need 1-2 days to learn/reproduce PDF-saving specific issues. I’ll let you know.

    in reply to: General questions / FAQ
    #26842

    We’re evaluating using PD4ML to go from HTML to PDF for a thermal receipt printer application. Everything seems to be working fine except that we’d like the page height to be automatically set based on the content/body in the source HTML. If we force a longer page break (eg. java -Xmx512m -Djava.awt.headless=true -cp ./pd4ml_demo.jar Pd4Cmd ‘file:./testprintutf8.html’ 200 200×750 -ttf . -insets 0,0,0,0,pt -out testprintutf8.rtf) we get a whole bunch of wasted paper feed at the end of each “page”. How can we get the page height to be set automatically based on the source HTML content?

    Thanks.

    BJ Weschke

    in reply to: HTML/CSS rendering issues
    #26843

    The HTML we process using PD4ML Pro v3.8.1fx2 may contain HTML entities. However, these entities are not converted to characters in the PDF that is rendered. Rather than PD4ML rendering “Something Quoted”, we see "Something Quoted". Is this a configuration that we have overlooked?

    in reply to: HTML entities not rendered in PDF
    #29337

    PD4ML resolves entities by default. If it appears in resulting PDF as

    "Something Quoted"

    I would suspect, it comes to PD4ML in a form

    "Something Quoted"

    Make sure, that the framework/tool, which produces HTML, does not substitutes ‘&’ occurrences with the corresponding entity on-a-fly.

    in reply to: PD4ML Page Height
    #29334

    Would it be possible to publish testprintutf8.html and testprintutf8.pdf here?

    in reply to: PD4ML Page Height
    #29335

    Files are attached as requested.

    [attachment=0:atysg6uz]testprintutf8.zip[/attachment:atysg6uz]

    PDF was produced with:

    java -Xmx512m -Djava.awt.headless=true -cp ./pd4ml.jar Pd4Cmd ‘file:./testprintutf8.html’ 200 200×750 -ttf . -insets 0,0,0,0,pt -out testprintutf8.pdf

    in reply to: Deployment / Configuration issues
    #26844

    I am trying to use pd4ml in Oracle Apache Jserv.The sample jsp you have provided is not working.

    Source Code:

    <%@ taglib uri="pd4ml.tld" prefix="pd4ml" %><%@page contentType="text/html; charset=ISO8859_1"%>

    Error:

    java.lang.NoSuchMethodError: javax/servlet/ServletResponse.reset()V

    Please suggest.

    in reply to: PD4ML Page Height
    #29336

    In order to predict a document height for particular conversion conditions, you may perform a fake conversion run and collect the conversion statistics:
    http://pd4ml.com/cookbook/pd4ml_conversion_status.htm
    You are interested in PD4Constants.PD4ML_DOCUMENT_HEIGHT_PX value. After the HTML doc height is known, you may adjust PDF page height proportionally.

    Also it is important to distinguish document dimensions in typographic points (“200×750” in your command line) and HTML document height and width, measured in screen pixels.

    The following tries to explain the px/pt mapping and scaling:
    http://pd4ml.com/cookbook/pdf_page_formatting.htm

    in reply to: Oracle Jserv
    #29340

    The code line, which throws the exception is marked in our SRC like that:
    [language=Java:2ueptf29]// ire: changed from sr.resetBuffer() to sr.reset()
    // for compatibility with servlet API 2.2
    sr.reset();[/language:2ueptf29]

    We can produce for you a special version with resetBuffer(), but probably it is better to upgrade your server.

    in reply to: Oracle Jserv
    #29341

    Hi Thanks for your reply,Upgrading the server is at this moment is not possible.Could you please provide the special version of resetBuffer().If you could provide the details steps on how we can use pd4ml in Oracle Application Server.

    in reply to: Oracle Jserv
    #29342

    Please give a try to the attached JAR – it should call ServletResponse.resetBuffer() instead or ServletResponse.reset().

    in reply to: Oracle Jserv
    #29343

    Got this error now:

    java.lang.NoSuchMethodError: javax/servlet/ServletResponse.resetBuffer()V

    #29311

    Please let me if there are any updates on this issue.

    in reply to: Out of memory error while converting a dxl file
    #29219

    Hi ,

    I am not sure where you want me to add the above portion of the code.Looking at the code it seems to be like you are creating the file in temp folder and adding some temprefrence tag to the html body.But after adding if you could give the details of what we need to do this return value it would be very helpful.
    I also don’t want to store the file in temp loaction I just want to store the file in some file path other than temp folder.

    I will also give the code snippet of what I currenlty do to convert DXL to PDF and to extract attachements from the converted PDF File.

    I am using below method to conver the html to pdf.
    pd4ml.render(new StringReader(inputHTML), fos, new URL("file:."), "utf-8");
    The inputHTML for the above function is framed as below.The contents of the DXL file is XMl source and the Pd4ml.xsl as xsl soruce.The below function returns the html content needed to pass to the above render function.

    try {<br /> java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();<br /> <br /> javax.xml.transform.Source xmlSource = new javax.xml.transform.stream.StreamSource(new StringReader(xml));<br /> javax.xml.transform.Source xsltSource = new javax.xml.transform.stream.StreamSource(new StringReader(xsl));<br /> javax.xml.transform.Result result = new javax.xml.transform.stream.StreamResult(baos);<br /> <br /> javax.xml.transform.TransformerFactory transFact = javax.xml.transform.TransformerFactory.newInstance();<br /> <br /> javax.xml.transform.Transformer trans = transFact.newTransformer(xsltSource);<br /> <br /> trans.transform(xmlSource, result);<br /> <br /> return baos.toString("utf-8");<br /> }

    After the PDF file has been rendered I am extracting the attachement from that PDF file.

    Kindly let me know if I have to do in some alrternate way.

Viewing 15 posts - 2,356 through 2,370 (of 4,243 total)