The class must be wpptopdfenh, other class names fail. The class name must be evaluated internally as relevant to WPP2PDF, or it may be hard-coded.
Not quite. I think the issue is that this (the custom CSS for the PDF) may be overridden by CSS which has already been applied. For example, I just named the class "hideme" and adjusted the CSS in the plugin settings to:
and this worked fine. However, I could see where re-using an existing class this setting may not take precedence, and where even the !important directive might not work. Still, I think this CSS approach is probably the best one to address your enhancement request vs adding yet another shortcode to (hopefully) achieve the same result. In this case, as long as the site admin decides upon a unique name for this class, the hiding should work consistently. I'm a little bothered by the need to set this in a paragraph tag, and also, it might make more sense to make it more specific (i.e., use an ID instead of a class). So, the following works as well:
<p>This last paragraph contains a disappearing sentence. <span id="hideme">We can generate a PDF of this page by clicking the icon. [wpptopdfenh]</span></p>
using this custom CSS in the plugin settings:
Now, we're no longer slaved to hiding an entire paragraph, so the link/icon and descriptive text may even occur within a paragraph, like so:
<p>This last paragraph contains a disappearing sentence. <span id="hideme">We can generate a PDF of this page by clicking the icon. [wpptopdfenh] </span>This is the last sentence in the closing paragraph, and should be visible in the PDF.</p>
The same test page referenced above now has this content. The granularity of the ID coupled with using a span tag should keep us safe from conflicts in the rest of the content and allow webmasters to use whichever ID they might prefer.