<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Jane,</p>
<p>just a guess: The new element is "in memory only" when you first
drag it on the page. It gets persisted when you edited it. The
<cms:pdf> might have problems with that situation. You could
try to use something like:</p>
<p><c:if test="${not cms.inMemoryOnly}"></p>
<div> <c:set
var="PDF">/system/modules/myModule/elements/PDF-formatter.jsp</c:set><span style="white-space:pre"> </span></div>
<div> <a href="<cms:pdf format='${PDF}'
content='${content.filename}' locale='${cms.locale}' />"
target="pdf" class="btn">PDF</a></div>
<p></c:if></p>
<p>That would render the link only if the element is not "in memory
only".</p>
<p>Best, Daniel.<br>
</p>
<br>
<div class="moz-cite-prefix">Am 18.05.2017 um 15:40 schrieb Jane
Austen Stardust:<br>
</div>
<blockquote type="cite"
cite="mid:CAJtjO_FBdz8+6xZaJkKJRBhvx3na0xcSQayMSpfzHgB_cw-g-g@mail.gmail.com">
<div dir="ltr"><br>
<div>Hello!</div>
<div><br>
</div>
<div>I'm using OpenCms 10.5.1. <br>
</div>
<div><br>
</div>
<div>I can't add a content element by the page editor add wizard
if it contains the PDF creation button script.</div>
<div><br>
</div>
<div>But I can create it in the Explorer and then drag it from
the page editor add wizard, and works correctly.</div>
<div><br>
</div>
<div>Here is the PDF creation button script that I use:<br>
</div>
<div><br>
</div>
<div><c:set
var="PDF">/system/modules/myModule/elements/PDF-formatter.jsp</c:set><span style="white-space:pre"> </span></div>
<div>
<div><a href="<cms:pdf format='${PDF}'
content='${content.filename}' locale='${cms.locale}' />"
target="pdf" class="btn">PDF</a></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">What's wrong? </span></div>
</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">
</span></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">Thanks a lot!</span></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre">JA</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Kind Regards,
Daniel.
-------------------
Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a> </pre>
</body>
</html>