11-04-2010, 09:29 PM | #166 |
Groupie
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.
|
11-06-2010, 03:42 PM | #167 |
Member
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?
|
Advert | |
|
11-09-2010, 04:37 AM | #168 |
Connoisseur
Posts: 52
Karma: 194
Join Date: Nov 2010
Location: Spain
Device: energy system 1060 / Avant XL / Onyx Boox M96
|
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 |
11-10-2010, 01:40 PM | #169 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
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 |
|
11-10-2010, 01:40 PM | #170 |
Groupie
Posts: 169
Karma: 1004072
Join Date: Jan 2010
Location: Carcassonne (France)
Device: Kobo Aura H20 / OnePlus 5
|
I hope Writer 2 Epub will be usable too with LibreOffice, the recent fork of OpenOffice ?
|
Advert | |
|
11-10-2010, 10:32 PM | #171 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
Luke |
|
11-11-2010, 02:28 AM | #172 |
Member
Posts: 21
Karma: 11628
Join Date: Dec 2007
Device: Sony PRS-505 PB360 Opus Sony PRS-350
|
|
11-15-2010, 01:23 PM | #173 |
Junior Member
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 ? |
11-15-2010, 03:27 PM | #174 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
Hi, as usual, please send me the text that causes problems at writer2epub@gmail.com Thanks Luke |
|
12-11-2010, 11:41 AM | #175 |
Connoisseur
Posts: 89
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?
|
12-11-2010, 01:16 PM | #176 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
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 |
|
12-11-2010, 01:32 PM | #177 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
Luke |
|
12-11-2010, 01:34 PM | #178 | |
Writer2ePub creator
Posts: 354
Karma: 121129
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
The extension is also tested on OpenOffice.org and NeoOffice. Luke |
|
12-11-2010, 02:56 PM | #179 | |
Connoisseur
Posts: 89
Karma: 501130
Join Date: Feb 2008
Location: Barcelona
Device: Kindle NT
|
Quote:
Grazie |
|
12-11-2010, 05:01 PM | #180 |
Member
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 |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LaTeX and OpenOffice -> EPUB ? (Professional solution) | Randy11 | ePub | 22 | 11-10-2010 11:03 PM |
EPUB Expert Needed: Cant properly export epub from InDesign | crottmann | ePub | 17 | 08-27-2010 10:23 AM |
OpenOffice to Palm eReader export macro | poxi1023 | Other formats | 29 | 02-28-2009 05:49 PM |
OpenOffice PDF Import and Hybrid Export | wallcraft | Workshop | 0 | 06-06-2008 08:15 PM |
OpenBerg FireFox extension for ePub | wallcraft | Reading and Management | 20 | 10-05-2007 11:24 AM |