View Single Post
Old 05-02-2011, 09:18 PM   #143
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by kiwidude View Post
Ok, so now we say the "Check xpgt file" becomes a search for epubs that have a non-empty xpgt file, and a "Remove selected xpgt file" option wipes the contents of it.
I just tested clearing the contents of the file. The resultant epub worked great in Adobe Digital editions and worked fine on my PRS-505. So I give two for the idea of identifying epubs with the file and the option to zero out the contents of the file.

FYI because I said I would find a before and after for you

Here is a page-template.xpgt file before calibre's conversion:

Spoiler:
Code:
<?xml version='1.0' encoding='utf-8'?>
<ade:template xmlns="http://www.w3.org/1999/xhtml" xmlns:ade="http://ns.adobe.com/2006/ade" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
    <fo:simple-page-master master-name="full_page" margin-bottom="0pt" margin-top="0pt" margin-left="0pt" margin-right="0pt">
        <fo:region-body/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="single_column" margin-bottom="1.5em" margin-top="1.5em" margin-left="1.5em" margin-right="1.5em">
        <fo:region-body/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="two_column" margin-bottom="1.5em" margin-top="1.5em" margin-left="1.5em" margin-right="1.5em">
        <fo:region-body column-count="2" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="three_column" margin-bottom="1.5em" margin-top="1.5em" margin-left="1.5em" margin-right="1.5em">
        <fo:region-body column-count="3" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:page-sequence-master>
        <fo:repeatable-page-master-alternatives>
                <fo:conditional-page-master-reference master-reference="three_column" ade:min-page-width="80em"/>
               <fo:conditional-page-master-reference master-reference="two_column" ade:min-page-width="50em"/>
                <fo:conditional-page-master-reference master-reference="single_column"/>
        </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

</fo:layout-master-set>

<ade:style>
    <ade:styling-rule selector=".img" condition="{ade:page-width() &gt; 0}" max-width="100%"/>
</ade:style>

</ade:template>

Here is the same page-template.xpgt file after calibre removed the margins:

Spoiler:
Code:
<?xml version='1.0' encoding='utf-8'?>
<ade:template xmlns="http://www.w3.org/1999/xhtml" xmlns:ade="http://ns.adobe.com/2006/ade" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>
    <fo:simple-page-master master-name="full_page">
        <fo:region-body/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="single_column">
        <fo:region-body/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="two_column">
        <fo:region-body column-count="2" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="three_column">
        <fo:region-body column-count="3" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:page-sequence-master>
        <fo:repeatable-page-master-alternatives>
                <fo:conditional-page-master-reference master-reference="three_column" ade:min-page-width="80em"/>
               <fo:conditional-page-master-reference master-reference="two_column" ade:min-page-width="50em"/>
                <fo:conditional-page-master-reference master-reference="single_column"/>
        </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

</fo:layout-master-set>

<ade:style>
    <ade:styling-rule selector=".img" condition="{ade:page-width() &gt; 0}" max-width="100%"/>
</ade:style>

</ade:template>

Here is the contents of the page-template.xpgt file that I zeroed out and used in my reader.

Spoiler:
Code:
Sorry I can't wrap code or spoilers around a empty file. 
Trust me when I say the file was completely empty of any content.
DoctorOhh is offline   Reply With Quote