Forum News

Prince 8.0 beta 1 released

mikeday
Today are thrilled to announce the first beta release of Prince 8.0, now with support for JavaScript!

You can use the --javascript command-line option to enable <script> elements, or the --script=FILE option to apply external script files.

Scripts can inspect and modify the document prior to conversion, allowing them to add or remove elements and attributes, sort table rows, process text with regular expressions, and apply the full power of the JavaScript language to transform the document as required.

See printingcss.com for examples showing how to automatically generate a table of contents and index by scanning the document content with JavaScript.

jQuery and some other popular scripts will now work in Prince, but other scripts may require modifications if they use JavaScript or DOM features that we do not yet support. As always, if something doesn't work, just let us know.

Besides JavaScript, this beta includes dozens of new features, bug fixes, and improvements too wide ranging list here. The roadmap has more details, and full release notes will be available when we make the full release. Rest assured that as always, this new version of Prince should run faster and work better than ever before. :D
yet
Awesome - especially the Javascript API looks very powerful - checking my options for the integration with Produce & Publish now.
mikkelricky
It's really cool that Prince now supports Javascript. Great work!

A question comes to my mind: Is there a way to signal to Prince that all Javascript processing has completed? Or does Prince rely on a fixed timeout for the Javascript processing (like DocRaptor does [http://docraptor.com/documentation#api_javascript])?

I'm thinking about something along the lines of

<script>
var process = function() {
...
«some DOM processing that takes a very, very long time»
...
prince.DOMIsReady(); // Tell Prince that DOM processing has completed
}
</script>


Best regards,
Mikkel
mikeday
At the moment Prince just waits for all the JavaScript to finish, there is no timeout yet.
yet
Will there be an paid upgrade from 7.X to 8.X?
mikeday
If you have purchased a license within the past 12 months, it will work with 8.0 automatically. Otherwise, you can purchase additional upgrades or stick with 7.1.
dauwhe
Can't wait to get information from the rendering process! In the meantime I finally got the JavaScript to do something useful, creating generated content with some internal styling (like a chapter number where the word "Chapter" is in a different font or size than the number itself).

Dave
Nicholas
Just to clarify, I've been playing around with it, and it seems that the Javascript runs entirely before rendering. Is that as it is meant to be? If so, then it is a cute feature to add, but doesn't allow us to actually do anything new. My existing workflow is very XSLT heavy, and I rearrange my indices, etc, and do some clever manipulations using code filched from DocBook-XSL. The only use-case I can think of to justify using Javascript rather than the more flexible XPath/XSLT syntax is having dynamic access to the *rendered* document.

(I have been trying to access scroll* and offset* properties on elements, which is pretty much the only way to find out, say, how many lines a paragraph takes up when rendered.)
mikeday
Yes, access to the rendered document will be awesome, but we have not finished it yet. :)
dauwhe
Until there's more documentation about the JavaScript support, I'm finding the error logs useful:

Wed Apr 13 00:07:36 2011: warning: innerHTML is not yet supported

Dave
mweric
Is support for FreeBSD discontinued? I'd love to upgrade to FreeBSD or even buy a new license if OpenBSD were supported, too!
mikeday
Any particular versions of FreeBSD or OpenBSD you would prefer?
mweric
OpenBSD 4.9 is the current version.

For FreeBSD, compiling under 8.1 should give compatability with 8.2 as well. The FreeBSD packages you've done in the past have worked great even across major versions of FreeBSD.
Anonymous
We just recently purchased a server license for Prince 7.1 (thanks Michael for all the help you have given us). We will want to upgrade to 8 when it gets out of beta. Is there anywhere where we can sign up fr information about that, or should we just periodically check the website.

Thanks,

Matt
mikeday
On the News forum there is a "Subscribe forum" link that should send you email when new items are posted, such as release announcements.
henning
Hi, do you have a rough idea when Prince 8.0 will be released?

Thanks,

Henning
mikeday
Soon, there are only a few minor issues remaining on the roadmap.
StoneCypher
When you're done removing the above post as porn spam, would you please enable JS from the GUI?

Do non-server customers get the command-line version?

Thanks much.

John Haugeland is http://fullof.bs/

pronik
Is there a possibility you could provide SuSE Enterprise Server 64-bit RPMs for 8.0?
mikeday
We will do our best to provide more 64-bit builds. Have you tried the CentOS 64-bit package on SuSE?
pronik
Yes, but it requires another .so versions of OpenSSL and cURL. So, not quite compatible, I'm afraid. The 32-bit OpenSuSE RPM worked with additional 32-bit packages, but our admins would like to have a clean 64-bit package.
mikeday
I'm happy to say that we will have a 64-bit RPM for OpenSUSE 11, available soon.
pronik
"mikeday" wrote:
I'm happy to say that we will have a 64-bit RPM for OpenSUSE 11, available soon.


Thank you, looking forward to it!
henning
Hi, do you have a release date for Prince 8.0?

Thanks!

Henning
mikeday
The packages are ready, so at this point we want to release it by the end of the week, whether the website is ready or not. :)
mikeday
And now it's out! The website is still being polished, but the Prince 8.0 packages are available for download.
kevinmusker
Is there any news on the FreeBSD packages?

Referring back to the previous replies about FreeBSD, 8.1 would work for us.

Thanks.
mikeday
When we release Prince 8.1 it will include packages for FreeBSD 8.2. There are some pre-release packages available now:
prince-8.1-pre1-freebsd82.tar.gz
prince-8.1-pre1-freebsd82-static.tar.gz
nick_
Hi,

We deploy on FreeBSD 7.x (both amd64/i386) - please could we have builds for Prince 8.0 or 8.1 if it's stable...

Thanks,
mikeday
FreeBSD 8.2 is all we've got at the moment, do these builds work for you? I would hope that at least the statically linked package would work. Supporting every version of every operating system ever released becomes quite time consuming. :)
nick_
mikeday wrote:
FreeBSD 8.2 is all we've got at the moment, do these builds work for you? I would hope that at least the statically linked package would work. Supporting every version of every operating system ever released becomes quite time consuming. :)


Hi Mike,

The static version does appear to work on our 7.x boxes, so all is ok. We'll be moving to 8.x in the coming months anyway.

Thanks again.