Forum Feature requests

Show bookmark panel on open

Anonymous
If there are bookmarks in the target PDF file, it would be great if the bookmark panel in Adobe Acrobat would open automatically (or at least be able to choose the behaviour before generating a PDF). -jc
mikeday
That is an interesting feature request, as a property to control the default behaviour of the bookmark panel is really a document or PDF level option rather than an element or page level property.

Originally we only had two document/PDF level options:

--no-embed-fonts, to disable font embedding in the PDF file, which is sometimes desirable to save space when only standard fonts are being used.
--no-compress, to disable compression of the PDF file (a rare choice, only really useful for debugging).

A number of new document/PDF options have been added in Prince 5.0 to control PDF security, such as <b>--encrypt</b>, <b>--disallow-print</b> and so on.

Currently, all of these options are supported as command line arguments to Prince, rather than CSS properties. However, it might be convenient to allow them to be grouped in a Prince-specific CSS rule such as:

@document {
    bookmark-panel: show;
    encrypt: yes;
    disallow: print copy annotate;
    embed-fonts: yes;
}


That said, I imagine that the control over bookmark panel display is only one of a range of such potential properties; are there any other document/PDF level properties that you would find useful?
JohnClarke
I would agree that CSS control would be helpful. However, if ever there is a DLL-type interface, I would suggest that properties on the prince object would also be appropriate.

John Clarke
Cornerstone Systems Northwest Inc.

Ben
Yes, I think bookmark properties would be very useful. Both chapter links and internal links would be awesome. But this seems like it might be outside of the scope of Prince, so I would be suprised if this ever got implemented. But as long as I'm wishing...
mikeday
John, that's a good point about properties. Currently we are developing a plain DLL interface and a COM object interface for Prince on Windows; I'll let you know when the first version is ready to try :)

Ben, Prince 5.0 can already do internal links and PDF bookmarks, I'll explain how they work in the other thread where you asked about them.
JohnClarke
Hi Mike,
Is this (bookmark-panel: show;) a feature now? I can't seem to find the documentation for it. Thanks.
-John

mikeday wrote:
Currently, all of these options are supported as command line arguments to Prince, rather than CSS properties. However, it might be convenient to allow them to be grouped in a Prince-specific CSS rule such as:

@document {
    bookmark-panel: show;
    encrypt: yes;
    disallow: print copy annotate;
    embed-fonts: yes;
}

John Clarke
Cornerstone Systems Northwest Inc.

JohnClarke
Hi Michael,

Perhaps this has already been mentioned in another post, but I'd thought I'd raise it here too. Not only would be handy to have the bookmark panel open/close but it would be handy to indicate which bookmarks are open/closed with something like:

.openbookmarks {
prince-bookmark-state: open; 
}
.closedbookmarks {
prince-bookmark-state: closed; 
}


I find that I'm using the (really cool) bookmark feature a lot, and thus have many bookmarks per document. Having them all open when the user makes it to the bookmark panel, is a bit overwhelming. That is the usecase for this feature request.

-John

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Hi John,

We have implemented the prince-bookmark-state property and you will be able to try it out in the next alpha version of Prince, which is due to be released hopefully later this week.

Best regards,

Michael
JohnClarke
Michael,

Excellent. I look forward to using it.

-John

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Hi John,

The new alpha version of Prince is ready and includes this feature; please give it a try and let us know how it goes! :)

Michael
JohnClarke
Hi Michael,

So far it's working with my documents. Looks good!

What is the syntax for having the entire panel open or closed? I think this was already a feature but I can't seem to find the documentation for it.

-John

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Hi John,

There is no property for controlling the entire bookmark panel yet, as we don't have anywhere for it to go. The property would need to apply to the entire PDF output rather than just a single element, and we don't really have any context for that at this time. We'll see what we can do. :)

Best regards,

Michael
JohnClarke
Hi Michael,
The bookmark selector is a great feature added to the Prince 6 alphas. It does exactly what we need it to do.

Was there (by any chance) any work done to have the entire bookmark panel display when the PDF is first opened? Because it is a document wide attribute, I wonder if we could just add a magic string to existing PDFs to make this happen.

Suggestions?

ADDED -- more of the same (but for us the bookmark panel remains a priority):
* Show. Sets which panel is displayed by default. The Bookmarks panel, Pages panel, or no panel.
* Go to Page. Specifies at which page to open the PDF.
* Layout. Sets the page mode to open with, single-page, continuous-page or Continuous-facing page. Single-page treats the document as though it were a series of pages that you move through. The other modes work more like the document is one large page that you scroll through (like a web page).
* Zoom. Sets the default magnification level. Choose from zoom percentage, or choose from the Fit Page, Fit Width and Fit Height settings.
* Hide Menu Bar. Stops the menu (the Menu Bar) from appearing.
* Hide Toolbar. Stops all toolbars from appearing.
* Hide Window Controls. Stops the left panel and status bar from appearing.

-John

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
For these PDF-specific styling properties it seems that we would need to add a new kind of CSS at-rule, perhaps something like this:
@prince-pdf {
    bookmark-panel: open;
    start-page: 3;
    ...
}
JohnClarke
That looks fine. Is this CSS-rule addition in the works?

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Well, it has been added to the roadmap. :)
mikeday
Today we have released Prince 6.0 rev 5, which at long last adds support for this feature:
@prince-pdf {
    prince-pdf-page-mode: show-bookmarks
}
alexmac
Is there any way that we can control whether the bookmarks are open or collapsed by default? I know that this can be done in PDF, but I can't see anything about it in the prince docs.

something like the following is what I'd like:

@prince-pdf { 
    prince-pdf-page-mode: show-bookmarks
    prince-pdf-bookmark-mode: start-collapsed 
}
mikeday
Try the bookmark-state property, which applies to individual bookmarks. You can use this to close the top-level bookmark (eg. on the h1 element in HTML).
alexmac
ahh that works fine, I didn't think to look in the index of properties, I was just looking at the page about PDF bookmarks (http://www.princexml.com/doc/6.0/pdf-bookmarks/) and it didn't mention that property.
mikeday
Oops, we'll have to update the documentation. :)