Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Writer2ePub

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 11-04-2010, 10:29 PM   #166
EricDP
Groupie
EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.EricDP ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 339490
Join Date: May 2010
Device: nook, BlackBerry
I've resolved indirectly - but using Calibre to import the source file directly (a web page), rather than opening the web page in OOo and using that to convert.
EricDP is offline  
Old 11-06-2010, 04:42 PM   #167
1drey
Member
1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold
 
Posts: 21
Karma: 11628
Join Date: Dec 2007
Device: Sony PRS-505 PB360 Opus Sony PRS-350
Sorry for stupid question, but how can I make cyrilic text look corectly in my Sony PRS350 reader? Can't figure out how the fonts can be embedded into document created with this extention?
1drey is offline  
Old 11-09-2010, 05:37 AM   #168
kreti
Member
kreti doesn't litterkreti doesn't litter
 
Posts: 19
Karma: 194
Join Date: Nov 2010
Location: Spain
Device: energy system 1060 / Avant XL / Boyue g10 2
Hi,

i was testing the last version 1.1.7, and , as the previous versions, was not implemented the numeration of elements. It show it as a simple paragraph.

i change the version of the 'Sub TraverseText', in the Traverse Macro, to permit this option. I show 3 options, because no all devices support lists or blockquotes. The last version, is the most simple, and I think it works for all devices, but fails to nest lists. Still, it's better than nothing.

Sub TraverseText
'From: http://www.pitonyak.org/AndrewMacro.odt, Listing 7.52: Enumerate paragraph level text content.

Dim oParEnum As object 'Enumerator used to enumerate the paragraphs
Dim oPar As object 'The enumerated paragraph
Dim oContentEnum 'Enum content, such As graphics objects
Dim oContent 'The numerated content
Dim oCurs As object
Dim sParEx As string 'The exported paragraph
Dim n, nPara As integer 'Paragraph counter
Dim MaxLength, CountLength as Long

MaxLength = val(myPrefs.getPropertyValue("SplitFilesEvery"))*1 000 ' Max Length of an xhtml file, used to split files
CountLength = 0

WritingMode = oDoc.StyleFamilies.getByName("PageStyles").getByNa me("Standard").WritingMode

sStartPageCode = "<?xml version=""1.0"" encoding=""utf-8""?>" & chr(13)
sStartPageCode = sStartPageCode & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""" & chr(13)
sStartPageCode = sStartPageCode & " ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" & chr(13)

AddPageBreakBeforeH1

If WritingMode = 2 Then
sStartPageCode = sStartPageCode & "<html xmlns=""http://www.w3.org/1999/xhtml"" xmlns:xml=""http://www.w3.org/XML/1998/namespace"" xml:lang=""ja"">" & Chr(13)
Else
sStartPageCode = sStartPageCode & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & Chr(13)
End If

' sStartPageCode = sStartPageCode & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & chr(13)
sStartPageCode = sStartPageCode & "<head>" & chr(13)
sStartPageCode = sStartPageCode & "<link rel=""stylesheet"" href=""../styles/style001.css"" type=""text/css"" />" & chr(13)
sStartPageCode = sStartPageCode & "<title></title>" & chr(13)
sStartPageCode = sStartPageCode & "</head>" & chr(13)
sStartPageCode = sStartPageCode & "<body>" & chr(13)

sEndPageCode = "</body>" & chr(13)
sEndPageCode = sEndPageCode & "</html>" & chr(13)
iImageCount = 0

oText = oDoc.Text

iSplitNumber = 1 'GLOBAL VARIABLE
bBreak = 0 '0=no break 1= break before 2= break after
bFirstpage = True

Dim oOutputAccess As Object
Dim oOutputStream As Object
Dim vOutputData As Variant
oOutputAccess = CreateUnoService("com.sun.star.ucb.SimpleFileAcces s")
oOutputStream = CreateUnoService("com.sun.star.io.TextOutputStream ")
vOutputData = oOutputAccess.openFileWrite(MyEpub & "/OEBPS/text/content" & Format(iSplitNumber,"0000") & ".xhtml")
oOutputStream.setOutputStream(vOutputData)
oOutputStream.setEncoding("UTF-8")
oOutputStream.writeString( sStartPageCode & Chr(13) )
'---- Show the progress bar
nPara = oDoc.ParagraphCount
oBar.start(progParaMSG, nPara)
n = 0
'---- Get "Standard" style CharHeight (I'll use it to compare "large font" height)
oCurs = oText.CreateTextCursor()
oCurs.GoToEnd(FALSE)
oText.insertControlCharacter(oCurs,com.sun.star.te xt.ControlCharacter.PARAGRAPH_BREAK,FALSE)
oCurs.ParaStyleName = "Standard"
fStandardCharHeight = oCurs.CharHeight
'---- Enumerate the paragraphs.
'---- Tables are enumerated along with paragraphs
'---------------------------------------------------
'codigo propio 2
dim nivelLista as integer
nivelLista=-1
dim sfin as string
sfin = ""
'fin codigopropio 2
'---------------------------------------------------

oParEnum = oDoc.getText().createEnumeration()
Do While oParEnum.hasMoreElements()
oPar = oParEnum.nextElement()
If oPar.supportsService("com.sun.star.text.Paragraph" ) Then '---- This manages the paragraphs
n = n + 1
oBar.setValue(n + 1 / nPara)
oContentEnum = oPar.createContentEnumeration("com.sun.star.text.T extContent")
Do While oContentEnum.hasMoreElements()
oContent = oContentEnum.nextElement()
If oContent.supportsService("com.sun.star.text.TextGr aphicObject") Then
'---- Print "Found a graphic object anchored to a Paragraph"
End If
Loop
'---- Call Paragraph analysis

sParEx = fnExportParagraph(oPar)

'--------------------------bisoft@hotmail.com--------------------------------------------------------------------
' 'codigo propio1 Mete el texto con bloquotes, y eso significa que va achatando la longitud de las lineas. No funciona con energy system 1060
' dim sinicio as string, sfin as string
' dim i as integer
' i=0
' sinicio=""
' sfin = ""
' if oPar.NumberingIsNumber = true then
' if oPar.ListLabelString = "" then
' while i<= oPar.NumberingLevel
' sinicio = sinicio & "<blockquote>"
' sfin = "</blockquote>" & sfin
' i=i+1
' wend
' sParEx = sinicio & "<p>" & "- " & right(sParEx, len(sParEx) - 3) & sfin
' else
' while i<= oPar.NumberingLevel
' sinicio = sinicio & "<blockquote>"
' sfin = "</blockquote>" & sfin
' i=i+1
' wend
' sParEx = sinicio & "<p>" & oPar.ListLabelString & right(sParEx, len(sParEx) - 3) & sfin
' end if
' end if
' ' fin codigo propio1

' codigo propio 2 Usa las listas de html. Funciona ok. Las numeraciones siempre serán numéricas. Se anidan bien. No funcionan en el energy system 1060
' if oPar.NumberingIsNumber = true then
' if oPar.NumberingLevel <> nivelLista then
' if oPar.NumberingLevel < nivelLista then 'retrocedemos un nivel nunha lista previa
' sParEx = left(sfin,len(sfin) - 5) & "<li>" & mid(sParEx, 4, len(sParEx) - 7) & "</li>"
' sfin=right(sfin,len(sfin) - 5)
' else
' if oPar.ListLabelString = "" then 'no ordenada
' sParEx = "<ul> <li>" + mid(sParEx, 4, len(sParEx) - 7) + "</li>"
' sfin = "</ul>" & sfin
' else 'ordenada
' sParEx = "<ol> <li>" + mid(sParEx, 4, len(sParEx) - 7) + "</li>"
' sfin = "</ol>" & sfin
' end if
' end if
' nivelLista = oPar.NumberingLevel
' else
' sParEx = "<li>" & mid(sParEx, 4, len(sParEx) - 7) & "</li>"
' end if
'
' else
' sParEx = sfin + sParEx
' sfin=""
' nivelLista=-1
' end if
' fin codigo propio 2

'codigo propio 3. Simplemente añade el label string para las ordenadas, y un "- " para las otras. Todos quedan a la misma altura, sin anidamientos. Es el único que funciona en energy system.
if oPar.NumberingIsNumber = true then
if oPar.ListLabelString = "" then
sParEx = "<p>" & "- " & right(sParEx, len(sParEx) - 3)
else
sParEx = "<p>" & oPar.ListLabelString & right(sParEx, len(sParEx) - 3)
end if
end if
' fin codigo propio 3
'-------------------------------bisoft@hotmail.com----------------------------------------------------

CountLength = CountLength + Len (sParEx)
If CountLength > MaxLength Then
If bBreak = 0 then bBreak = 1
CountLength = 0
End If
Select Case bBreak
Case 0
oOutputStream.writeString( sParEx & Chr(13) )
Case 1 '---- split file before
oOutputStream.writeString( sEndPageCode & Chr(13) )
oOutputStream.flush()
oOutputStream.closeOutput()
iSplitNumber = iSplitNumber +1
vOutputData = oOutputAccess.openFileWrite(MyEpub & "/OEBPS/text/content" & Format(iSplitNumber,"0000") & ".xhtml")
oOutputStream.setOutputStream(vOutputData)
oOutputStream.setEncoding("UTF-8")
oOutputStream.writeString( sStartPageCode & Chr(13) )
oOutputStream.writeString( sParEx & Chr(13) )
Case 2 '---- split file after
oOutputStream.writeString( sParEx & Chr(13) )
oOutputStream.writeString( sEndPageCode & Chr(13) )
oOutputStream.flush()
oOutputStream.closeOutput()
iSplitNumber = iSplitNumber +1
vOutputData = oOutputAccess.openFileWrite(MyEpub & "/OEBPS/text/content" & Format(iSplitNumber,"0000") & ".xhtml")
oOutputStream.setOutputStream(vOutputData)
oOutputStream.setEncoding("UTF-8")
oOutputStream.writeString( sStartPageCode & Chr(13) )
End Select
'---- Export Paragraph text
End If
If oPar.supportsService("com.sun.star.text.TextTable" ) Then '---- This manages the tables.
oOutputStream.writeString( fnExportTable(oPar) & Chr(13) )
End If
Loop
oOutputStream.writeString( sEndPageCode & Chr(13) )
oOutputStream.flush()
oOutputStream.closeOutput()
End Sub
Sorry for my english.
kreti is offline  
Old 11-10-2010, 02:40 PM   #169
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by 1drey View Post
Sorry for stupid question, but how can I make cyrilic text look corectly in my Sony PRS350 reader? Can't figure out how the fonts can be embedded into document created with this extention?
Sorry for late answer...

About Cyrillic text, I don't yet start to look for it.
If you have an epub that look fine in your reader, please send it to me at writer2epub@gmail.com, and I will try to understand how to do it.
If possible, I need also a file in .odt, maybe the same of epub.

Thanks

Luke
eBookLuke is offline  
Old 11-10-2010, 02:40 PM   #170
glin
Zealot
glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.glin ought to be getting tired of karma fortunes by now.
 
Posts: 141
Karma: 1004072
Join Date: Jan 2010
Location: Paris/Nîmes (France)
Device: Bebook Neo / Samsung Galaxy Note 2
I hope Writer 2 Epub will be usable too with LibreOffice, the recent fork of OpenOffice ?
glin is offline  
Old 11-10-2010, 11:32 PM   #171
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by glin View Post
I hope Writer 2 Epub will be usable too with LibreOffice, the recent fork of OpenOffice ?
Now W2E is compatible with NeoOffice, and in the future also with LibreOffice, as soon as will be release the final version.

Luke
eBookLuke is offline  
Old 11-11-2010, 03:28 AM   #172
1drey
Member
1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold1drey is a marvel to behold
 
Posts: 21
Karma: 11628
Join Date: Dec 2007
Device: Sony PRS-505 PB360 Opus Sony PRS-350
Quote:
Originally Posted by eBookLuke View Post
If possible, I need also a file in .odt, maybe the same of epub.
Luke,

I've sent and email with sample epub and .odt fules.

Thank you very much!

Andrey
1drey is offline  
Old 11-15-2010, 02:23 PM   #173
CPatrick
Junior Member
CPatrick began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2010
Device: N516
Superscript

Hello,

writer2epub is a very good tool that I use to transform web texts from wikisource to epub : with 2 clics it's done, and it's fine. The problem is in (french) texts with superscripts (<sup>...</sup>) :

If I copy/paste the texts from web to OpenOffice, the superscript is OK (on the screen and in the ''caracter properties''), but in the epub generated with writer2epub there is no more <sup>...</sup>.

If I wrote directly the same text in OO, export it with writer2epub, it's OK : the epub use <sup>...</sup>.

Do you know why ?
CPatrick is offline  
Old 11-15-2010, 04:27 PM   #174
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by CPatrick View Post
Hello,

writer2epub is a very good tool that I use to transform web texts from wikisource to epub : with 2 clics it's done, and it's fine. The problem is in (french) texts with superscripts (<sup>...</sup>) :

If I copy/paste the texts from web to OpenOffice, the superscript is OK (on the screen and in the ''caracter properties''), but in the epub generated with writer2epub there is no more <sup>...</sup>.

If I wrote directly the same text in OO, export it with writer2epub, it's OK : the epub use <sup>...</sup>.

Do you know why ?

Hi,

as usual, please send me the text that causes problems at writer2epub@gmail.com

Thanks

Luke
eBookLuke is offline  
Old 12-11-2010, 12:41 PM   #175
Oletros
Connoisseur
Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.
 
Posts: 76
Karma: 501130
Join Date: Feb 2008
Location: Barcelona
Device: Kindle NT
Hi, using OO 3.2 when I try to install writer2epub 1.17 raises this error, any help?

Oletros is offline  
Old 12-11-2010, 02:16 PM   #176
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by Oletros View Post
Hi, using OO 3.2 when I try to install writer2epub 1.17 raises this error, any help?

Hi,

1) try to reboot the PC. This is a good suggestion for all the extension upgrades.
2) write to me at write2epub@gmail.com, I will reply by sending to you a new beta version to test.

Thanks

Luke
eBookLuke is offline  
Old 12-11-2010, 02:32 PM   #177
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by CPatrick View Post
Hello,

writer2epub is a very good tool that I use to transform web texts from wikisource to epub : with 2 clics it's done, and it's fine. The problem is in (french) texts with superscripts (<sup>...</sup>) :

If I copy/paste the texts from web to OpenOffice, the superscript is OK (on the screen and in the ''caracter properties''), but in the epub generated with writer2epub there is no more <sup>...</sup>.

If I wrote directly the same text in OO, export it with writer2epub, it's OK : the epub use <sup>...</sup>.

Do you know why ?
Solved, will be available in the next version

Luke
eBookLuke is offline  
Old 12-11-2010, 02:34 PM   #178
eBookLuke
Writer2ePub creator
eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.eBookLuke is the king of the Divan.
 
eBookLuke's Avatar
 
Posts: 342
Karma: 106889
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
Quote:
Originally Posted by glin View Post
I hope Writer 2 Epub will be usable too with LibreOffice, the recent fork of OpenOffice ?
Starting from now, LibreOffice is the development platform.
The extension is also tested on OpenOffice.org and NeoOffice.

Luke
eBookLuke is offline  
Old 12-11-2010, 03:56 PM   #179
Oletros
Connoisseur
Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.Oletros ought to be getting tired of karma fortunes by now.
 
Posts: 76
Karma: 501130
Join Date: Feb 2008
Location: Barcelona
Device: Kindle NT
Quote:
Originally Posted by eBookLuke View Post
Hi,

1) try to reboot the PC. This is a good suggestion for all the extension upgrades.
2) write to me at write2epub@gmail.com, I will reply by sending to you a new beta version to test.

Thanks

Luke
Solved, I have installed OO 3.3 RC7 and it works

Grazie
Oletros is offline  
Old 12-11-2010, 06:01 PM   #180
PeterMzizi
Member
PeterMzizi began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2010
Device: sony prs 300
Just downloaded 1.1.7 - installed fine but needed a restart of OOo (3.2 on Kubuntu 10.10)
Very nice feature - metadata
Very easy to use for conversion
Nice that it does TOC
My problem is that the paragraph formatting is not preserved in any way - for example the epub has no spaces between paragraphs and most of the first lines are indented except the ones following the headings - this is not how my odt file is.
Is there any way to change this behaviour (for me as a user)?
Also an idea for another feature - how about an 'ignore TOC in .odt' as it looks rather silly in the epub (yes I know I could just delete it before conversion but ......)
Thanks for your work on this OOo extension
PeterMzizi is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LaTeX and OpenOffice -> EPUB ? (Professional solution) Randy11 ePub 22 11-11-2010 12:03 AM
EPUB Expert Needed: Cant properly export epub from InDesign crottmann ePub 17 08-27-2010 11:23 AM
OpenOffice to Palm eReader export macro poxi1023 Other formats 29 02-28-2009 06:49 PM
OpenOffice PDF Import and Hybrid Export wallcraft Workshop 0 06-06-2008 09:15 PM
OpenBerg FireFox extension for ePub wallcraft Reading and Management 20 10-05-2007 12:24 PM


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


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