Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27129

    Hi All, I am new to pd4ml and have a requirement to configure duplex printing for the PDF documents that will be generated using PD4ml.

    Use case is as follow:

    – User can select 1 or many HTML fragments (templates) for PDF creation
    – While creating PDF user can identify if duplex (double side) printing is required.
    – If user selects for duplex printing, the generated PDF (combination of all the HTML files should support duplex printing e.g. after first HTML the next HTML should go to next page, so that when printing happens the second HTML fragment starts from new page)

    I have browsed online help and found PD4ML defines special versions of render() methods, which accept multiple HTML documents for a conversion into a single PDF: render(URL[],…) and render(StringReader[],…). The approach will give you more predictable result (as there is no CSS style inter-mixes, could happen by document merge), but has a limitation: each source HTML document starts a new PDF page; there is no way to continue half-blank page with a new doc.

    Does anyone has working Java example?

    #30002

    > each source HTML document starts a new PDF page; there is no way to continue half-blank page with a new doc.

    Yes, you are right. There are some tech reasons for that in the current v3.x. If you are sure, there is no style intermixes, try to merge the HTML portions to a single HTML doc before it is passed to PD4ML. Just take into account: a closing or tag stops further HTML parsing, so it makes sense to remove any instances of the closing tags if they are not at the end of the resulting HTML.

    Proprietary could help you to prepare a document for duplex printing. The page break tag inserts a blank page if needed to fulfill the “next” condition.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.