Forum Replies Created

Viewing 15 posts - 1 through 15 (of 1,410 total)
  • Author
    Posts
  • in reply to: Batik implementation
    #30211

    When PD4ML encounters <svg> tag it tries to instantiate BatikSvgCustomTag class. If Batik library is missing it fails and fallbacks to our built-in proprietary SVG renderer.

    No explicit API calls needed to activate it.

    Batik is more strict regarding SVG syntax, so if it starts to panic e.g. because of missing namespace xmlns=”http://www.w3.org/2000/svg&#8221; in <svg> tag – that means Batik is definitely in action.

    You may explicitly disable Batik by
    com.pd4ml.plugins.BatikSvgCustomTag.disable = true;

    • This reply was modified 7 years, 4 months ago by PD4ML.
    • This reply was modified 7 years, 4 months ago by PD4ML.
    in reply to: Batik implementation
    #30209

    Batik requires quite a lot of third-party components to run. Probably some of them are missing in your environment.

    In Maven-driven projects it is sufficient just to add

    <dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-all</artifactId>
    <version>1.9.1</version>
    <type>pom</type>
    </dependency>
    <dependency>
    <groupId>net.sourceforge.jeuclid</groupId>
    <artifactId>jeuclid-mathviewer</artifactId>
    <version>3.1.9</version>
    </dependency>

    I’ve also shown JEuclid MathML dependency above for a case you (or someone else) need to have them both. JEuclid also pulls a lot of additional components and some of them conflict with Batik dependencies. The above version combination is safe and works fine.

    in reply to: Getting underline on top of the page
    #30213

    The issue should be fixed in the recent maintenance builds.

    in reply to: PDF 508 compliance
    #30208

    PD4ML v3 inherits the data from HTML meta info, like

    <meta name="keywords" content="keywords here">
    <meta name="description" content="subject body">

    In PD4ML v4 the feature is in TODO list, but can be added quite swifty by request.

    There is also a possibility to post-process generated PDF with the API calls:

    PdfDocument doc2 = new PdfDocument(new URL("file:o:/work/pdf/doc2.pdf"), null);
    doc2.setAuthor("Author 1");
    doc2.setCreator("Creator 1");
    doc2.setTitle("Title 1");
    doc2.setSubject("Subject 1");
    doc2.setKeywords("Keywords 1");
    ... and save the doc after the changes ...

    in reply to: SVG textpath not rendering correctly
    #30207

    PD4ML v3 includes our simple SVG renderer, which unfortunately does not support text paths.

    PD4ML v4 allows to replace our custom SVG renderer with Batik component. As Batik is very strict to SVG syntax, I had to modify the SVG code to

    <svg width="100" height="50" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
    <text fill="red" font-size="10" font-family="Arial"
    font-weight="400" stroke-opacity="0" stroke-width="0" stroke="#0088cc">
    <textPath cursor="pointer" xlink:href="#5290" id="textSvgjsPolygon1866">IKKS</textPath>
    </text>
    <path id="5290" d="M12.3686093,4.93499861 L12.5442303,19.9111419"></path>
    </svg>

    After that it successfully produced the attached PDF

    in reply to: Bullets not aligned RTL for arabic HTML to RTF
    #30173

    Both versions a planned to be published today.

    PD4ML v4 snapshot (with the feature implemented) is available for download from https://pd4ml.tech/v4/
    PD4ML v4 usage examples: https://github.com/zxfr/pd4ml-examples

    in reply to: Bullets not aligned RTL for arabic HTML to RTF
    #30170

    RTF list bullets issue has been solved in the forthcoming v3.10.9fx3 and v4.0.3

    in reply to: TTF embedding
    #27322

    No it does not solve the problem

    If you are interested to get a support from us, please provide more details about the issue you faced with. There is a variety of reasons why some fonts are not rendered correctly.

    in reply to: Why 97 PPI and not 96 PPI in this lib?
    #30216

    By default PD4ML convert all physical units to screen pixels using 72ppi, after that the entire document content is scaled depending on htmlWidth value (width of virtual HTML renderer frame) and on the chosen target paper format width: htmlWidth is mapped to pageWidth, so the actual scale factor varies and is not bound to 72 or 96 ppi.

    If you prefer to work with physical units, trigger
    pd4ml.protectPhysicalUnitDimensions() – in the case the elements should appear on paper in the originally desired size.

    in reply to: Footer disappears dependent of font size
    #30214

    Hi! The issue should be resolved in actual v3.10.x versions. Please give the most recent v3 version a try or switch to v4.

    in reply to: vertical-alignment
    #30202

    We’ll check what could be done. However a solution is going to be implemented in v3.10.x and v4

    in reply to: Unicode character not displayed, character missing in font
    #30197

    As a feature request it would be nice if pd4ml would fallback to a own font that contains all symbols instead off printing a questionmark. If i’m not mistaken it’s what the browser are already doing.

    The browsers are native application, which have access to all available fonts. Java as a rule has only “proxied” access to the fonts via java.awt.Font object. The object has a lot of useful features, but it does not provide an access to the TTF file itself (we need a physical access to the file tp parse it and partially embed to PDF) – that is why that confusing pd4fonts.properties indexing is needed.

    Well – Java can “guess” that the TTFs are in c:/windows/fonts, but there are a lot of fonts there and parsing of all of them to find the one, which has a desired glyph is a resource and time consuming task.

    A native application has all the needed info easily available and a font substitution tables are tuned for the platform and available fonts. In Java case we need to come up with a general platform independent solution…

    Regarding the original issue: go through the list of available fonts on Win server and check which one contains the glyph – I did so with the standard Character Map application. There are some “glyph-reference” pages in the Internet – probably they refer to popular TTFs, that implement the glyph. After the font is found, explicitly refer it from your HTML/CSS (and make sure it is mapped in pd4fonts.properties). We’ll look for the font also on our side by an opportunity.

    in reply to: nth-last-child
    #30206

    nth-last-child() is unfortunately not supported for the time being. An implementation of the feature would require an extra parsing pass or performance impacting look-ahead logic, even if the CSS property is not used – we are still not sure if it is worthwhile.

    in reply to: vertical-alignment
    #30201

    PD4ML v3.x does not support length values by vertical-align. It should be possible to workaround with position: relative; top: -0.338ex;

    in reply to: Floating elements are reordered
    #30190

    PD4ML v4 implements the float positioning logic as expected: https://github.com/zxfr/pd4ml-examples/

Viewing 15 posts - 1 through 15 (of 1,410 total)