View Single Post
Old 06-10-2009, 08:15 PM   #6
LeoRivas
Junior Member
LeoRivas began at the beginning.
 
LeoRivas's Avatar
 
Posts: 4
Karma: 10
Join Date: Jun 2009
Device: SONY PRS-500
Hi
The best results I have got is doing this (PRS-500 though):

1.-Prepare the text in MS Word (with table of contents if you want)
2.-Convert it to .lit using wordrmr utility (available on http://www.microsoft.com/downloads/d...0-6bca50c7d356 ) ... dont forget to download jpg book covers
3.-Check it out on MS reader for PC, does it look good?
4.-Drop it on Calibre and convert it to LRF
5.-Put your head between your legs and be ready for the impact
6.-Be amazed on how it looks on PRS
7.-Repeat as desired (specially steps 1 to 3)

I tried several other methods before I got this one, you have to be specially careful when copying-pasting from pdf, since it converts end of line into a carriage return, messing up the results, and getting line and half of text on the PRS (of course, reading pdf's directly on the unit is a lot uncomfortable).
Then I came up with this vb script for word that will clear that undesired carriage returns after pasting the text into word (it is not very elegant, but does its job):

Code:
Sub RemoveParagraph()
'
' RemoveParagraph Macro
' Elimina los marcadores de párrafo del texto seleccionado
' LR, May '09
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    
    Dim arreglo As String
    
    
    
    With Selection.Find
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Forward = True
    End With
    
    'Remove undesired carriage return
    Dim letras As String
    Dim numletras As Integer
    Dim letra As String
    letras = "abcdefghijklmnñopqrstuvwxyzáéíóúABCDEFGHIJKLMNÑOPQRSTUVWXYZ,; "
    numletras = Len(letras)
    
    'Elimina los retornos de carro indeseados
    For a = 1 To numletras
    letra = Mid(letras, a, 1)
    Selection.Find.Replacement.Text = letra & " "
    Selection.Find.Text = letra & "^p"
    Selection.Find.Execute Replace:=wdReplaceAll
    Next
    Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
    
End Sub


Sub EliminaHeaders()

'Select undesired header and execute this

If Len(Selection.Text) < 3 Then
MsgBox ("Sin texto seleccionado o texto muy pequeño")
Exit Sub
End If

If MsgBox("You sure want to delete selected header(s)?", vbYesNo, "Alert") = vbNo Then Exit Sub


    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    
    Dim arreglo As String
    
    
    With Selection.Find
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Forward = True
        .Replacement.Text = ""
        .Text = Selection.Text
    End With
        
       Selection.Find.Execute Replace:=wdReplaceAll
   
End Sub

Sub EliminaNumerosPagina()
    'Delete undesired page numbering (when copied from pdf)
    On Error GoTo Fallo
    
    Dim strNum
    
    strNum = InputBox("Type original page number", "Delete page numbering")
    num = CInt(strNum)
    
    For a = num To 0 Step -1
    letra = Str(a)
    Selection.Find.Replacement.Text = " "
    Selection.Find.Text = a & "^p"
    Selection.Find.Execute Replace:=wdReplaceAll
    Next
       
    MsgBox ("Complete")
   Exit Sub
Fallo:
  MsgBox ("Something wrong happenned, please check: " & Err.Description)

End Sub
Hope it is useful, now I have made several books using this method and I am very satisfied, books look neat and professional on the prs, now is a real pleasure to read!
Leo

Last edited by LeoRivas; 08-15-2009 at 10:53 PM. Reason: Updated code
LeoRivas is offline   Reply With Quote