Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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?

    #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).

    #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.
    #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

    #36660

    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

    Yes! So when I define a paragraph style in the html document CSS, I will found the same paragraph style in the RTF document stylesheet.

    I’m considering pd4ml for my software ( https://librogamecreator.wordpress.com/ ) and it would be very useful to have such a feature, so writers don’t have to go back to LGC, change CSS, export to RTF, all over again , whenever they need to change each paragraph to a certain style.

    #36663

    Hmm… It is not the feature can be easily implemented. It cannot take the original CSS styles (the used in source HTML/CSS sizes/dimensions change itself depending on conversion scale factor, see https://pd4ml.com/support-topics/pd4ml-v4-programmers-manual/#customizing) and there is no possibility to export the initial original stylesheet rules/properties, aligned depending on conversion params.

    It seems like the only possible way is to go through all the HTML elements and find repeating styles (after the style and scaling is applied); if there are matches, to synthesize a style sheet from them with arbitrary class names.

    I’ve added the feature request for future releases. Not sure if we can address it within the next couple of months

    #36666

    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?

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

You must be logged in to reply to this topic.