Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2024, 03:06 AM   #1
Blaineoreski
Zealot
Blaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcover
 
Blaineoreski's Avatar
 
Posts: 116
Karma: 16268
Join Date: Apr 2020
Device: none
Question Anyway to Create Headers and Footers Such That They Can't Be Selected

Hi!

Often times I'll be copying across a pagebreaks in PDF. I generate headers and footers from the GUI, EPUB >> PDF, with this:

<header style="justify-content: flex-end; color: gray; font-size: small;padding-top: 20px;"><div class="odd-page"><i>_SECTION_</i></div></header>
<p style="text-align:center; color: gray; font-size: small"> _PAGENUM_</p>

When you drag the select across the pagebreak you'll get all those details in the selection.

Anyway to suppress that? Such that the headers and footers are NON-selectable?

I've got PDF X-change editor, so if there are any tools there you can think of, that'd work, too. But, question is - in going from Epub to PDF - any way to set the headers and footers into the page so they can't be copied?

Thanks!
Blaineoreski is offline   Reply With Quote
Old 10-08-2024, 03:53 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,397
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No as far as I know there is no way to make text in a pdf not copyable, regardless of its location.
kovidgoyal is offline   Reply With Quote
Advert
Old Yesterday, 01:04 AM   #3
Blaineoreski
Zealot
Blaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcover
 
Blaineoreski's Avatar
 
Posts: 116
Karma: 16268
Join Date: Apr 2020
Device: none
Yep, yep! Roger that.

Are there any other formats you can think of that sort of get around this wee quirk of PDF?

One idea that occurred to me was to sort of render the headings FIRST? And, then transform them into background images? I mean - that'd be a whole other step, for sure, in the conversion process EPUB >> PDF, but it would be sort of a sweet win.

The thing about the headings is a pain - almost like having the filename you're working on appended to any copy and paste. The files I use are all loooooooong from, and many a time I've had to go fish out the information. Whenever I'm on a conceptual roll, it's always a huge sort of mental momentum breaker for me. Half the time I'll just leave them in to keep the any motion going - but that's even worse in a way - coming back to find something floating around in notes I've made that's only like half the author's name and a page number, or a sub-chapter title.

What do you think? Does my switch to background image before rendering text in body of pages have any validity?

And! THANK YOU for Calibre! RARE have so many owed so much to - one GUY! Calbre is the jam, Kovid. THANK YOU! ))
Blaineoreski is offline   Reply With Quote
Old Yesterday, 02:06 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,397
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just use EPUB with a reader that displays section titles in the header or footer such as the calibre viewer.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 10:14 AM   #5
Blaineoreski
Zealot
Blaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcover
 
Blaineoreski's Avatar
 
Posts: 116
Karma: 16268
Join Date: Apr 2020
Device: none
I need to use a PDF reader - actually one specific one for the research I'm doing.

Are there any plugins for Calibre that do anything similar EPUB >> PDF? Or, even, PDF >> PDF?

Could it be added as a feature?

Here's my thinking - once the headers are added at the GUI in Calibre's conversion - there's not really any upside to having them copy and pasteable.

How does that sound?

Sincerely,

Ski
Blaineoreski is offline   Reply With Quote
Advert
Old Yesterday, 10:48 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,397
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Not something I am interested in implementing, sorry.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 11:12 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,405
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Blaineoreski View Post
I need to use a PDF reader - actually one specific one for the research I'm doing.

Are there any plugins for Calibre that do anything similar EPUB >> PDF? Or, even, PDF >> PDF?

Could it be added as a feature?

Here's my thinking - once the headers are added at the GUI in Calibre's conversion - there's not really any upside to having them copy and pasteable.

How does that sound?

Sincerely,

Ski
Are you trying to create a form of copy protection (DRM)?
Make your headers an Image
theducks is offline   Reply With Quote
Old Today, 12:51 AM   #8
Blaineoreski
Zealot
Blaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcoverBlaineoreski exercises by bench pressing the entire Harry Potter series in hardcover
 
Blaineoreski's Avatar
 
Posts: 116
Karma: 16268
Join Date: Apr 2020
Device: none
Hi, Kovid!

Yep, yep. Alright. Thanks for giving it a look.

Hi, theducks!

No, not DRM. A way to not have to go back every time you copy across where there's a page break and then not need to go back and excise out the headers and/or footers.

So that, instead of

Sides DJ and HE, and by the transverse Line FG distinguished into two halfs, the one DG of an intensely blue Colour, the other FE of an intensely red. And BACcab represents the Prism whose refracting Planes ABba and ACca meet in the Edge of the refracting Angle Aa. This Newton Optiks PROPOSITIONS. PROP. I. Theor. I. 19 Edge Aa being upward, is parallel both to the Horizon, and to the Parallel-Edges of the Paper DJ and HE, and the transverse Line FG is perpendicular to the Plane of the Window. And de represents the Image of the Paper seen by Refraction

you'd get:

Sides DJ and HE, and by the transverse Line FG distinguished into two halfs, the one DG of an intensely blue Colour, the other FE of an intensely red. And BACcab represents the Prism whose refracting Planes ABba and ACca meet in the Edge of the refracting Angle Aa. This Edge Aa being upward, is parallel both to the Horizon, and to the Parallel-Edges of the Paper DJ and HE, and the transverse Line FG is perpendicular to the Plane of the Window. And de represents the Image of the Paper seen by Refraction

You wrote,

MAKE YOUR HEADERS AN IMAGE

That's what I was thinking of. Some way to get this step

https://ibb.co/K0WFHfz

to create itself as an image, or as being otherwise unselectable.
Blaineoreski is offline   Reply With Quote
Old Today, 03:45 AM   #9
Jaws
JCL Punch-Card Collector
Jaws began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
If you don't care about anything that is in the headers and footers in the PDF, try cropping the page to omit them (there are lots of free/open-source editors out there that will crop the page — just don't use any Adobe product, they don't actually "crop" but "mask"). This might turn a 6x9 (printed size, US sizing) page to 6x8.25. Then, to be certain, run the cropped PDF through a PDF printer (to create a new PDF), and use that last PDF as the source for any later conversions/editing/whatever.

I've done this process with journal articles from Springer with about 80% success. It's been about 60% success with books, but it's a small sample size (and the fails were from OUP).

The downside is that you'll lose page numbering, but that's actually easier to put back in later either manually (iteratively inserting a naming anchor) or with a regexp search-and-replace than it is to deal with textual headers/footers via regexp.
Jaws is offline   Reply With Quote
Old Today, 05:08 AM   #10
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,189
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
I was able to somehow make this work, following theducks' suggestion, by using the Prince PDF Calibre plugin and the below custom style:

PHP Code:
@page {
  
size17cm 33cm;
  
margin5mm 10mm 5mm 10mm !important;
    @
top-left {
    
font-size50%;
    
font-styleitalic;
    
border-bottomsolid thin black;
    
margin-bottom1mm;
    
content'';
    
displayblock;
    
width500px;
    
height50px;
    
background-imageurl('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 10 300 70"><text x="0" y="40" font-family="Arial" font-size="28" fill="red" font-weight="bold">svg header test: @{@{title}@}@</text></svg>');
    
background-size500px 30px;
  }
  
  
   @
bottom-left {
    
font-size50%;
    
font-styleitalic;
    
border-topsolid thin black;
    
margin-bottom1mm;
    
content'';
    
displayblock;
    
width500px;
    
height50px;
    
background-imageurl('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 10 300 70"><text x="0" y="40" font-family="Arial" font-size="28" fill="red" font-weight="bold">svg footer test: @{@{author}@}@</text></svg>');
    
background-size500px 30px;
  } 
The attached PDF is a conversion of this title from Gutenberg Australia (an excerpt, actually):
https://gutenberg.net.au/epub-ebooks...%20Orwell.epub

I couldn't figure out how to call the section name and page numbers in the svg, but perhaps Jellby over at the Prince plugin thread can give some insight.

By using
Code:
     content: string(chaptertitle);
     content: counter(page) "/" counter(pages);
...in the CSS, those elements can be displayed, however they end up being selectable.

Hope this helps!
Attached Files
File Type: pdf _Nineteen eighty-four - George Orwell_1_1.pdf (179.8 KB, 1 views)

Last edited by Comfy.n; Today at 05:12 AM.
Comfy.n is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Books with headers and footers? gracie ePub 3 08-10-2012 08:04 AM
Where is remove Headers/Footers? Anarel Calibre 4 05-25-2011 04:36 PM
Removing Headers and Footers Here's What I Did allowingtoo Workshop 0 02-16-2011 08:46 PM
Removing Headers/Footers Help? Anarel Workshop 10 11-09-2010 12:53 PM
page headers/footers daesdaemar Workshop 20 12-12-2008 09:22 PM


All times are GMT -4. The time now is 09:21 AM.


MobileRead.com is a privately owned, operated and funded community.