Forum Replies Created

Viewing 15 posts - 4,066 through 4,080 (of 4,250 total)
  • Author
    Posts
  • in reply to: Incorrect page number alignment $[page]
    #36610

    Wenn im <style> Bereich eine Formatierung mit

    <%@ taglib uri=”/WEB-INF/tlds/pd4tl.tld” prefix=”pd4tl”%><pd4tl:transform
    screenWidth=”800″
    pageFormat=”A4″
    pageOrientation=”portrait”
    pageInsets=”20,10,10,10,mm”>
    <pd4tl:header
    titleTemplate=”$[title]”
    titleAlignment=”left”
    pageNumberTemplate=”Seite $[page] / $[total]”
    pageNumberAlignment=”right”
    />
    <html>
    <head>
    <title>Gefüllte Auberginenröllchen mit Tomaten-Paprika Ragout</title>
    <style type=”text/css”>
    td {
    text-align: left;
    }
    </style>
    </head>
    <body style=”background-color: lightgray;”>
    <p>
    Hello, World!
    </p>
    </body>
    </html>
    </pd4tl:transform>

    Attachments:
    You must be logged in to view attached files.
    in reply to: Technical questions / Troubleshooting
    #36612

    I am using pd4ml 4.0.16.
    Setting the pageToSkip attribute in JSP has no effect.

    <%@ taglib uri=”/WEB-INF/tlds/pd4tl.tld” prefix=”pd4tl”%><pd4tl:transform
    screenWidth=”800″
    pageFormat=”A4″
    pageOrientation=”portrait”
    pageInsets=”20,10,10,10,mm”>
    <pd4tl:header
    pageNumberTemplate=”$[page] / $[total]”
    pageNumberAlignment=”right”
    initialPageNumber=”1″
    pagesToSkip=”1″
    /><html>
    <body>
    <p>
    Hello, World!
    </p>
    </body>
    </html>
    </pd4tl:transform>

    Attachments:
    You must be logged in to view attached files.
    in reply to: Technical questions / Troubleshooting
    #36614

    I am using the PD4ML 4.0.16.
    If the pd4browser.properties exists when starting the gui version of the PD4ML, there is a Java exception:

    Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/batik/bridge/BridgeException
    at org.zefer.pd4ml.tools.PD4Browser$PD4Converter.super(Unknown Source)
    at org.zefer.pd4ml.tools.PD4Browser$PD4Converter.<init>(Unknown Source)
    at org.zefer.pd4ml.tools.PD4Browser.<init>(Unknown Source)
    at org.zefer.pd4ml.tools.PD4Browser.showGUI(Unknown Source)
    at org.zefer.pd4ml.tools.PD4Browser.main(Unknown Source)
    at com.pd4ml.tools.Pd4Cmd.super(y:2380)
    at com.pd4ml.tools.Pd4Cmd.main(y:734)

    If you delete the pd4browser.properties, the start works fine.
    However, no properties can be changed this way…

    #36615

    Thank you for your response.

    Since last-child selectors are an important part of modernish CSS, we would appreciate if it could be done.

    If PD4ML evaluating the entire document on-the-fly so that it cannot check the neighboring elements readily or drop a flag on previous elements when further siblings are detected?

    Thank you!

    #36617

    The implementation of the feature only outwardly looks simple.

    In order to implement the complex selectors, the CSS runtime is implemented as a specialized state machine: an appearance of a new HTML element in the parsing stream pushes the event to all selectors (they may either refuse the event or to change the entire runtime state). A closing HTML tag pops to previous state. At any document parsing point we can request the runtime to generate a list of properties matches the current CSS runtime state. Actually it is done for every parsed HTML element and it defines the final document style.

    The single-pass approach works well in most cases, but :last-child / :last-of-type creates problems for it because it cannot look ahead and determine if a particular tag is the last one or not. Keep in mind that :last-child / :last-of-type can be combined with other conditions such as P[attr=value]:last-child, so a quick HTML scan by tag name is not enough. Also, the actual “last child” could be at the end of a huge HTML document, megabytes away from the current parse point.

    All of our previous approaches to implementing :last-child / :last-of-type functions resulted in a significant performance degradation, drastic for large HTML and CSS documents. We’ve already tried to fork HTML and CSS parsers to check in idle run whether a particular element is the last one in terms of selector conditions; we tried to clone the CSS state with last=true and last=false and then remove the misguessed state. Both approaches did not match our acceptance criteria from performance perspective.

    We have not exhausted new ideas on how to implement the feature yet, but, I’m afraid, we will be able to return to them only closer to September

    in reply to: Incorrect page number alignment $[page]
    #36618

    The pageNumberTemplate and pageNumberAlignment attributes in the code

    <pd4tl:header titleTemplate=”$[title]” titleAlignment=”left” pageNumberTemplate=”Seite $[page] / $[total]” pageNumberAlignment=”right” />

    are supported for backward compatibility with text-only headers/footers of PD4ML v3. They are converted into HTML table with the simple code:

    style += "font-size: " + fontSize + "px; "; tpl = "<table width=100% border=0 style=\"" + style + "\">\n<tr>\n<td width=33% style=\"" + style + "\">" + left + "</td><td align=center width=33% style=\"" + style + "\">" + center + "</td><td width=34% align=right style=\"" + style + "\">" + right + "</td>\n</tr>\n</table>";

    and obviously affected by TD style

    The best approach would be to use your header markup, not relying on v3 legacy and the auto-generated three column table

    <pd4ml:page.header> ... HTML ... ”$[title]” ... HTML ... Seite $[page] / $[total] ... </pd4ml:page.header>

    But if you need to provide a compatibility to older HTML/JSP templates, you can add the explicit style: pd4ml-page-header TD {text-align: right;}

    And of course, we’ll try to resolve the issue with an ignoring of pageNumberAlignment=”right”

    in reply to: Incorrect page number alignment $[page]
    #36624

    Thank you very much for the useful information!
    Through your presentation of the internals I was able to solve another problem, that I had when I switched from V3 to V4: particularly long titles in the headline were wrapped. So I modified one of your variants for a short-term solution:

    pd4ml-page-header TD:nth-child(1) {
    white-space: nowrap;
    }
    pd4ml-page-header TD:nth-child(3) {
    width: 10%;
    white-space: nowrap;
    text-align: right;
    }

    In the long term, I will gradually change the templates to <pd4ml:page.header>.

    in reply to: Technical questions / Troubleshooting
    #36646

    Hello,
    five years ago I was evaluating pd4ml 3.0.18 and the internal links in an HTML document was not working when exporting in RTF (as in this post: https://pd4ml.com/forums/topic/not-working-internal-hyperlinks-in-rtf-export/ )

    I’ve tried now with the new version, 4.0.17 but it seems to me that the bug is still present and now it does not work even with PDF file output.

    This is the code I used:

    PD4ML pd4ml = new PD4ML(); FileInputStream fis = new FileInputStream(new File("./data/bargle.html")); pd4ml.readHTML(fis); File pdf = File.createTempFile("result", ".rtf"); FileOutputStream fos = new FileOutputStream(pdf); pd4ml.writeRTF(fos, true); pd4ml.writePDF(fos); Desktop.getDesktop().open(pdf);

    There is something to do to fix this problem?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    in reply to: internal links still not working
    #36648

    Ok, I’ve realized where the problem is: empty anchors are removed.
    I can not use

    as an invisible anchor, but I must use

    somestring

    to have the internal link works.

    in reply to: internal links still not working
    #36649

    Hello! As far as I remember, this is only an RTF problem. For PDF output, you can specify empty anchors, but RTF viewers always require that the anchor be assigned to an existing object or piece of content. Creating dummy content (such as whitespace) for empty anchors has an undesirable impact on the resulting document layout

    in reply to: Technical questions / Troubleshooting
    #36650

    Is there a way to keep CSS style defined in the HTML file when exporting in RTF, transformed in a RTF paragraph or character formatting style?

    in reply to: HTML CSS styles into RTF
    #36651

    In most cases, it retains such styles. However, some of the styles simply don’t have RTF equivalents; some require tricky solutions like defining paragraph borders. The RTF format does not directly support paragraph borders, so if it is requested, PD4ML will implicitly convert the paragraph to a table cell (which supports borders).

    in reply to: HTML CSS styles into RTF
    #36652

    I meant a transformation between CSS styles and rich formatting styles, e.g. in the HTML file there is the paragraph style identified by the X class and in the RTF file, among the available styles, there is the X style. Something like this.

    So when I use a certain CSS class in a HTML paragraph I will found the same text paragraph, in the RTF, with the named style imported from CSS.

    Attachments:
    You must be logged in to view attached files.
    in reply to: HTML CSS styles into RTF
    #36654

    Currently all document styles are already applied to RTF elements/content blocks. And you would like to see HTML’s CSS converted to an editable RTF document stylesheet, and if you edit it in MS Word it will impact all relevant RTF content blocks. Right? Please correct if I am wrong

    Or you simply cannot get needed style applied to particular RTF content, while for PDF output it works

    in reply to: Adding more customizability for PDF tooltips.
    #36655

    on the thought of his buddy zhuge qing, zhang chulan and feng baobao came to resolve the case with the help of “anywhere” business enterprise. how does zhang chulan display his competencies to assist the king trap the black hand backstage? what wonderful overall performance will zhuge qing, wang ye and others have? who’re the people who covet the “8 wonders”? “under one guy-becoming a member of the world” may be introducedsoon!
    how to get sponsored for running

Viewing 15 posts - 4,066 through 4,080 (of 4,250 total)