Forum Replies Created

Viewing 15 posts - 2,926 through 2,940 (of 4,243 total)
  • Author
    Posts
  • in reply to: HTML/CSS rendering issues
    #27026

    Hi all,

    Please refer to the following html code

    <!--?xml version="1.0" encoding="UTF-8"?--><html><head><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="X-UA-Compatible" content="IE=edge"></head><br /> <body><div id="j_idt44" class="ui-outputpanel ui-widget"><br /> <a id="anchorPageHeader"></a><br /> <div class="container" style="margin-bottom: 5%;"><br /> <div id="template" style="border: 2px solid #EAEAEA; margin-left: -1.92%; margin-right: 2%;"><br /> <div id="globalMessages" class="ui-messages ui-widget" aria-live="polite"></div><br /> <div style="padding: 0 20px 10px;" id="contentId"><br /> <form id="printSubmissionForm" name="printSubmissionForm" method="post"><br /> <input type="hidden" name="printSubmissionForm" value="printSubmissionForm"><br /> <div id="printSubmissionForm:j_idt1337" class="ui-panel ui-widget ui-widget-content ui-corner-all" data-widget="widget_printSubmissionForm_j_idt1337"><br /> <div id="printSubmissionForm:j_idt1337_header" class="ui-panel-titlebar ui-widget-header ui-helper-clearfix ui-corner-all"><br /> <span class="ui-panel-title">Particulars of Deceased</span><br /> </div><br /> <div id="printSubmissionForm:j_idt1337_content" class="ui-panel-content ui-widget-content"><br /> <table id="printSubmissionForm:j_idt1338" class="ui-panelgrid ui-widget panelEsvcColorClass" style="width: 100%;" role="grid"><br /> <tbody><br /> <tr class="ui-widget-content ui-panelgrid-even" role="row"><br /> <td role="gridcell" style="width:40%"> File Reference No.</td><br /> <td role="gridcell" style="width:60%"><span id="printSubmissionForm:fileRefNumDesc">XXXXXXXXX</span></td><br /> </tr><br /> <tr class="ui-widget-content ui-panelgrid-even" role="row"><br /> <td role="gridcell" style="width:40%"> Name</td><br /> <td role="gridcell" style="width:60%">XXXXX</td><br /> </tr><br /> </tbody><br /> </table><br /> </div><br /> </div><br /> <div id="printSubmissionForm:j_idt1357" class="ui-panel ui-widget ui-widget-content ui-corner-all" data-widget="widget_printSubmissionForm_j_idt1357"><br /> <div id="printSubmissionForm:j_idt1357_header" class="ui-panel-titlebar ui-widget-header ui-helper-clearfix ui-corner-all"><br /> <span class="ui-panel-title">Particulars of Child</span><br /> </div><br /> <div id="printSubmissionForm:j_idt1357_content" class="ui-panel-content ui-widget-content"><br /> <table id="printSubmissionForm:j_idt1358" class="ui-panelgrid ui-widget panelEsvcColorClass" style="width: 100%;" role="grid"><br /> <tbody><br /> <tr class="ui-widget-content ui-panelgrid-even" role="row"><br /> <td role="gridcell" style="width:40%"> Name (as in Birth Certificate/NRIC No.)</td><br /> <td role="gridcell" style="width:60%"><span id="printSubmissionForm:childNme">XXXXX (XXXX8719D)</span></td><br /> </tr><br /> <tr class="ui-widget-content ui-panelgrid-odd" role="row"><br /> <td role="gridcell" style="width:40%"> Any other name(s)</td><br /> <td role="gridcell" style="width:60%"><span id="printSubmissionForm:childOthNme" class="textarea" style="white-space:pre">TEST 123<br /> TEST</span></td><br /> </tr><br /> <tr class="ui-widget-content ui-panelgrid-even" role="row"><br /> <td role="gridcell" style="width:40%"> NRIC/ Passport No.</td><br /> <td role="gridcell" style="width:60%">XXXXXXXX <span> : </span>XXXX8719D</td><br /> </tr><br /> <tr class="ui-widget-content ui-panelgrid-odd" role="row"><br /> <td role="gridcell" style="width:40%"> Education Level</td><br /> <td role="gridcell" style="width:60%"><span id="printSubmissionForm:childEduLevelCde">PRIMARY 1</span></td><br /> </tr><br /> </tbody><br /> </table><br /> </div><br /> </div><br /> </form><br /> </div><br /> </div><br /> </div><br /> </div></body></html>

    in the “Any Other Name(s)” field, I have inserted a new line after “TEST 123”, the styling works correctly when I open the HTML file in a browser.

    When I try to generate a pdf using the same file, there is no new line being displayed after “TEST 123”.

    In summary, i want the value to be printed like this:
    TEST 123
    TEST

    instead, i got this:
    TEST 123 TEST

    Based on the documentation, PD4ML does support the style so I am wondering what I am doing wrong.

    Thanks a bunch for your help.

    in reply to: General questions / FAQ
    #27027

    Hi All,

    Please direct me whether I can achieve the below requirement.

    I have a table which will extend to 3, 4 pages. If it breaks to mulitple pages, I have to repeat the header of table which I am able to do with the solution defined in the support forum using enableSmartTableBreaks and its working with

    tags

    But in this, if I have to repeat something in the table footer, for example, my table contains a lot of icons and want to show the icons information at the bottom of table in every page that this table is included, so would like to know whether I can repeat a section at the bottom of table in multiple pages. Please suggest wheter its acheivable and how we can do it?

    Regards
    Sarin Ts

    in reply to: Convert XML to PDF with SSL resources
    #29762

    Thank you for your reply.

    The code is from our legacy project. It takes XML file from database and transform it, output is a PDF file. There is a link to remote HTTPS xslt file in XML, and that xslt file contains URLs to remote HTTPS image. If it is a local xslt file, the code works just fine. Could you shed some light? Here is the code with comments:
    <br /> /**<br /> * Generates a PDF document from an XML file that requires transformation using an<br /> * XSL stylesheet.<br /> *<br /> * @param sourceStream The source XML document stream.<br /> * @param targetStream The target PDF document stream.<br /> * @param headerText Text to display as a page header in the target PDF.<br /> * @param forcePrint Whether or not to force the print dialog to appear when the PDF is loaded.<br /> *<br /> * @throws Exception If something goes wrong while transforming the XML or generating the PDF.<br /> */<br /> public void generatePdf(InputStream sourceStream, OutputStream targetStream, String headerText, boolean forcePrint) throws Exception {<br /> PD4ML converter = new PD4ML();<br /> if (headerText != null) {<br /> PD4PageMark header = new PD4PageMark();<br /> Font font = header.getFont();<br /> Font boldFont = font.deriveFont(Font.BOLD);<br /> header.setFont(boldFont);<br /> header.setTitleTemplate(headerText);<br /> converter.setPageHeader(header);<br /> }<br /> PD4PageMark footer = new PD4PageMark();<br /> footer.setPageNumberTemplate("Page $[page] of $[total]");<br /> footer.setPageNumberAlignment(PD4PageMark.CENTER_ALIGN);<br /> converter.setPageFooter(footer);<br /> converter.setPageSize(PD4Constants.A4);<br /> converter.setPageInsetsMM(new Insets(10, 10, 10, 10));<br /> converter.setHtmlWidth(820);<br /> if (forcePrint) {<br /> Map<String, String> dynamicParameters = new HashMap<String, String>();<br /> dynamicParameters.put(PD4Constants.PD4ML_PRINT_DIALOG_POPUP, "true");<br /> converter.setDynamicParams(dynamicParameters);<br /> }<br /> converter.render(new InputStreamReader(sourceStream, "UTF-8"), targetStream);<br /> }<br />

    in reply to: Convert XML to PDF with SSL resources
    #29760

    Hmm… In the code PD4ML API assumes, that InputStream sourceStream returns HTML.

    There was no PD4ML version, which could implicitly transform XML to HTML. The transformation should be done in advance to PD4ML API call.

    If the comment means XHTML under “XML”, the conversion will work, but anyway any XSL references will be ignored.

    in reply to: Repeat Footer in a table
    #29764

    Hi,

    Could you please give me an update on this, because this is a requirement from a big client using PD4ML, if we can’t give a solution/alternative, we might have to check for another libraries.

    Thanks
    Sarin TS

    in reply to: style="whitespace: pre" is not working
    #29763

    Current versions of PD4ML provide a limited functionality for tag.

    You can achieve the needed layout if you move style=”whitespace: pre” from to hosting

    tag.

    in reply to: Troubleshooting
    #27028

    i’m working with a setup that uses pd4ml but quite recently i seem to be getting an interesting error. (first report of the error came on friday 19th jun)

    I’m use the railo 4.2 runtime
    no changes has been made to my code for a while, but recently it has started to throw an error:
    Message org.zefer.pd4ml.PD4ML.setPageFooter(org.zefer.pd4ml.PD4PageMark)
    Cause java.lang.NoSuchMethodException

    just to make my problem more confusing it seems to be spreading slowly instead of getting the error everywhere at once.

    i get this error at work, and the customer also get this error. while at my home computer i do not get the error.
    removing the tag to add the footer will generate the pdf, but without the pagenumber.

    Does anyone know if it might be the latest patch that is doing this?
    or perhaps know where i should go to figure out more?

    #28365

    Hello,
    my original HTML document has an image and I get the next Exception when I do pd4ml.render(…) :

    sun.awt.image.ImageFormatException: Unsupported color conversion request

    I tried by changing the image by another with similar width and height but less file size (the original image that fails is 138 KB and the new one is 14KB). When I change it, it works fine.

    How can I make it to work with the original size image? It has to be this image because it is from an external server and I cannot change the quality or size.

    Thanks

    #29631

    Hi !

    We are trying to make binary comparaison on our pdf file to ensure non regression test.

    As asked, two pdf which permit to understand well our problem.

    From the unzipped pdf generated from linux we get the following header :
    ‘qn% PD4ML version: 396 Pro DMSn% JDK version: 1.7.0_79n% OS version: Linux 3.13.0-53-genericn% File encoding: UTF-8n%

    From the unzipped pdf generated from windows we get the following header :
    ‘qn% PD4ML version: 396 Pro DMSn% JDK version: 1.7.0_71n% OS version: Windows 7 6.1n% File encoding: windows-1252n%

    Thus, we still have some problem regarding binary comparaison. In fact the actual version of PD4ML doesn’t allow us to overwrite the data of the pdf regarding those 3 elements :

    callParameters.append( “% JDK version: ” + System.getProperty( “java.version” ) + “n” );
    callParameters.append( “% OS version: ” + System.getProperty( “os.name” ) + ” ” );
    callParameters.append( System.getProperty( “os.version” ) + “n” );

    Hoping the release allowing this overwrite will be able soon.

    Best regards,

    #28366

    It could be that your jpeg is using the CMYK color model rather than RGB.

    You can convert it on a fly (with JAI, for example) using custom resource loaders API.

    See pd4ml-html-css-pdf-tips-tricks-f7/a-definition-of-custom-resource-loaders-t40.html

    in reply to: General questions / FAQ
    #27030

    Hi,
    We have license for PD4ML which we purchased in 2011 and mainly used for PDF reports in Java; Enterprise applications were running on Websphere 6.x.

    Now we are migrating the applications onto Websphere 8.x. The development IDE I am using is Eclipse (Luna version).
    Even if I test a simple PDF, it is failing with a blank screen? I put the same pd4ml.jar and pd4ml_tl.jar in the classpath.

    Any idea why this is happening?? I appreciate your help.

    Code for the testing PDF:
    <%@ taglib uri="http://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %><%@page<br /> contentType="text/html; charset=ISO8859_1"%><pd4ml:transform<br /> screenWidth="840"<br /> pageFormat="A4"<br /> pageOrientation="landscape"<br /> pageInsets="10,10,10,10,points"<br /> enableImageSplit="false"<br /> enableTableBreaks="true"><br /> <pd4ml:footer<br /> pageNumberTemplate="Testing"<br /> titleAlignment="left"<br /> pageNumberAlignment="left"<br /> color="#008000"<br /> initialPageNumber="1"<br /> fontSize="12"<br /> fontStyle="bold"<br /> areaHeight="16"/><br /> <HTML><br /> <BODY><br /> <br><br><br><br><br><br><br><br><br /> <b> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> Just testing to see if it prints anything on screen or blank problem still exists? <br><br /> </b><br /> </BODY><br /> </HTML><br /> </pd4ml:transform>

    in reply to: Blank PDF
    #29776

    Any exception stacktraces in the server’s log?

    in reply to: Blank PDF
    #29777

    No exception stack trace or error message in log file which puzzled me to figure out what was going wrong !

    Of course one difference between Websphere 6.x and 8.x is: previous one is Servlet 2.4/JSP 2.0 specs where as the new one is Servlet 3.0 and JSP 2.2 if that in some way can be an issue?

    Thanks

    in reply to: Blank PDF
    #29778

    If you use an old version of PD4ML there is a probability your ss_css2.jar includes some DOM classes which conflict with identical ones on the target platform.

    A good test would be to download one of the recent PD4ML versions (even evaluation) and to test if the issue reproducible.

    in reply to: Blank PDF
    #29779

    Thanks…
    I will download and test the recent version and let you know what happens.

Viewing 15 posts - 2,926 through 2,940 (of 4,243 total)