# PDF Export URL problem (Bug?)

**URL:** <https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854>\
**Category:** Help / Discuss\
**Tags:** pdf, myxwiki\
**Created:** [August 17, 2022, 12:58pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854 "2022-08-17T12:58:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lanedsmu](https://forum.xwiki.org/user_avatar/forum.xwiki.org/lanedsmu/32/4237_2.png) [@lanedsmu](https://forum.xwiki.org/u/lanedsmu)\
**Post date:** [August 17, 2022, 12:58pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/1 "2022-08-17T12:58:46Z")

</div>

Hi all,

In using a [myxwiki.org](http://myxwiki.org) site, I noticed what I believe is a change in behavior, and I suspect it may be a bug. It is, at least, something that isn’t working for me currently.

In the past, when we’d click the three-dot menu and export to PDF, we’d get a URL like this:  
[https://subwiki.myxwiki.org/xwiki/bin/export/pageTree1/PageName/WebHome?format=pdf&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0](https://subwiki.myxwiki.org/xwiki/bin/export/pageTree1/PageName/WebHome?format=pdf&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0)

That worked, and still works quite well.

Now, however, when we click on PDF export, this is the URL that gets generated (and never returns a response):  
[https://subwiki.myxwiki.org/xwiki/bin/export/pageTree1/PageName/?format=html-print&xpage=get&outputSyntax=plain&async=true&sheet=XWiki.PDFExport.Sheet&format=pdf&template=XWiki.PDFExport.Template&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0](https://subwiki.myxwiki.org/xwiki/bin/export/pageTree1/PageName/?format=html-print&xpage=get&outputSyntax=plain&async=true&sheet=XWiki.PDFExport.Sheet&format=pdf&template=XWiki.PDFExport.Template&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0)

I’ve made the above URLs more generic; if it helps, here’s an actual URL:  
[https://lhhspitpops.myxwiki.org/xwiki/bin/export/Contests/Lone%20Star%20Classic%20Drumline/?format=html-print&xpage=get&outputSyntax=plain&async=true&sheet=XWiki.PDFExport.Sheet&format=pdf&template=XWiki.PDFExport.Template&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0](https://lhhspitpops.myxwiki.org/xwiki/bin/export/Contests/Lone%20Star%20Classic%20Drumline/?format=html-print&xpage=get&outputSyntax=plain&async=true&sheet=XWiki.PDFExport.Sheet&format=pdf&template=XWiki.PDFExport.Template&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0)

Is this an expected URL change? If so, is there something we need to do in configuring the wiki to make it work?

Thanks much! -Lane

---

<div class="post-metadata">

**Author:** ![lanedsmu](https://forum.xwiki.org/user_avatar/forum.xwiki.org/lanedsmu/32/4237_2.png) [@lanedsmu](https://forum.xwiki.org/u/lanedsmu)\
**Post date:** [August 17, 2022, 1:08pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/2 "2022-08-17T13:08:19Z")

</div>

I did see that the PDF Export application needed to be upgraded, which I did. That doesn’t change the behavior. Browser network logs show the following:

jquery.min.js?r=1:2 GET [https://lhhspitpops.myxwiki.org/xwiki/bin/export/Venues/Coppel%20Buddy%20Ec…late&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0&](https://lhhspitpops.myxwiki.org/xwiki/bin/export/Venues/Coppel%20Buddy%20Ec%E2%80%A6late&pdfcover=0&pdftoc=0&pdfheader=0&pdffooter=0&comments=0&attachments=0&) 403

| | (anonymous) | @ | jquery.min.js?r=1:2 |
| --- | --- | --- | --- |
| | He | @ | jquery.min.js?r=1:2 |
| | append | @ | jquery.min.js?r=1:2 |
| | S.fn. | @ | jquery.min.js?r=1:2 |
| | (anonymous) | @ | WebHome?minify=false…&docVersion=2.1:128 |
| | n | @ | WebHome?minify=false…n&docVersion=2.1:98 |
| | (anonymous) | @ | WebHome?minify=false…&docVersion=2.1:140 |
| | dispatch | @ | jquery.min.js?r=1:2 |
| | v.handle | @ | jquery.min.js?r=1:2 |

WebHome?minify=false…&docVersion=2.1:106 Uncaught TypeError: h[0].contentWindow.require is not a function at HTMLIFrameElement. (WebHome?minify=false…cVersion=2.1:106:33) at HTMLIFrameElement.dispatch (jquery.min.js?r=1:2:43064) at v.handle (jquery.min.js?r=1:2:41048)

| | (anonymous) | @ | WebHome?minify=false…&docVersion=2.1:106 |
| --- | --- | --- | --- |
| | dispatch | @ | jquery.min.js?r=1:2 |
| | v.handle | @ | jquery.min.js?r=1:2 |
| | load (async) | | |
| | add | @ | jquery.min.js?r=1:2 |
| | s.event.add | @ | jquery-migrate.min.js?r=1:2 |
| | (anonymous) | @ | jquery.min.js?r=1:2 |
| | each | @ | jquery.min.js?r=1:2 |
| | each | @ | jquery.min.js?r=1:2 |
| | Ee | @ | jquery.min.js?r=1:2 |
| | on | @ | jquery.min.js?r=1:2 |
| | (anonymous) | @ | WebHome?minify=false…&docVersion=2.1:105 |
| | n | @ | WebHome?minify=false…n&docVersion=2.1:98 |
| | (anonymous) | @ | WebHome?minify=false…&docVersion=2.1:140 |
| | dispatch | @ | jquery.min.js?r=1:2 |
| | v.handle | @ | jquery.min.js?r=1:2 |

---

<div class="post-metadata">

**Author:** ![surli](https://forum.xwiki.org/user_avatar/forum.xwiki.org/surli/32/2687_2.png) [@surli](https://forum.xwiki.org/u/surli)\
**Post date:** [August 18, 2022, 8:57am UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/3 "2022-08-18T08:57:38Z")

</div>

Hi,

> [@lanedsmu](#):
>
> Is this an expected URL change? If so, is there something we need to do in configuring the wiki to make it work?

So the fact that the URL changed might be expected since we worked on the new PDF Export Application as you have noticed. It’s more likely related to it. @mflorea would know more on this.  
Now you shouldn’t have anything to do for it to be working, so it’s sounds like you’re experiencing some kind of regression that is definitely not expected. Could you open a ticket for it on [https://jira.xwiki.org](https://jira.xwiki.org)?

---

<div class="post-metadata">

**Author:** ![lanedsmu](https://forum.xwiki.org/user_avatar/forum.xwiki.org/lanedsmu/32/4237_2.png) [@lanedsmu](https://forum.xwiki.org/u/lanedsmu)\
**Post date:** [August 18, 2022, 11:41am UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/4 "2022-08-18T11:41:56Z")

</div>

Done. [Loading...](https://jira.xwiki.org/browse/XWIKI-20076)

Thanks much! -L

---

<div class="post-metadata">

**Author:** ![mflorea](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mflorea/32/49_2.png) [@mflorea](https://forum.xwiki.org/u/mflorea)\
**Post date:** [August 30, 2022, 1:23pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/5 "2022-08-30T13:23:52Z")

</div>

> [@lanedsmu](#):
>
> I did see that the PDF Export application needed to be upgraded, which I did.

You didn’t upgrade the PDF Export Application because it can’t be upgraded from your subwiki:

> Extension [org.xwiki.platform:xwiki-platform-export-pdf-default/14.6] is not allowed on namespace [wiki:lhhspitpops]. Allowed namespaces are: [{root}]

So ATM you have PDF Export Application 14.4 running on XWiki 14.6 (available [myxwiki.org](http://myxwiki.org)) and they are not compatible. You need PDF Export Application 14.6 but you can’t upgrade because between 14.4 and 14.6 we added a module (support for Docker-based export) that needs to be installed on root and this cannot be done from a subwiki. It has to be done from the main wiki. But installing on the main wiki means that all the users (all subwikis) will get the new client-side PDF export (instead of the old FOP-based PDF export) which is not right because it’s still experimental.

If you don’t need client-side PDF generation then you should simply uninstall the PDF Export Application and use the old PDF export.

If you need the client-side PDF generation, because your pages has dynamic content added through JavaScript, then there’s no easy solution ATM because first we need to fix [XWIKI-19917](https://jira.xwiki.org/browse/XWIKI-19917) (so that we don’t rely on Docker by default, otherwise we need to setup Docker on [myxwiki.org](http://myxwiki.org), and so that you can enable / disable the new PDF export by wiki, ATM it’s only for the entire XWiki instance).

---

<div class="post-metadata">

**Author:** ![lanedsmu](https://forum.xwiki.org/user_avatar/forum.xwiki.org/lanedsmu/32/4237_2.png) [@lanedsmu](https://forum.xwiki.org/u/lanedsmu)\
**Post date:** [August 30, 2022, 1:43pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/6 "2022-08-30T13:43:39Z")

</div>

Ah, that’s good info; thanks for the clarification. We’ve removed that application, and we’ll watch for changes on those tickets.

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [August 30, 2022, 1:45pm UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/7 "2022-08-30T13:45:16Z")

</div>

> [@mflorea](#):
>
> we need to setup Docker on [myxwiki.org](http://myxwiki.org)

Note that this is done actually.

---

<div class="post-metadata">

**Author:** ![mflorea](https://forum.xwiki.org/user_avatar/forum.xwiki.org/mflorea/32/49_2.png) [@mflorea](https://forum.xwiki.org/u/mflorea)\
**Post date:** [August 31, 2022, 9:09am UTC](https://forum.xwiki.org/t/pdf-export-url-problem-bug/10854/8 "2022-08-31T09:09:22Z")

</div>

> [@tmortagne](#):
>
> Note that this is done actually.

If that is the case then we could install `org.xwiki.platform:xwiki-platform-export-pdf-default/14.6` on root from the main wiki. This won’t enable the new PDF export for all subwikis, but it will allow a subwiki admin to install (or upgrade) the UI for the new PDF export. But still, the config will be for the entire instance for now.
