Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2015, 03:22 PM   #1
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
insert a link to .pdf file

Hi, I have a bunch of HTML files that each contain hyperlinks to pdf files: each html page has information about a person, with links to supporting documentation in pdf. I would like to be able to convert this to pub.
To do so I created an ePub in sigil by adding the existing pages (which all come with references). If I then add the pdf files, these are stored in the "Misc" directory.

Which path should I use to refer to these files? I have tried various combinations in the manifest and in the spine, but the epub fails validation.
As an example, the html page/chapter may be something like this:
Quote:
<td class="text">Reference letter by Mr X<br />
<a href="Misc/421947.pdf" style="font-size: 10pt;" target="_blank">[View Letter]</a><br />
<br />
Then these in manifest and spine:
Quote:
<manifest>
...
<item href="Misc/421947.pdf" id="x421947.pdf" media-type="application/pdf" />
</manifest>
<spine toc="ncx">
...
<itemref idref="421947.pdf" />
</spine>
changing the path in manifest to either
Quote:
<manifest>
...
<item href="Text/Misc/421947.pdf" id="x421947.pdf" media-t
</manifest>
</spine>
or
Quote:
<manifest>
...
<item href="421947.pdf" id="x421947.pdf" media-t
</manifest>
</spine>
makes no difference. I am sure I am doing something really silly, but I cannot see my mistake (unsurprising as a total noob...). Can anyone please help?
paola is offline   Reply With Quote
Old 01-08-2015, 04:36 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,568
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't think you can open an internal file (pdf) with an external program via an epub. How would the epub reading software handle it?

There may be a way to embed a pdf in an epub, but I'm unaware of it if so. Sigil probably won't help you do it, and I don't know of any epub reading software that would handle it.
DiapDealer is offline   Reply With Quote
Advert
Old 01-08-2015, 04:42 PM   #3
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by DiapDealer View Post
I don't think you can open an internal file (pdf) with an external program via an epub. How would the epub reading software handle it?

There may be a way to embed a pdf in an epub, but I'm unaware of it if so. Sigil probably won't help you do it, and I don't know of any epub reading software that would handle it.
thanks diapdealer - I read here somebody managed, but it is also possible I misunderstood.
paola is offline   Reply With Quote
Old 01-08-2015, 05:58 PM   #4
varlog
actually it is /var/log
varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.varlog ought to be getting tired of karma fortunes by now.
 
varlog's Avatar
 
Posts: 341
Karma: 2994236
Join Date: Sep 2012
Location: usually Europa
Device: prs t1
You can convert PDFs into pictures - then any epub software can handle it as good as it can - which is probably not good enough.. Consider converting PDFs into (x)html.

Last edited by varlog; 01-08-2015 at 06:01 PM.
varlog is offline   Reply With Quote
Old 01-08-2015, 06:00 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by paola View Post
thanks diapdealer - I read here somebody managed, but it is also possible I misunderstood.
I experimented with this some time ago and created a test file that seems to work more or less, however, it won't fully validate with ePubCheck 3.0.1 and, IIRC, it will only work with the desktop versions of ADE 1.7.2 and ADE 4.0.2.
(The desktop versions of ADE 2 and 3 will crash after the second pdf page is being displayed and, AFAIK, most dedicated eInk readers don't support embedded .pdf files in .ePub files at all.)

It appears to work with iBooks (but it renders the pdf content poorly) and RMSDK based ePub apps, e.g. Bluefire for iOS, however, if this is for a commercial book, you'll probably have to convert it to ePub3 or fiddle with the .opf file to make it pass ePubCheck.

You might want to consider embedding an .svg file or a .png file instead.
Attached Files
File Type: epub embedded_pdf.epub (307.8 KB, 280 views)

Last edited by Doitsu; 01-12-2016 at 01:42 PM.
Doitsu is offline   Reply With Quote
Advert
Old 01-09-2015, 11:20 AM   #6
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
I have done something similar, by linking to a website for an enlarged image instead of the part-image reproduced in the book, but I can see that this might not work for you.
Notjohn is offline   Reply With Quote
Old 01-09-2015, 06:13 PM   #7
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
many many thanks for all your suggestions! I do not need a professional book, it is only something really handy for my work (a way of linking documents for job candidates which I can then annotate if it is in ebook format). Doitsu, thank you so much for the epub, I can now play around with it.
paola is offline   Reply With Quote
Old 01-09-2015, 06:16 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by paola View Post
many many thanks for all your suggestions! I do not need a professional book, it is only something really handy for my work (a way of linking documents for job candidates which I can then annotate if it is in ebook format). Doitsu, thank you so much for the epub, I can now play around with it.
You could put the PDF online someplace and then create the ePub with a link to the PDF via http. This might work.
JSWolf is offline   Reply With Quote
Old 01-10-2015, 03:53 AM   #9
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Thanks JSWolf, but one of the reason I want an ebook format is to be able to access the information off line.
paola is offline   Reply With Quote
Old 01-10-2015, 10:47 AM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,718
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by paola View Post
Thanks JSWolf, but one of the reason I want an ebook format is to be able to access the information off line.
@paola - maybe you could put a link to the pdf file that's on your computer in the EPUB

Code:
<a href="file:///D:/Documents/Quick%20Docs/10lessons.pdf/" target="_blank">Local: Cameron’s EU veto: 10 lessons that need to be learnt</a>
BR
BetterRed is offline   Reply With Quote
Old 01-11-2015, 06:41 AM   #11
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by BetterRed View Post
@paola - maybe you could put a link to the pdf file that's on your computer in the EPUB

Code:
<a href="file:///D:/Documents/Quick%20Docs/10lessons.pdf/" target="_blank">Local: Cameron’s EU veto: 10 lessons that need to be learnt</a>
BR
I had tried but failed - problem is I am trying to put it on an iPad, and I am not sure how to give the path out (it is not a rooted device). But if I know this must work, I'll try again, should manage something by trial and error - I'll report back when I succeed!
paola is offline   Reply With Quote
Old 01-11-2015, 08:15 AM   #12
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
@paola
If the html files are in the folder 'Text' and the pdf documents are in the folder 'Misc', the link would be

href="../Misc/421947.pdf"

../ in the path means one level up from the folder 'Text' and then down to the folder 'Misc'.

George
GMcG is offline   Reply With Quote
Old 01-11-2015, 09:16 AM   #13
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by GMcG View Post
@paola
If the html files are in the folder 'Text' and the pdf documents are in the folder 'Misc', the link would be

href="../Misc/421947.pdf"

../ in the path means one level up from the folder 'Text' and then down to the folder 'Misc'.

George
thanks George: I had tried this, but it did not work. Then the strangest thing happened, I noticed that the link did work for one file, the only one with extension ".PDF" instead of ".pdf". I ignored this for a while, then thought "what the hell", and renamed all the files with a capitalised ".PDF" extension (changing the links to them accordingly": it worked

Isn't this bizarre?

Many thanks to all for all your help! I will post my files later today, when I'll have a little more time.
paola is offline   Reply With Quote
Old 01-11-2015, 10:54 AM   #14
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: 31,047
Karma: 60358908
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 paola View Post
thanks George: I had tried this, but it did not work. Then the strangest thing happened, I noticed that the link did work for one file, the only one with extension ".PDF" instead of ".pdf". I ignored this for a while, then thought "what the hell", and renamed all the files with a capitalised ".PDF" extension (changing the links to them accordingly": it worked

Isn't this bizarre?

Many thanks to all for all your help! I will post my files later today, when I'll have a little more time.
Case Sensitive file names:
the link must match the target exactly.

foo.pdf is not foo.PDF, there needs to be file extension 2 associations (pdf and PDF) on the reading application (on the device ) for the PDF browser to work with both case.
The reading application is calling external/internal viewer when it encounters a link-click for a different file type. If the link matches the filename, then the viewer call is faulty
theducks is offline   Reply With Quote
Old 01-11-2015, 11:51 AM   #15
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,840
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by theducks View Post
Case Sensitive file names:
the link must match the target exactly.

foo.pdf is not foo.PDF, there needs to be file extension 2 associations (pdf and PDF) on the reading application (on the device ) for the PDF browser to work with both case.
The reading application is calling external/internal viewer when it encounters a link-click for a different file type. If the link matches the filename, then the viewer call is faulty
thanks the ducks, I do get that. The problem is this: when both link and target had "name.pdf" the link did not work, while when both link and target were "name.PDF" the link works! This is the mystery... I thought a file name is a file name, capitalisation (provided it is used correctly) should not matter. Or so I thought.
paola is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a cover in a MOBI file - Mobi or Epub as default file ? myki Library Management 12 06-27-2014 05:55 PM
Insert metadata from Calibre into PDF files aboettget Related Tools 10 06-22-2014 10:14 PM
insert pdf without messing up page numbers lauras231279 Workshop 2 10-05-2011 01:40 PM
Insert text while converting PDF to EPUB DougAtHitplays Conversion 5 09-23-2011 11:52 AM
DR800 Would there be no way to insert margin, viewing 'PDF's? bokjeid iRex 0 08-17-2010 08:53 AM


All times are GMT -4. The time now is 03:06 AM.


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