Forum Replies Created

Viewing 15 posts - 2,941 through 2,955 (of 4,234 total)
  • Author
    Posts
  • in reply to: Blank PDF
    #29780

    Well, something does not sound right.
    I replaced the old pd4ml_tl.jar with the new pd4ml_tl_demo.jar. I also updated the pd4ml.tld

    When I tested my simple test, this time too, the screen was blank and no errors. I also tested the index.jsp that came with the download and even that was showing 2 blank pages.

    Am I missing something? or the Websphere 8.x on Eclipse some how is not making this work?
    Thanks

    in reply to: Blank PDF
    #29781

    Sorry, my bad, I forgot to replace pd4ml_demo.jar with the original one. I will test again and update here.

    in reply to: Blank PDF
    #29782

    No, it is not working even now; I get blank PDF’s without any error.
    I downloaded the demo jars from trial version 3.9.8b1

    Any clue what is causing this problem? Thanks

    in reply to: Blank PDF
    #29783

    With Internet Explorer and Chrome, it come blank.
    If I try with Firefox, it comes blank but it does give some warning like ‘This PDF document might not be displayed correctly.

    in reply to: Blank PDF
    #29784

    OK, please do the following.

    Temporarily add enable=”false” attribute to and open the page in a web browser. It should return HTML. Save the HTML.

    Remove the attribute and generate a PDF (it is blank, according to your report). Save it.

    Please send the both docs to support pd4ml com

    in reply to: HTML/CSS rendering issues
    #27031

    I am chasing an issue where PD4ML is not able to fetch https images. We are using PD4ML 380fx6 Pro from a tomcat environment. Based on previous posts, my theory is that I need to create a class for pd4ml.extra.resource.loaders.

    Using the sample on this board, I have created my own com.mycompany.utilities.PD4MLCustomFileResourceProvider.class. I have also added the code to add this as the DynamicParams.

    HashMap map = new HashMap();<br /> map.put( "pd4ml.extra.resource.loaders", "PD4MLCustomFileResourceProvider" );<br /> pd4ml.setDynamicParams(map);<br /> pd4ml.enableDebugInfo();<br /> pd4ml.render(sr, os);

    But when I run the code, I see in the logs:

    version: PD4ML 380fx6 Pro
    image not yet in cache: http://www.google.com/images/srpr/logo11w.png
    not yet in cache: http://www.google.com/images/srpr/logo11w.png
    External resource loader: PD4MLCustomFileResourceProvider not found. Make sure “pd4ml.extra.resource.loaders” value is correct
    External resource loader: PD4MLCustomFileResourceProvider not found. Make sure “pd4ml.extra.resource.loaders” value is correct
    image size: 14022

    Do I need to include the package information in the Map?

    TIA!
    Steve B.

    in reply to: HTML/CSS rendering issues
    #27032

    Reading this forum, I have learned about the ability to create a custom resource loader. In a separate post, I am trying to make the examples work in my environment. Assuming I get the sample working, I have questions on how this fits into my current environment.

    My belief is that I only need a custom loader to handle the loading of https resources; any other resource (http, relative-paths, local-resources, etc.) I would like to allow PD4ML to use its standard processing. So my question is, can I add a custom loader just for https resources? If not, is there a way from my code to call the pd4ml-resource-loader? ie:

    <br /> if (resource.startsWith("https")){<br /> // my processing code here...<br /> } else {<br /> // something like super.getResourceAsBytes(resource, debug);<br /> }

    TIA,

    Steve B.

    in reply to: PD4ML Tips & Tricks
    #27033

    Hi,

    i am using the below code to generate pdf,but my data is getting truncated.i.e last line of the first page and first line of the next page are not displayed.Can i get a solution that my content is not lost and is displayed properly???

    public void printPDF(InputStream in, String uen, String loginId,
    String coTransNo, String coTransId) {
    try {
    File j =
    File.createTempFile(SharesConstants.TEMP_FILE, SharesConstants.DOT_PDF,
    null);
    java.io.FileOutputStream fos = new FileOutputStream(j);
    OutputStream sos = System.out;

    InputStreamReader isr =
    new InputStreamReader(in, SharesConstants.UTF_8);
    PD4ML pd4ml = new PD4ML();

    pd4ml.getLastRenderInfo(PD4Constants.PD4ML_TOTAL_PAGES);
    try {
    pd4ml.enableImgSplit(Boolean.FALSE);
    pd4ml.setPageSize(SharesConstants.PDF_LAND_SCAPE_VALUE ?
    pd4ml.changePageOrientation(PDF_FORMAT) :
    PDF_FORMAT);
    } catch (Exception e) {
    e.printStackTrace();
    }
    if (SharesConstants.PDF_UNITS_VALUE.equals(SharesConstants.MM)) {
    pd4ml.setPageInsetsMM(new Insets(SharesConstants.PDF_TOP_VALUE,
    SharesConstants.PDF_LEFT_VALUE,
    SharesConstants.PDF_BOTTOM_VALUE,
    SharesConstants.PDF_RIGHT_VALUE));
    } else {
    pd4ml.setPageInsets(new Insets(SharesConstants.PDF_TOP_VALUE,
    SharesConstants.PDF_LEFT_VALUE,
    SharesConstants.PDF_BOTTOM_VALUE,
    SharesConstants.PDF_RIGHT_VALUE));
    }
    pd4ml.setHtmlWidth(SharesConstants.PDF_USER_SPACE_WIDTH);

    pd4ml.render(isr, fos);
    pd4ml.enableSmartTableBreaks(true);
    pd4ml.addStyle(“BODY, DIV, TD { word-wrap: break-word }”, true);

    if (convertToBlobAndPersistTxn(j, uen, loginId, coTransNo,coTransId)) {

    } else {

    }
    j.deleteOnExit();
    } catch (Exception e) {

    e.printStackTrace();
    }
    }

    in reply to: Blank PDF
    #29785

    Thanks. I was busy until today, so could not get back.
    I just now sent an email as you suggested and hopefully we can figure out and fix the problem soon. Thanks again

    in reply to: Blank PDF
    #29786

    Hi PD4ML,

    I sent the email to you (support at pd4ml dot com) regarding the blank PDF problem along with attachments.
    Did you guys find any problem in my code and any work around solution to fix the problem?

    Thanks and I appreciate your help.

    in reply to: Blank PDF
    #29787

    Yes, we received the files. Thank you!

    The sample HTML is quite simple and it should not cause any problems with conversion. We’ve been analyzing what could be an issue reason.

    BTW: you did not send a blank PDF sample for the doc. Could you please send it?

    Or under “blank PDF” you meant a blank browser frame (no PDF, no PDF viewer plugin)?

    in reply to: Blank PDF
    #29788

    Thanks for such a quick response. I know it should be evening time there 🙂
    I did send a blank PDF with attachment by name “TestPDF.pdf”. You did not get it? I don’t know if either of our mail servers filtered it for some security reason. I doubt though.

    It is not a blank browser frame. It does show as a PDF and when I right-click to check document properties, it does show as Application: PD4ML. HTML to PDF Converter for Java (398b1)

    I am also not understanding why the PDF is not showing anything. I do have ss_css2.jar in classpath but I believe the PD4ML Java v3.9.8b1 version does not use ss_css2.jar anymore.

    Thanks again

    in reply to: Blank PDF
    #29789

    Oh, my fault – I overlooked the PDF (it appeared in the mail message as a white rectangle on a white background). We’ll address the issue tomorrow.

    in reply to: Blank PDF
    #29790

    As a quick test try to add encoding=”default” to – it looks like your PDF is corrupted by a character encoding conversion applied to binary PDF data.

    in reply to: Blank PDF
    #29791

    Awesome 🙂

    By adding encoding=”default” to got the job done.
    I will do some more testing today and see how everything works.
    I will also test with older version of PD4ML for which we have a license.
    If we decide to upgrade to PD4ML Java v3.9.8b1, I believe we need to purchase the new version again or since we already bought before, we can upgrade for free? I mean I can get the non-demo jar files.

    Thanks a lot.

Viewing 15 posts - 2,941 through 2,955 (of 4,234 total)