Forum Replies Created

Viewing 15 posts - 286 through 300 (of 583 total)
  • Author
    Posts
  • in reply to: loading verdana and georgia ttf not working
    #28836

    following your advices , logs show us the font was not read,the font is loaded when the “font-family” property is read in our css, so we had fix our problem.

    Thanks for answer.

    in reply to: HTML tags from JSF written to pdf file
    #28215

    I want to render html tags in pdf using jsf.
    can any one provide the solution for this?

    in reply to: Newbie question: How to page break
    #27866

    I dint get one point in above query , if you wantto export data to PDF , why do you wantt o render it as HTML(or any other presentation file you are using).

    Just put your HTML code generated in a StringBuffer and pass it to render() method of PD4ML class. The BYTEOUTPUTARRAYSTREAM recieved from this method can be passed to OUTPUTSTREAM and your PDF will be downloaded.

    in reply to: pd4ml https image urls
    #28166

    Hi,

    I’m having the same issue here and I’m not restarting the JVM.
    Code is very simple, maybe cache is not reused if different PD4ML objects are created?

    public static void convert(String html, ByteArrayOutputStream baos, ServletContext servletContext, String baseUrl)
    throws InvalidParameterException, IOException {
    try {
    if (html != null && html.length() > 0) {
    PD4ML pd4ml = new PD4ML();
    
    pd4ml.enableDebugInfo();
    
    pd4ml.setPageSize(LANDSCAPE_VALUE ? pd4ml.changePageOrientation(FORMAT) : FORMAT);
    
    if ("mm".equals(UNITS_VALUE)) {
    pd4ml.setPageInsetsMM(new Insets(TOP_VALUE, LEFT_VALUE, BOTTOM_VALUE, RIGHT_VALUE));
    } else {
    pd4ml.setPageInsets(new Insets(TOP_VALUE, LEFT_VALUE, BOTTOM_VALUE, RIGHT_VALUE));
    }
    
    pd4ml.setHtmlWidth(USER_SPACE_WIDTH);
    pd4ml.render(new StringReader(html), baos, new java.net.URL(baseUrl));
    }
    } catch (InvalidParameterException e) {
    logger.error("Error rendering PDF", e);
    } catch (IOException e) {
    logger.error("Error rendering PDF", e);
    }
    }

    Thanks,

    in reply to: IE8 PDF wont download
    #29125

    @PD4ML wrote:

    It looks like the problem is caused by a caching of documents, downloaded by HTTPS. Please correct if I am wrong.
    It was a known issue of older PD4ML JSP taglib versions, until we found a safe HTTP header directives set.

    Currently PD4ML taglib sets only the following HTTP cache control directives:

    ((HttpServletResponse) sr).setHeader("Pragma", "cache");
    ((HttpServletResponse) sr).setHeader("Expires", "0");
    ((HttpServletResponse) sr).setHeader("Cache-control", "private");

    In your case there are some other cache controls (including conflicting with the above) – probably the hosting application is configured to add them to each reply. Try to switch it off for PDF generating JSPs.

    PD4ML, tankyou ! Works like a charm =)

    I also have add cache-control: no-store, no-cache. See lines bellow:

    response.setHeader("Pragma", "cache");
    response.setHeader("Expires", "0");
    response.setHeader("Cache-control", "private");
    response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");

    Again, tankyou!

    in reply to: Background-color: transparent not rendering correctly
    #29126

    Experiencing the exact same issue here – code with background-color:transparent worked with fx6 release, but generates a black box with fx7. Will watch this space for an update.

    in reply to: css @media parsing
    #28342

    This is still an issue (PD4ML Pro 3.8.0fx6), and it seems that the CSS parser doesn’t like to find “(” as part of an @media declaration; i.e.

    @media (max-width: 899px) {

    This produces the error:

    org.w3c.css.sac.CSSException: Encountered "(" at line 882, column 8.
    Was expecting one of:
    <S> ...
    "not" ...
    "only" ...
    <IDENT> ...
    
    at com.steadystate.css.parser.SACParser.parseStyleSheet(SACParser.java:60)
    at org.zefer.html.doc.css.d.Ò00000(Unknown Source)
    at org.zefer.html.doc.css.c.o00000(Unknown Source)
    at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
    at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    I understand if the parser won’t include media queries, but it’d be nice if it could just ignore them, rather than throwing the exception and failing. As it is, you can’t use a CSS if it has media queries at all.

    in reply to: Google App Engine
    #28428

    thanq.

    in reply to: Problem rendering html to pdf
    #29094

    There are some cells (or cell content) which stretch the columns more than expected. I would try to reduce font size for the block sells (“Human Resources Sync Change”), or any explicitly given content width of nested elements (if any).

    A more tricky, but probably more robust workaround would be to change actual

    <td><img alt="Image from the forum topic: Problem rendering html to pdf" src="http://localhost:8080/Troll90/images/GridSize%205/hline.gif"></td>

    to

    <td style="background: url(https://localhost:8080/Troll90/images/GridSize%205/hline.gif)"> </td>

    in reply to: How to identify fonts in other language?
    #28193

    When specified TTF font has not all glyphs, to show a particular text, PD4ML tries to find a substitution font for it. You may find the substitution tables by the link:

    https://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm

    So in theory when all of the listed fonts are mapped in pd4font.property, it should be able to show virtually any language.

    in reply to: Problem rendering html to pdf
    #29092

    It is difficult to analyze the HTML without the images and other resources.

    as I see the page layout is build as a big table with graphic elements placed to cells. As such layout very sensitive to cell content, it could be a cell from the same column, but from a different row stretches the entire column and causes the gaps.

    I would recommend to temporarily enable the main table borders:

    <div id="PageDIV" name="PageDIV" style="position:relative;overflow:hidden;">
    <span id="PageSPAN" name="PageSPAN" style="text-align:center;position:relative;margin-right:auto;margin-left:auto;height:auto;overflow:hidden; display: block;">
    <table border="1" cellpadding="0" cellspacing="0" style="position:relative" width="1185">

    and to visually check what can stretch the column (or to make sure that is not a column width problem).

    in reply to: Barcode font problem
    #29087

    As I see you currently use v370fx2. Since the version we improved TTF embedding logic. Please give a try to the most recent v380fx6. Is the problem still there?

    in reply to: Anybody had problems with PD4ML on Lion for Mac?
    #28975

    Thank you for sharing the info with us!

    in reply to: nullPointerException when rendering page
    #27623

    Weblogic + HTTPS is always a problem, as Weblogic provides its own SSL layer, not implementing Java’s standard SSL interfaces. Usually that casues ClassCastException, however the problem can expose itself different ways.

    Because of a need to include proprietary SSL interfaces (WebSphere is another problem platform, from the perspective) – we do not claim, that PD4ML supports HTTPS. It may work with HTTPS, but it is not guaranteed.

    I am not sure, the actual problem is SSL-specific. There are some nuances in HTTP session handling and JSP tag instances reusing under Weblogic. If you’d like to debug – we are ready to provide you with PD4ML taglib sources. Please contact support pd4ml com.

    in reply to: Images in different contexts not rendered
    #29086

    PD4ML offers 2 API methods, which help to resolve web paths and load the resources: pd4ml.useServletContext() and pd4ml.useHttpRequest().

    (PD4ML taglib implicitly triggers pd4ml.useServletContext())

    If none of the methods help, the only solution is to extend the URIs from /Common/Images/icon_delete.gif to http://localhost/Common/Images/icon_delete.gif.

    In JSP context there is a special PD4ML custom tag intended for automatic extending of local to full URLs:
    https://pd4ml.com/taglib/pd4ml/fix_base_path.html

Viewing 15 posts - 286 through 300 (of 583 total)