Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: LuciusMare 20 Března 2010, 12:44:34
-
Zdravím, chtěl jsem si převést pár .pdf souborů na .epub. Používám ebook-convert (z calibre), které to nejdřív převede na html, přes pdftohtml. Bohužel, pdftohtml nefunguje úplně přesně podle představ - diaktrika obecně tam je, ale naprosto chybí některé znaky, jako například ů a ř. Je místo nich mezera. Googlil jsem a našel jsem že bych to měl udělat ručně, a s parametrem -enc Latin2. To mi ale zase pdftohtml vyplivne že:
Error: Couldn't find unicodeMap file for the 'Latin2' encoding. To jsem googlil dále, ale nenašel jsem nic užitečného. Prý bych si měl nainstalovat balíček ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2.tar.gz , to jsem udělal, ale hází pořád stejnou chybu. Výpis pár relevatních souborů...
/etc/xpdf/xpdfrc-latin2:
#----- begin Latin2 support package (2002-oct-22)
unicodeMap Latin2 /usr/share/xpdf/latin2/Latin2.unicodeMap
#----- end Latin2 support package
/etc/xpdf/xpdfrc
#========================================================================
#
# System-wide xpdfrc file
#
# The Xpdf tools look for a config file in two places:
# 1. ~/.xpdfrc
# 2. /etc/xpdf/xpdfrc
#
# Note that if ~/.xpdfrc exists, Xpdf will NOT read the system
# configuration file /etc/xpdf/xpdfrc. You may wish to include it
# from your ~/.xpdfrc using:
# include /etc/xpdf/xpdfrc
# and then add additional settings.
#
# For complete details on config file syntax and available options,
# please see the xpdfrc(5) man page.
#
# http://www.foolabs.com/xpdf/
#
#========================================================================
#----- display fonts
# These map the Base-14 fonts to the Type 1 fonts that ship with
# ghostscript (gsfonts package).
displayFontT1 Times-Roman /usr/share/fonts/type1/gsfonts/n021003l.pfb
displayFontT1 Times-Italic /usr/share/fonts/type1/gsfonts/n021023l.pfb
displayFontT1 Times-Bold /usr/share/fonts/type1/gsfonts/n021004l.pfb
displayFontT1 Times-BoldItalic /usr/share/fonts/type1/gsfonts/n021024l.pfb
displayFontT1 Helvetica /usr/share/fonts/type1/gsfonts/n019003l.pfb
displayFontT1 Helvetica-Oblique /usr/share/fonts/type1/gsfonts/n019023l.pfb
displayFontT1 Helvetica-Bold /usr/share/fonts/type1/gsfonts/n019004l.pfb
displayFontT1 Helvetica-BoldOblique /usr/share/fonts/type1/gsfonts/n019024l.pfb
displayFontT1 Courier /usr/share/fonts/type1/gsfonts/n022003l.pfb
displayFontT1 Courier-Oblique /usr/share/fonts/type1/gsfonts/n022023l.pfb
displayFontT1 Courier-Bold /usr/share/fonts/type1/gsfonts/n022004l.pfb
displayFontT1 Courier-BoldOblique /usr/share/fonts/type1/gsfonts/n022024l.pfb
displayFontT1 Symbol /usr/share/fonts/type1/gsfonts/s050000l.pfb
displayFontT1 ZapfDingbats /usr/share/fonts/type1/gsfonts/d050000l.pfb
# If you need to display PDF files that refer to non-embedded fonts,
# you should add one or more fontDir options to point to the
# directories containing the font files. Xpdf will only look at .pfa,
# .pfb, and .ttf files in those directories (other files will simply
# be ignored).
#fontDir /usr/local/fonts/bakoma
#----- PostScript output control
# Set the default PostScript file or command.
psFile "|lpr"
# Set the default PostScript paper size -- this can be letter, legal,
# A4, or A3. You can also specify a paper size as width and height
# (in points). Xpdf uses the paper size in /etc/papersize by default.
#psPaperSize letter
#----- text output control
# Choose a text encoding for copy-and-paste and for pdftotext output.
# The Latin1, ASCII7, and UTF-8 encodings are built into Xpdf. Other
# encodings are available in the language support packages.
#textEncoding UTF-8
# Choose the end-of-line convention for multi-line copy-and-past and
# for pdftotext output. The available options are unix, mac, and dos.
#textEOL unix
#----- misc settings
# Enable Type 1 font rasterizing with t1lib. Default "yes".
#enableT1lib no
# Enable TrueType and Type 1 font rasterizing with FreeType. Default "yes".
#enableFreeType no
# Enable anti-aliasing of fonts. Default "yes".
#antialias no
# Set the command used to run a web browser when a URL hyperlink is
# clicked.
urlCommand "sensible-browser '%s'"
# Include the language configuration file list generated by update-xpdfrc
include /etc/xpdf/includes
-
nemel by byt spis obsah toho /etc/xpdf/xpdfrc-latin2 v /etc/xpdf/xpdfrc ?
-
IMHO ne:
# ls /etc/xpdf/
includes xpdfrc xpdfrc-arabic xpdfrc-cyrillic xpdfrc-greek xpdfrc-hebrew xpdfrc-latin2 xpdfrc-thai xpdfrc-turkishA stejně to nefunguje :(
-
a zkousel jsi to i aniz bys prejmenoval to /etc/xpdf/add-to-xpdfrc.latin2 na /etc/xpdf/xpdfrc-latin2 (a opravdu tam mas tu cestu spravne?)
EDIT: (a co zmena distra? me to ve fedore slape jako hodinky :D)
-
add-to-xpdf znamená že to tam mám přidat :)
-
Heh, tak's měl asi pravdu, mělo se to dát do system-wide konfiguráku, a já prostě použil to z readme ;D Ale ani po přidání do správného konfiguráku nefunguje...
-
add-to-xpdf znamená že to tam mám přidat :)
nj, ve fedore to mam rovnou z repo v /etc/xpdf/add-to-xpdfrc.latin2 a nevsiml jsem si, ze v /etc/xpdfrc to mam includovany
jestli myslis tim, ze to stejne nefunguje, ze ty znaky chybi porad i kdyz to projde bez erroru, tak to bude spis tim, ze to potrebuje win1250 (a k tomu se mi unicodemap nikde podarilo najit)
-
Ne, to že tím stejně nefunguje jsem myslel že to pořád říká že to nemá tu mapu... Dej sem výpis toho xpdfrc.