Upgrade to Pressbooks 3.9.8.1 results in failed exports and errors on books with Custom CSS

Greetings:

Our upgrade to Pressbooks 3.9.8.1 results in failed exports and errors on books with Custom CSS.

Sorry for the length of this post, but I figured it would be helpful to include examples of pdf export error messages and Custom CSS associated with each pdf.

Prince PDF export error example 1:

Array

(

[time] => Tue Apr 18 15:17:12 2017

[user] => genxmlcreator

[site_url] => https://milnepublishing.geneseo.edu/the-evolution-of-our-tribe-hominini

[blog_id] => 6

[theme] => Pressbooks Custom CSS

[url] => https://milnepublishing.geneseo.edu/the-evolution-of-our-tribe-hominini/format/xhtml?timestamp=1492528632&hashkey=c2ff78edbaf619525b65f0c401e8a315

)

Tue Apr 18 11:17:12 2017: ---- begin

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:222: warning: discarded ‘@import’ rule

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:224: warning: unknown ‘@mixin’ rule

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:1020: warning: unknown ‘@include’ rule

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:1319: warning: unknown ‘@include’ rule

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2722: warning: parse error in selector at ‘.1’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2730: warning: parse error in selector at ‘.2’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2738: warning: parse error in selector at ‘.17’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2748: warning: parse error in selector at ‘.3’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2756: warning: parse error in selector at ‘.4’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2763: warning: parse error in selector at ‘.5’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2771: warning: parse error in selector at ‘.6’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2780: warning: parse error in selector at ‘.7’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2789: warning: parse error in selector at ‘.8’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2798: warning: parse error in selector at ‘.9’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2806: warning: parse error in selector at ‘.10’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2814: warning: parse error in selector at ‘.11’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2822: warning: parse error in selector at ‘.12’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2830: warning: parse error in selector at ‘.13’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2839: warning: parse error in selector at ‘.14’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2847: warning: parse error in selector at ‘.15’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2855: warning: parse error in selector at ‘.16’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2864: warning: parse error in selector at ‘.18’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2873: warning: parse error in selector at ‘.19’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2880: warning: parse error in selector at ‘.20’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2889: warning: parse error in selector at ‘.21’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2900: warning: parse error in selector at ‘.22’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2909: warning: parse error in selector at ‘.23’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2917: warning: parse error in selector at ‘.24’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2926: warning: parse error in selector at ‘.25’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2936: warning: parse error in selector at ‘.26’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2944: warning: parse error in selector at ‘.27’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2952: warning: parse error in selector at ‘.28’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2961: warning: parse error in selector at ‘.29’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2969: warning: parse error in selector at ‘.30’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2978: warning: parse error in selector at ‘.31’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2990: warning: parse error in selector at ‘.32’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:2998: warning: parse error in selector at ‘.33’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:3006: warning: parse error in selector at ‘.34’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:3014: warning: parse error in selector at ‘.35’

Tue Apr 18 11:17:12 2017: /tmp/phpAsliUK:3023: warning: parse error in selector at ‘.36’

Tue Apr 18 11:17:12 2017: warning: title required for PDF/X-1a:2003

Tue Apr 18 11:17:12 2017: finished: success

Tue Apr 18 11:17:12 2017: ---- end

Prince PDF export error example 2

Array

(

[time] => Tue Apr 18 15:19:32 2017

[user] => genxmlcreator

[site_url] => https://milnepublishing.geneseo.edu/concise-introduction-to-logic

[blog_id] => 4

[theme] => Pressbooks Custom CSS

[url] => https://milnepublishing.geneseo.edu/concise-introduction-to-logic/format/xhtml?timestamp=1492528771&hashkey=7fdb340a1f38e974b8b9efebf232c19d

)

Tue Apr 18 11:19:31 2017: ---- begin

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:284: warning: discarded ‘@import’ rule

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:286: warning: unknown ‘@mixin’ rule

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:1082: warning: unknown ‘@include’ rule

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:1381: warning: unknown ‘@include’ rule

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:1856: warning: unknown pseudo-class ‘:first’

Tue Apr 18 11:19:32 2017: /tmp/phpHBClEg:2427: warning: parse error in declaration at ‘/’

Tue Apr 18 11:19:32 2017: warning: title required for PDF/X-1a:2003

Tue Apr 18 11:19:32 2017: finished: success

Tue Apr 18 11:19:32 2017: ---- end

Hi @rootl, can you share the contents of the Prince Custom CSS for one of these books?

GIST link to PDF Export Example CSS 1:

PDF Export Example CSS 1 (Evolution of Our Tribe Hominini)

GIST link to PDF Export Example CSS 2:

PDF Export Example CSS 2 (A Concise Introduction to Logic)

EXAMPLE 1 PDF CSS

/*
Theme Name: Luther PDF
Theme URI: http://pressbooks.com/
Description: Named after Martin Luther, this is a traditional book theme, good for novels, and text-heavy non-fiction. An earlier version of this theme was commissioned by Fortress Press / Augsburg Fortress.
Author: Pressbooks (Book Oven Inc.)
Author URI: http://pressbooks.com
Copyright 2011-2015 Book Oven Inc. (Pressbooks.com) code@pressbooks.com
Version: 1.4
*/

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,700italic,800,800italic);

.symbol {
font-family: “FreeSans”;
}

/********************
DeLancey custom Styles
*********************/

.marg-left{margin-left:45pt;}
.sub{vertical-align:sub;font-size: 60%;}
.em{font-style:italic;}
.strong{font-weight:bold;}
.underline{text-decoration:underline;}
.green{background-color:#ccffcc;}
.center{text-align:center;}
.super{vertical-align:super;font-size: 60%;}
.table {
padding:0pt 5.8pt 0pt 5.8pt;
vertical-align:top;
border: .5pt solid #000000
}

ol.lower-alpha {
list-style-type: lower-latin!important;
margin-left: 20px;
}

.ql-left-eqno {
width: 0 !important;
text-align: left !important;
display: none !important;

}
.ql-right-eqno {
width: 0 !important;
text-align: left !important;
display: none !important;

}

.ql-left-displayed-equation {
text-align: left !important;
white-space: normal;
overflow: visible;
}

.ql-img-displayed-equation {
background: none !important;
border: none !important;
padding: 0px !important;
margin: 3px !important;
vertical-align: top;
display: block !important;
}

.indent {
margin-left: 45pt;
}

.border-right {
border-bottom: 1px solid #000;
border-top: 1px solid #000!important;
border-left: 1px solid #000;
border-right: 3px solid #000;
}

.border-bottom {
border-top: 1px solid #000!important;
border-left: 1px solid #000;
border-bottom: 5px solid #000!important;
}

tr.border-bottom td th{

border-top: 1px solid #000!important;
border-left: 1px solid #000;
border-bottom: 5px solid #000!important;

}

.border {
border: 1px solid #000;
}

.textbox {
/* width: 100%;*/
padding: 2% 3%;
margin-bottom: 15px;
border-radius: 4px;
border: none;
}

.textbox h3:first-child{
text-align: center;
margin: -2% -2% 15px;
color: #ffffff;
padding: 15px 0 15px;

}

.textbox ul li::before{
content:none;
counter-increment: none;
}

.textbox ul{
text-indent: 0px;
}

.textbox h3 + p {
margin-top: 10px;
}

.learning-objectives {
background-color: #f7f7f9;
}

.textbox.learning-objectives h3{
background-color: #111111;
}

.key-takeaways{
background-color: #eaf5ea;
}

.textbox.key-takeaways h3{
background-color: #3a7a33;
}

.exercises {
background-color: #e3eff6;
}

.textbox.exercises h3{
background-color: #0b6396;
}

.examples {
background-color: #f3e1e3;
}

.textbox.examples h3{
background-color: #7a333a;
}
.textbox ol {

list-style-position: outside;
margin-left: 30px;
text-indent: -20px;
margin: 0 0 5px 20px;
}

.chapter-title-wrap {
font-size: 1.5em;
line-height: 1.8em;
text-align: center;
}

.part-title-wrap {
font-size: 2em;
text-align: center;
}

/*
div.front-matter + div.part {
counter-reset: page 1;
}
Reset front matter page numbers test 10-14 APB*/

.bcc-box li::before{
content:none;
counter-increment: none;
}

.bcc-box ol {
display: block;
list-style-type: decimal;
list-style-position: outside !important;
margin: 0 0 5px 30px;
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
font-size:1em;
}

div.rotate {
/* float: prince-top-if-necessary; */
margin-left: -14.5%;
width: 129%;
page-break-inside:auto!important;

}

div.keep {
display:block!important;
page-break-inside: avoid;
}

table ul {
margin-left: 20px;
margin-bottom: 3px;
}

table {
font-size: small;
page-break-inside: avoid;
page-break-before: auto;
}

table p {
margin: 0px;
font-size: small;
margin-bottom: 3px;
}

table p.no-indent {
margin-bottom: 3px;
}

ul li {
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
font-size:1em;
margin-bottom: 5px;

}

ol li {
margin-bottom: 5px;
}

p {
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
font-size:1em;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.4;
margin-bottom:15px;
text-align:left;
text-decoration:none;
text-indent:0px;
widows:2;
orphans:2;
-webkit-hyphenate-before:3;
hyphenate-before:3;
-webkit-hyphenate-after:3;
hyphenate-after:3;
-webkit-hyphenate-lines:2;
hyphenate-lines:2;
}

/INSERT_PDF_HOUSE_STYLE/

div.blockquote,
blockquote {
margin-left: 20px;
margin-right: 20px;
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
font-size:1em;
}

h1 {

page-break-after:avoid;
font-family:"Open Sans","LiberationSans", Candara,"Trebuchet MS", Verdana, sans-serif;
font-size:1.25em;
font-style:normal;
font-variant:normal;
    font-weight: 700;
margin-top:12px;
margin-left:0px;
margin-right:0px;
text-align: center;
text-decoration:none;
text-indent:0px;

}
h2 {

page-break-after:avoid;
font-family:"Open Sans", "LiberationSans", Candara,"Trebuchet MS", Verdana, sans-serif;
font-size:1em;
    font-weight: 700;
margin-top:9px;
margin-left:0px;
margin-right:0px;
text-decoration:none;
text-indent:0px;

}
h3 {

page-break-after:avoid;
font-family:"Open Sans", Candara,"LiberationSans", "Trebuchet MS", Verdana, sans-serif;
font-size: 0.87em;
    font-weight: 700;
margin-top:9px;
margin-left:0px;
margin-right:0px;
text-align: left;
text-decoration:none;

}

h4 {

page-break-after:avoid;
font-family:"Open Sans", Candara,"LiberationSans", "Trebuchet MS", Verdana, sans-serif;
font-size:0.75em;
    font-style: italic;
margin-top:9px;
margin-left:0px;
margin-right:0px;
text-align:left;
text-decoration:none;

}

div.UNKNOWN h1 {
font-weight: 600;
}

div.UNKNOWN h2 {
text-align:left!important;
font-weight: 600;
}

div.UNKNOWN h3 {
text-align:left!important;
text-indent:2em;
font-weight: 600;
}

div.UNKNOWN h4 {
text-align:left!important;
text-indent:2em;
font-weight: 600;
}

h5 {
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
font-size: 1em;
line-height:1.167;
margin-top:9px;
margin-bottom:9px;
text-align:center;
}

.bcc-box{
/* width: 100%;*/
padding: 2% 3%;
margin-bottom: 15px;
margin-top: 15px;
border-radius: 4px;
}

.bcc-box h3:first-child {
text-align: center!important;
text-indent: 0em;
margin: -2% -3% 15px;
color: #ffffff;
padding: 15px 0 15px;

}

.bcc-highlight {
background-color: #f7f7f9;
}

.bcc-box.bcc-highlight h3 {
background-color: #111111;
}

.bcc-success {
background-color: #eaf5ea;
}

.bcc-box.bcc-success h3{
background-color: #3a7a33;
}

.bcc-info{
background-color: #e3eff6;
}

.bcc-box.bcc-info h3{
background-color: #0b6396;
}
/* FONTS
=========== */

@font-face {
font-family: “FreeSans”;
font-style: normal;
src: url(…/usr/share/fonts/freefont-20090104/FreeSans.otf) format(“opentype”);
}

@font-face {
font-family: “FreeSerif”;
font-style: normal;
src: url(…/usr/share/fonts/FreeSerif.ttf) format(“opentype”);
}

@font-face {
font-family: “FreeSerif”;
font-weight: bold;
src: url(…/usr/share/fonts/FreeSerifBold.otf) format(“opentype”);
}

@font-face {
font-family: “FreeSerif”;
font-style: italic;
src: url(…/usr/share/fonts/freefont-20080912/FreeSerifItalic.otf) format(“opentype”);
}

@font-face {
font-family: “FreeSerif”;
font-style: italic;
font-weight: bold;
src: url(…/usr/share/fonts/freefont-20120503/FreeSerifBoldItalic.otf) format(“opentype”);
}

@font-face{
font-family: “Open Sans”;
font-style: normal;
src: url(https://fonts.googleapis.com/css?family=Open+Sans);
}

@font-face {
font-family: ‘Open Sans’;
font-style: normal;
font-weight: 700;
src: local(‘Open Sans Bold’), local(‘OpenSans-Bold’), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBdwxCXfZpKo5kWAx_74bHs.woff2) format(‘woff2’);
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
font-family: ‘Open Sans’;
font-style: italic;
font-weight: 400;
src: local(‘Open Sans Italic’), local(‘OpenSans-Italic’), url(https://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBvZraR2Tg8w2lzm7kLNL0-w.woff2) format(‘woff2’);
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}

@font-face {
font-family: “LiberationSans”;
font-style: normal;
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/liberation-fonts-ttf-2.00.1/LiberationSans-Italic.ttf) format(“truetype”);
}

@font-face {
font-family: “LiberationSans”;
font-weight: 600;
font-style: normal;
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/liberation-fonts-ttf-2.00.1/LiberationSans-Bold.ttf) format(“truetype”);
}

@font-face {
font-family: “Cardo”;
font-weight: bold;
font-style: normal;
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardob101.ttf) format(“truetype”);
}
@font-face {
font-family: “Cardo”;
font-weight: normal;
font-style: italic;
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardoi99.ttf) format(“truetype”);
}
@font-face {
font-family: “Cardo”;
font-weight: normal;
font-style: normal;
src: url(https://milnepublishing.geneseo.edu/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/../../fonts/Cardo104s.ttf) format(“truetype”);
}
/* Override hierarchy. See: Prince - PDF Bookmarks */
h1, h2, h3, h4, h5, h6 {
prince-bookmark-level: 1;
}

/* Page */
@page {
margin-top: 6em;
margin-bottom: 6em;
orphans:3;
widows:3;
}

@page :left {
margin-left: 8em;
margin-right: 8em;
}

@page :right {
margin-left: 8em;
margin-right: 8em;
}

/* TOC */
@page toc {
@bottom {
content:“”;
vertical-align: center;
}
}
@page toc:blank {
@bottom {
content: “”;
}
}

/* Front-Matter */
@page front-matter:left {
@top-left {
content: “”;
}
@bottom {
content: counter(page, lower-roman);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}

@page front-matter:right {
@top-right {
content: “”;
}
@bottom {
content: counter(page, lower-roman);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}

@page front-matter:first {
@top-right {
content: “”;
}
@bottom {
content: counter(page, lower-roman);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
page-break-after: right;
}
}

@page front-matter:blank {
@top-left {
content: “”;
}
@bottom {
content: “”;
}
}

/* Dedication, Epigraph & Before Title */
@page dedication,
epigraph,
before-title {
@bottom {
content:“”;
}
}
@page dedication:blank {
@bottom {
content:“”;
}
}

/* Introduction */

@page introduction:left {
@top-left {
content: “”;
}
@bottom {
content: counter(page);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}

/counter(page) “\A0\A0\A0” string(book-title) Removed from Intro Page Left/

@page introduction:right {
@top-right {
content: “”;
}
@bottom {
content: counter(page);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}

@page introduction:first {

@top-left {
content: “”;
}
@top-right {
content: “”;
}
@bottom {
content: counter(page);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}

@page introduction:blank {

@top-left {
content: “”;
}
@bottom {
content: “”;

}
}

@page abstracts {

@top-left {
content: “”;
}
@bottom {
content: “”;

}
}

/* Part */

div.part:first {
page: part;
counter-reset: page 1!important;
}

@page part {
vertical-align: middle;
page-break-before: right;

}

/* Chapter */

@page chapter:left {
@top-left {
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
content: counter(page) “\A0\A0\A0” string(book-title);
vertical-align: left;
}
}
@page chapter:right
{
@top-right
{
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
content: string(section-title, last) “\A0\A0\A0” counter(page);
vertical-align: right;
}
}
@page chapter:first {
@top-left {
content: “”;
}
@top-right {
content: “”;
}
@bottom {
content: counter(page);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
vertical-align: center;
}
}
@page chapter:blank {

@top-left {
content: “”;
}
}

/* Footnotes /
@page {
@footnotes {
padding-top: 1em;
}
}
/
Back-matter */
@page back-matter:left {
@top-left {
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
content: counter(page) “\A0\A0\A0” string(book-title);
vertical-align: left;
}
}
@page back-matter:right {
@top-right
{
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
content: string(section-title, last) “\A0\A0\A0” counter(page);
vertical-align: right;
}
}
@page back-matter:first {
@top-left {
content: “”;
}
@top-right {
content: “”;
}
@bottom
{
content: counter(page);
font-family: “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif; vertical-align: center;
}
}
@page back-matter:blank {
@top-left {
content: “”;
}
}
#toc {
page: toc;
prince-page-group: start;
}

div.front-matter {
page: front-matter;
prince-page-group: start;
counter-reset: page 1;
}
div.front-matter.dedication {
page: dedication;
prince-page-group: start;
}
div.front-matter.epigraph {
page: epigraph;
prince-page-group: start;
}
div.front-matter.before-title {
page: before-title;
prince-page-group: start;
}

div.front-matter.introduction {
page: introduction;
page-break-before: right;
page-break-after: right;
}
div.front-matter.dedication {
page: dedication;
page-break-before: right;
page-break-after: right;
}

div.front-matter.abstracts {
page: abstracts;
page-break-before: right;
page-break-after: right;
}

div.chapter {
page: chapter;
prince-page-group: start;
}

div.back-matter {
page: back-matter;
prince-page-group: start;
}

div.part {

    page-break-before: right;

}

/APB reset counting at start of text, rather than intro/

div.part.invisible {
display: none;
}

body {
font: 11pt/1.1 “Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
}

a {
border: none;
color: inherit;
text-decoration: none;
}

a.backlink {
text-decoration: underline!important;
}

p {
line-height: 1.2em;
text-align: justify;
}

.nonindent,
.no-indent {
text-indent: 0;
}

p + ul {
margin-top: 10px;
}

h1, h2, h3, h4, h5, h6 {
font-family:“Open Sans”,“LiberationSans”, Candara,“Trebuchet MS”, Verdana, sans-serif;
font-weight: normal;
text-align: center;
}

hr {
margin: 10px auto;
text-align: center;
width: 20%;
}
hr.break-symbols {
border: none;
font-size: 1.1em;
margin-bottom: 20px;
}
hr.break-symbols::after {
display: block;
content: “\066D”;
font-size: 1.8em;
text-align: center;
}
table {
display: table;
border-collapse: collapse;
max-width: 110%;
margin-left: auto;
margin-right: auto;
page-break-inside:auto!important;
table-layout: fixed;
}

tr {
page-break-after:auto;
}

th, td {
page-break-inside:auto!important;
border: 0.5px solid;
padding: 3px;
margin: 0px!important;
font-size: small;
text-indent: 0px;
min-width: 75px !important;
min-height: 25px;
}

dt {
float: left;
font-weight: bold;
margin-right: 5px;
margin-bottom: 0;
}
dd {
margin-bottom: 0;
}
ul ul,
ul ul ul {
list-style-type: none;
}
ul li li {
list-style-image: url(https://milnepublishing.geneseo.edu/steps-to-success/wp-content/plugins/pressbooks/themes-book/pressbooks-book/export/prince/images/em-dash.png);

}
ul li li li {
list-style-image: none;
}
ul li li li::before {
content: “\002A”;
font-size: 0.5em;
margin-right: 5px;
}

ol, li{
margin-left: 10px;
margin-bottom: 5px;
font-family:“Cardo”, “FreeSerif”, “Hoefler Text”, “Times New Roman”, serif;
}

cite {
font-weight: normal;
}
.hanging-indent {
padding-left: 1em;
text-indent: -1em;
text-align: left;
}

/* HALFTITLE PAGE
==================== */
#half-title-page h1.title:first-of-type {
string-set: book-title content();
page-break-before: right;
page-break-after: right;
bookmark-level: none;
font-size: 2em;
margin-top: 10cm;

}

/* TITLE PAGE
================ */
#title-page {
page-break-before: right;
page-break-after: left;
height: 100%;
}

#title-page > .subtitle,
#title-page > div.logo,
#title-page > .author,
#title-page > .publisher,
#title-page > .publisher-city {
bookmark-level: none;
}
#title-page > .title {
font-size: 2.5em;
margin-top: 2cm;
text-transform: none;
}

#title-page > .subtitle {
font-size: 2em;
margin-top: 1.5cm;
text-transform: none;
}

#title-page > div.logo {
margin-top: 2cm;
height: 26px;
background-repeat: no-repeat;
background-position: bottom center;
}
#title-page .title + div.logo {
margin-top: 4cm;
}
#title-page > .author {
font-size: 1.5em;
margin-top: 1.5cm;
text-transform: none;
}

#title-page > .publisher {
font-size: 1.25em;
float: bottom;
margin-bottom: 0;
}

#title-page > .publisher-city {
font-size: 1em;
margin-top: 4cm;
}

#copyright-page {
page-break-before: always;
}

#copyright-page p {
font-size: 0.9em;
text-indent: 0;
margin-bottom: 0.5em;
}

#copyright-page > .ugc {
float: bottom;
}

/* DEDICATION
================ /
.dedication p {
font-style: italic;
text-align: center;
}
/
TITLES
=================== */
h3.front-matter-number, h3.part-number, h3.chapter-number, h3.back-matter-number {
bookmark-level: none;
}

div.ugc h1, div.ugc h2, div.ugc h3, div.ugc h4, div.ugc h5, div.ugc h6 {
bookmark-level: none;
margin-bottom: 5px;
page-break-after:avoid;
}

div.ugc h1 + p,
div.ugc h2 + p,
div.ugc h3 + p,
div.ugc h4 + p,
div.ugc h5 + p {
margin-top: 10px;
margin-bottom: 15px;
}
div.front-matter > div.ugc h6.short-title:first-of-type,
div.chapter > div.ugc h6.short-title:first-of-type,
div.back-matter > div.ugc h6.short-title:first-of-type {
string-set: section-title content() !important; /* override running header /
visibility: hidden; /
display:none breaks string-set: */
font-size: 0;
height: 0;
}
div.front-matter .front-matter-title-wrap > h1:first-of-type,
div.chapter .chapter-title-wrap > h2:first-of-type,
div.back-matter .back-matter-title-wrap > h1:first-of-type {
font-size: 1.5em;
string-set: section-title content();
counter-reset: footnote;
margin-bottom: 20pt;
}
div.front-matter.preface .front-matter-title-wrap > h1:first-of-type,
#toc > h1:first-of-type {
font-size: 1.5em;
margin-top: 2cm;
margin-bottom: 2.5cm;
}

/* TABLE OF CONTENTS
======================= */

.toc h1 {
text-align: center
}
#toc a {
border: none;
}
#toc ul, #toc li {
list-style: none;
margin: 0;
padding: 0;
}
#toc li {
position: relative;
}
#toc a::after {
content: leader(’ ‘) target-counter(attr(href), page);
font-style: normal;
position: absolute;
top: 0;
right: 0;
text-decoration: none;
}
#toc .front-matter a::after {
content: leader(’ ‘) target-counter(attr(href), page, lower-roman);
}
#toc .introduction a::after {
content: leader(’ ') target-counter(attr(href), page);
}

#toc .abstracts a::after {
content: “”;
}

#toc .part {
margin: .6cm 0 .4em;
text-align: center;
font-weight: bold;
page-break-after: avoid;
}

#toc {
page-break-before: right;
counter-reset: part;
font-size: 1em;
}
#toc ul {
counter-reset: chapter;
line-height: 1.2em;
}

#toc .chapter a,
#toc .front-matter a,
#toc .back-matter a {
padding-left: 25px;
}

#toc .chapter .section a::before,
#toc .front-matter .section a::before,
#toc .back-matter .section a::before {
content:‘’;
counter-increment: none;
}

#toc .chapter.numberless a::before {
content:‘’ ;
counter-increment: none;
margin-right: 0;
}
#toc .part a::after {
content:‘’ ;
}
#toc .chapter + .back-matter {
margin-top: 1.3em;
}
#toc span.chapter-author {
display: inline-block;
font-style: italic;
margin-left: 2em;
width: 90%;
}

#toc span.chapter-license,
#toc span.chapter-subtitle {
display: none;
}

#toc span.toc-chapter-title {
display: inline-block;
width: 90%;
}
#toc span.chapter-author,
#toc span.chapter-license,
#toc span.chapter-subtitle {
margin-bottom: 5px;
}
#toc span.chapter-subtitle +
span.chapter-author,
span.chapter-author +
span.chapter-license,
#toc span.chapter-subtitle +
span.chapter-license {
margin-bottom: 5px;
position: relative;
top: -5px;
}

#toc ul.sections {
display: none;
position: static !important;
width: 90%;
margin-bottom: 0.75em;
}

#toc li.section {
display:none;
position: static !important;
/display: block;/
text-indent: 0;
padding-left: 0;
margin-left: 0;
}

li.section::before {
content: “”;
}

li.section a::after {
content: “” !important;
display: none;
}

/end toc/

/* MOAR TRADITIONAL CSS
================== */

div.part, div.front-matter, div.back-matter, div.chapter {
page-break-before: right;

}

div.part, div.chapter {
page-break-after: right;
}

.display-none, h3.front-matter-number, h3.back-matter-number {
display: none;
}

#introduction h1 h2 h3 {

page-break-after: avoid;
}

h3.part-number, h3.chapter-number {
display:none; / *hide auto part # */
background-repeat: no-repeat;
background-position: bottom center;
padding-bottom: 1em;
text-transform: uppercase;
}

h3.chapter-number {
margin-bottom: 3em;
counter-increment: none;
}
div.chapter.numberless h3.chapter-number {
display: none;
}
.aphorism {
font-size: 1em;
font-style: italic;
margin: 0 auto 4em;
width: 50%;
}
.aphorism cite {
display: block;
font-size: 0.875em;
font-style: normal;
font-variant: small-caps;
text-align: right;
}
.aphorism cite::before {
content: “–”;
}

/* FOOTNOTES

.footnote {
font-size: 0.75em;
display: none;
display: footnote;
display: prince-footnote;
position: footnote;
counter-increment: footnote;
footnote-style-position: inside;
margin-left: 0;
line-height: 1.4;
text-indent: 1em;
text-align: left;
}
sup.endnote {
line-height: 1em;
vertical-align: top;
}

/* ENDNOTES
================== */
.endnotes hr {
border: none;
margin-top: 1cm;
}
.endnotes h3 {
margin-bottom: 0;
}
.endnotes ol {
font-size: 0.8em;

margin-top: 5px;
margin-left: 0;

}
.endnotes li {
text-indent: 22pt;
}

.endnotes p + p {
text-indent: 0;
}
/* CUT AND PASTE FROM EPUB FORTRESS.CSS
================== */

.aside {
font-style: italic;
border-top: 1px solid #000;
border-bottom: 1px solid #000;
margin: 2em 10%;
padding: 10px 0;
text-indent: 0;
}
.textbox {
border: 1px solid #000;
margin: 10px 0;
padding: 10px;
}
.textbox.shaded {
background-color: #eee;
}
.textbox p {
margin-top: 0;
}
.textbox-caption {
display: block;
font-size: 0.9em;
font-weight: bold;
margin: 0;
}

h2.chapter-subtitle {
font-weight: normal;
font-style: italic;
text-align: center;
}

h2.chapter-author {
text-align: center;
font-weight: normal;
}

h2.entry-title {
text-align: center;
font-weight: normal;
text-indent: 0em;
}

h2.entry-title::before {
content:none!important;
counter-increment: none;
display:none!important;
}

h3.entry-title {
text-align: center;
font-weight: normal;
text-indent: 0em;
}

div.ugc h2.chapter-subtitle,
div.ugc h2.chapter-author {
font-size: 1.4em;
font-variant: normal;
margin: -1.4em 0 3em;
}
div.ugc h2.chapter-subtitle {
margin-bottom: 2.8em;
padding-top: 0.5em;
}
div.ugc h2.chapter-author {
font-size: 0.9em;
font-style: normal;
font-weight: normal;
}
.pullquote {
border: 1px solid #000;
border-width: 1px 0;
margin: 20px auto;
padding: 5px 0;
text-align: center;
width: 45%;
}
.pullquote-left {
border: 1px solid #000;
border-width: 1px 0;
float: left;
margin: 15px 15px 15px 0;
padding: 5px 0;
text-align: center;
width: 45%;
}
.pullquote-right {
border: 1px solid #000;
border-width: 1px 0;
float: right;
margin: 15px 0 15px 15px;
padding: 5px 0;
text-align: center;
width: 45%;
}

/* IMAGES
================== */
img {
height: auto;
max-width: 100%!important;
background: none;
border: none;
padding: 5px;
}

.alignleft {
float: left;
margin: 1em 1em 1em 0;
}
.alignright {
float: right;
margin: 1em 0 1em 1em;
}
.aligncenter {
display: block;
margin: 1em auto;
text-align: center;
}
div.aligncenter {
display: block;
margin: 1em auto;
text-align: center;
max-width: 100%;
}
img.aligncenter {
display: block;
margin: 1em auto;
text-align: center;
}
.wp-caption {
float: prince-top-if-necessary;
height: auto;
max-width: 100%!important;
margin: 1em 0;
text-align: center;
font-style: italic;
}
.wp-caption-text {
font-size: 0.875em;
margin-top: 5px;
text-align: center;
font-style: italic;
}

/* BLOCKQUOTES
=============== */
div.blockquote {
border-width: 0 4px;
margin-bottom: 2em;
}
p.bl_nonindent {
margin: 2em 10% 0;
text-indent: 0;
}
p.bl_indent {
margin: 0 10%;
text-indent: 1em;
}

/* BIBLIOGRAPHY
=============== */

.bibliography p {
padding-left: 14pt;
text-indent: -14pt;
text-align: left;
}

/* INDEX
================== */
.index .ugc {
column-count: 2;
column-gap: 2.5em;
text-align: left;

}
.index .ugc div {
margin-bottom: 4em;
}
.index .ugc p {
font-size: 0.9em;
padding-left: 14pt;
text-indent: -14pt;
text-align: left;
}
.index .ugc p.sub-entry {
padding-left:30px;
}

div.license-attribution > p:first-of-type {
text-align:center;
font-size: 0.75em;
}

ol.lst-kix_list_20-0{list-style-type:none;margin-bottom:15px;}
.lst-kix_list_20-0>li{counter-increment:lst-ctn-kix_list_20-0}
ol.lst-kix_list_20-0.start{counter-reset:lst-ctn-kix_list_20-0 0}
.lst-kix_list_20-0>li:before{content:“” counter(lst-ctn-kix_list_20-0,decimal) ". "}



EXAMPLE 2 PDF CSS:

Hi @rootl,

I tried to reproduce as follows:

  1. Created a new book.
  2. Switched to Pressbooks Custom CSS.
  3. Pasted your example CSS into the PDF CSS field and saved.
  4. Exported for Print PDF.

The export succeeded and I got this in the emailed log:

Array
(
   [time] => Thu Apr 20 15:06:29 2017
   [user] => bight
   [site_url] => https://customcss.textopress.com
   [blog_id] => 57
   [theme] => Pressbooks Custom CSS
   [url] => http://customcss.textopress.com/format/xhtml?timestamp=1492700786&hashkey=33d0f331a7eb3693914b17ebded1d016
)
Thu Apr 20 11:06:26 2017: ---- begin
Thu Apr 20 11:06:28 2017: /tmp/phpaIXfUB:640: warning: unknown pseudo-class ':first'
Thu Apr 20 11:06:28 2017: /tmp/phpaIXfUB:1210: warning: parse error in declaration at '/'
Thu Apr 20 11:06:28 2017: https://fonts.googleapis.com/css?family=Open+Sans: warning: unknown file format
Thu Apr 20 11:06:29 2017: error: PDF/X-1a:2003 does not support transparent images
Thu Apr 20 11:06:29 2017: finished: success
Thu Apr 20 11:06:29 2017: ---- end

I’m puzzled.

OK. Me too .

We are running PHP7 on ‘headless’ RedHat Linux. I use wp-cli for upgrades and rollbacks. Word I am puzzled as well.

We are at latest versions of WordPress Multisite.

We are currently running PB-Textbooks plugin at Version 2.8.0 . We have not updated to the latest version of PB-Textbooks yet. I don’t know if that would make a difference.

I will try the Pressbooks Upgrade again.

Okay, I’m using the Gist now and getting the same error. Hang on and let me diagnose further.

1 Like

Hi @rootl—is this confirmed to be a new issue since 3.9.8.x? I downgraded my dev environment to Pressbooks 3.9.7.2 and I’m getting the same messages.

My apologizes; we are also using the latest PBTextbook version (Brad Payne’s plugin) Version 3.0.2.1

I am getting the same errors now in 3.9.7.2.

Here is Export PDF version one errors below:

Note: We are using PRINCE only (PDF (for digital distribution) , not mPDF.

The resulting PDF looks and functions correctly despite the errors. Uggggh.

Array

(

[time] => Thu Apr 20 15:32:44 2017

[user] => genxmlcreator

[site_url] => https://milnepublishing.geneseo.edu/the-evolution-of-our-tribe-hominini

[blog_id] => 6

[theme] => Pressbooks Custom CSS

[url] => https://milnepublishing.geneseo.edu/the-evolution-of-our-tribe-hominini/format/xhtml?timestamp=1492702346&hashkey=b4d7e59aa4b8f85be1e93ab1a1a0e35f

)

Thu Apr 20 11:32:26 2017: ---- begin

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:222: warning: discarded ‘@import’ rule

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:224: warning: unknown ‘@mixin’ rule

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:1020: warning: unknown ‘@include’ rule

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:1319: warning: unknown ‘@include’ rule

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2722: warning: parse error in selector at ‘.1’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2730: warning: parse error in selector at ‘.2’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2738: warning: parse error in selector at ‘.17’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2748: warning: parse error in selector at ‘.3’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2756: warning: parse error in selector at ‘.4’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2763: warning: parse error in selector at ‘.5’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2771: warning: parse error in selector at ‘.6’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2780: warning: parse error in selector at ‘.7’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2789: warning: parse error in selector at ‘.8’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2798: warning: parse error in selector at ‘.9’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2806: warning: parse error in selector at ‘.10’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2814: warning: parse error in selector at ‘.11’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2822: warning: parse error in selector at ‘.12’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2830: warning: parse error in selector at ‘.13’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2839: warning: parse error in selector at ‘.14’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2847: warning: parse error in selector at ‘.15’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2855: warning: parse error in selector at ‘.16’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2864: warning: parse error in selector at ‘.18’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2873: warning: parse error in selector at ‘.19’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2880: warning: parse error in selector at ‘.20’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2889: warning: parse error in selector at ‘.21’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2900: warning: parse error in selector at ‘.22’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2909: warning: parse error in selector at ‘.23’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2917: warning: parse error in selector at ‘.24’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2926: warning: parse error in selector at ‘.25’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2936: warning: parse error in selector at ‘.26’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2944: warning: parse error in selector at ‘.27’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2952: warning: parse error in selector at ‘.28’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2961: warning: parse error in selector at ‘.29’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2969: warning: parse error in selector at ‘.30’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2978: warning: parse error in selector at ‘.31’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2990: warning: parse error in selector at ‘.32’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:2998: warning: parse error in selector at ‘.33’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:3006: warning: parse error in selector at ‘.34’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:3014: warning: parse error in selector at ‘.35’

Thu Apr 20 11:32:29 2017: /tmp/phpogyHpk:3023: warning: parse error in selector at ‘.36’

Thu Apr 20 11:32:31 2017: https://fonts.googleapis.com/css?family=Open+Sans: warning: unknown file format

Thu Apr 20 11:32:44 2017: finished: success

Thu Apr 20 11:32:44 2017: ---- end

@ned Let me know if I need to change the name and scope if this issue. Thanks.

Okay, here’s the issue.

The Custom CSS for your book includes /* __INSERT_PDF_HOUSE_STYLE__ */. This indicates to me that the stylesheet from Luther was imported into the Custom CSS editor prior to September 2015, when we updated Luther to use SCSS instead of CSS (see this commit).

The way things work now is that the SCSS for a base theme is compiled before it is imported into the Custom CSS Editor. But because your Custom CSS includes the old /* __INSERT_PDF_HOUSE_STYLE__ */ placeholder, it’s getting picked up by this function during export and replaced with the contents of an uncompiled SCSS file— which includes @import and @mixin and some other rules that are causing errors in Prince.

There’s not an easy way to fix this, but I can tell you what I’d recommend:

  1. Create a new book.
  2. Change to the Custom CSS theme and import the PDF stylesheet from Luther (or another parent theme).
  3. Compare the Custom CSS on these books where you’re getting these errors with the results of the previous step in a diff tool and copy your customizations to the freshly imported stylesheet.
  4. Replace the old stylesheet with your newly customized one.

I should note that we are working towards a new feature which will replace Custom CSS and avoid issues like this — see: https://github.com/pressbooks/pressbooks/issues/658

1 Like

Thank you, @ned I am meeting with our Digital Publishing Services Manager, who creates the custom CSS for our books.

I will discuss this solution for our existing books, plus workflow for publishing future books in order to avoid these issues.

I appreciate this muchly :slight_smile: Thank you!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.