-
Notifications
You must be signed in to change notification settings - Fork 24
Writing DocRaptor Compatible CSS
Automated HTML-PDF document conversion on www.paperight.com/server uses DocRaptor to process and convert documents to PDF. The appearance of the output PDF is controlled with CSS. We use a standard style sheet for Paperight editions of books (you can find it on GitHub), but you may need to create a personalized style sheet for specific projects.
There are two resources for doing this:
- DocRaptor Documentation: This is the documentation for using the DocRaptor API, and includes some styling information.
- Prince XML user guide: DocRaptor is built using Prince XML, so the Prince CSS reference is incredibly useful – especially considering they have many built-in functions for elements like page numbering and footnotes.
@page {
size: A4;
margin: 40pt 25pt 20pt 30pt;
}
@page front {
margin: 0;
}
@page main {
@bottom {
content: counter(page)
}
}
front {
margin: 0;
padding: 0;
page: front;
}
.pagenum {
float: right;
color: grey;
}
@page {
@footnotes {
border-top: solid black thin;
padding-top: 8pt;
margin: 12pt
}
}
.fn {
float: footnote;
counter-increment: footnote;
font-size: 87%;
}
.fn::footnote-call {
content: counter (footnote);
font-size: 83%;
vertical-align: super;
line-height: none;
}
The Paperight project is managed by Arthur Attwell at Electric Book Works. Read the Paperight story or visit the blog.
- The publications on the website
- Adding documents to Paperight
- Automated HTML PDF conversion
- Automated PDF PDF conversion
- CSV & Metadata management
- Papercat browsing categories
- Products: Edit products
- Products: Product Ownership
- Scrubbing HTML from epub files
- Working with documents
- What does this website do?
- Introducing the website
- Finding a publication
- Forgotten passwords
- How can I use this website to start and sustain a business?
- How do I change my email address?
- How to buy a book
- How to print marketing posters
- How to register and log in
- How to top up your account
- How to use this service to grow your business
- Is this legal?
- Printing a PDF
- Buying a licence
- Can I be the only outlet to sell books this way in my area?
- Searching
- The publications on the website
- What do Paperight print outs look like?
- Publishers Guide
- Forgotten passwords
- How are publishers paid?
- How do I change my email address?
- How do I get my publications onto Paperight?
- How to register and log in
- What about the publisher's copyright?
- What do Paperight print outs look like?
- What do publishers earn?