Skip to main content
Known Participant
Dec 6, 2021 8:21 PM UTC
Question

How do I hide an element (draft-comment) in the PDF output

I'm using FrameMaker 2020 (v16.0.2) just long enough to build output templates for the FMPS and AEM XML. I need to be able to hide all <draft-comments> in the PDF output (and eventually all outputs). In our current system, these were automatically hidden in outputs so we've made extensive use of them as notes between authors that are not deleted.

 

I can see that <data> or <data-about> may have been the better choice for this sort of thing, but that ship has sailed. 🙂 Is there any way to hide draft-comments in all outputs? I'm assuming that's handled somewhere in the EDD.FM file. I found where the draft-comments are defined, but I'm not seeing any place obvious to set the output to "hide". Is it in the outputclass setting?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    12 replies

    4everJang
    Legend
    Dec 7, 2021 4:27 PM UTC

    You can use FrameMaker's Filter by Attribute functionality. Open the EDD to find the exact string for class attribute of the draft-comment element. Copy that value, then go back to your DITA document and select View > Filter by Attribute. Add a new expression, select the class attribute and the Equal option, then paste the value. Make sure the expression has NOT before the attribute expression. Select Show All to have the draft comments shown, Show as per Expression to have the draft comments hidden. Producing PDF should work for the currently visible content. I have not tested that but if the hidden content does show up in your PDF that is a bug and should be addressed to the dev team.

    Translate
    4everJang
    Legend
    Dec 7, 2021 4:29 PM UTC

    The name of the expression in the dialog box relates to my first trial to use the outputclass attribute, but that would require you to set that attribute on all existing content, which would be a hassle. So I tried with the class attribute and then forgot to rename the expression. It still works of course but it might be better to choose HideDraftComments or something similar.

    Translate
    4everJang
    Legend
    Dec 9, 2021 8:46 AM UTC

    Do let us know if this worked for you. Marking something as a correct answer makes it show up immediately below the original posted question and helps others to quickly find the solution.

    Translate
    Community Expert
    Dec 7, 2021 7:17 AM UTC

    Hi,

     

    I am not an expert for structured FrameMaker.

    However, what I learned is that you should use attributes to filter what is shown or hidden:

    https://help.adobe.com/en_US/framemaker/using/using-framemaker/user-guide/topic_create-filters.html

     

    It could be that you can use XSLT to change your elements.

     

    Best regards

     

    Winfried

    Translate