HTML to PDF / DOCX / RTF Java converter library Forums PD4ML Forums Technical questions / Troubleshooting PD4ML_DOCUMENT_VIEW_MODE (OneColumn) is not working on 4.0.13fx6

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #35998

    Hi,
    Greetings. Hope you are well! I am using v4.0.13fx6 and noticed that PD4ML_DOCUMENT_VIEW_MODE is not working. When i open the pdf that is getting generated, i can only see it as set to 70.4% instead of “Fit to width”, this was all working fine when i was on v3.Can you please let me know if that fix is in this v4.0.13fx6?

    Below is the code i am using

    String PD4ML_DOCUMENT_VIEW_MODE ="pd4ml.document.view.mode"; //oLog.infoForced("PD4ML_DOCUMENT_VIEW_MODE"+PD4ML_DOCUMENT_VIEW_MODE); org.zefer.pd4ml.PD4ML pd4ml = new org.zefer.pd4ml.PD4ML(); com.pd4ml.PD4ML pd4mlNew = new com.pd4ml.PD4ML(); java.awt.Insets margins = new java.awt.Insets(30,25,30,25); // Add letter border (top, left, bottom, right) pd4ml.setPageInsetsMM(margins); pd4ml.debug("true"); pd4ml.enableDebugInfo(); pd4ml.setPageSize(org.zefer.pd4ml.PD4Constants.A4); pd4ml.protectPhysicalUnitDimensions(); pd4ml.interpolateImages(true); java.util.Map m = new java.util.HashMap(); //m.put(org.zefer.pd4ml.PD4Constants.PD4ML_ABSOLUTE_ADDRESS_SPACE, "document"); //m.put(org.zefer.pd4ml.PD4Constants.PD4ML_DOCUMENT_VIEW_MODE,"SinglePage"); pd4ml.setDynamicParams(m); //pd4mlNew.setDynamicData(m); pd4ml.pd4mlNew.setParam(PD4ML_DOCUMENT_VIEW_MODE,"OneColumn"); java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); org.zefer.pd4ml.PD4PageMark footer = new org.zefer.pd4ml.PD4PageMark(); footer.setPageNumberTemplate("$[page] of $[total]"); footer.setPageNumberAlignment(org.zefer.pd4ml.PD4PageMark.RIGHT_ALIGN); footer.setColor(new java.awt.Color(0x303030)); footer.setInitialPageNumber(1); footer.setPagesToSkip(0); footer.setFontSize(11); footer.setAreaHeight(20); footer.setFont(new java.awt.Font("Times-Roman",0,11)); //footer.setFont(new java.awt.Font("Times-Roman",java.awt.Font.BOLD | java.awt.Font.ITALIC,11)); pd4ml.setPageFooter(footer); pd4ml.render(new java.io.StringReader(HTMLStream), baos); baos.close(); return baos.toByteArray();

    Regards,
    Bharat

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.