admin管理员组

文章数量:1356945

I use PrinceXml for years. I'm trying now to generate thumb indexes. Like old dictionaries used to have where you can see by the side of the book which pages belong to "A", and which to "B" etc.

I can't find any info online to do this.

I tried something hacky, but its not working:

@page {
@right {
content: string(position);
width: 2em;
height: 2em;
background-color: black;
color: white;
font-size: 12pt;
text-align: center;
border-radius: 0 0 0 100%;
position: absolute;
right: 0;
top: string(position);
margin-top:string(position)
}
}

The content is showing correctly "1cm" or "2cm", whatever I put into the position "string". but when used for margin or margin-top it seems to be ignored.

Any other ideas?

I'm also open to use other free/cheap html to pdf converters. But Prince is pretty good till now and I don't use it that often.

Thanks in advance.

本文标签: marginHow to add thumb indexesStack Overflow