![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
WOLF format
Is there a description of this format somewhere? Is anyone using it? Where can books in this format be obtained? Are there converters available?
There needs to be a wiki entry on this format and I could use some help. Dale |
![]() |
![]() |
![]() |
#2 |
Gizmologist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
It's HanLin's pet format (you should pardon the pun). Unfortunately, that's about all I know about it.
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,260
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Someone once contacted me to write a converter for it, but apparently hanlin didn't want to part with its specifications.
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() ![]() Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
|
Quote:
From the Hanlin docs... Code:
struct HlDocInfoS { int type; int lang; int pageNum; int fileSize; char *fileName; char *fileDate; //Printable file date. for example 08/22/2007 char *bookName; char *author; char *series; // e.g. "Harry Potter #2" char *isbn; char *publisher; char *publishDate; char *translator; char *originalName; // name of book in original language, for translation char *originalAuthor; // author(s) in original language, for translation char *originalSeries; // author(s) in original language, for translation }; Code:
Wolf file structure (sections): { Header Description [Cover] WolfPages Catalog [SubCatalog] PageTable } 1. Header Length = 128 bytes. { WolFileId : array[0..12] of Char; Unknown0D : DWORD; Unknown11 : WORD; Unknown13 : DWORD; DescriptionSize : WORD; CoverSize : DWORD; Unknown1D : Byte; CatalogSize : DWORD; Level1Items : DWORD; WolfPagesSize : DWORD; Unknown2A : array[0..17] of Byte; PageTableSize : DWORD; Unknown40 : Byte; BookType : Byte; Unknown42 : WORD; Unknown44 : array[0..6] of Byte; Unknown4B : WORD; Unknown4D : array[0..17] of Byte; Level23Items : WORD; SubCatalogOffs : DWORD; Unknown65 : array[0..26] of Byte; } where: [0x00] WolFileId: constant = "WolfEbook1.11" [0x0D] Unknown0D: constant = 0x00000000 [0x11] Unknown11: constant = 0x0201 [0x13] Unknown13: constant = 0x00000000 [0x17] DescriptionSize: size of section "Decription" [0x19] CoverSize: size of section "Cover". 0, if there is no cover page. [0x1D] Unknown1D: ??? really unknown. (!!! I think this is 0 for "Homochrome" Wolf, 1 for "Gray" Wolf file.) [0x1E] CatalogSize: size of sections "Catalog" and "SubCatalog". [0x22] Level1Items: count of items on first catalog level. [0x26] WolfPagesSize: size of section "WolfPages". [0x2A] Unknown2A: constant = fill with 0x00. [0x3C] PageTableSize: size of section "PageTable". [0x40] Unknown40: constant = 0x01 [0x41] BookType: 0=book, 1=article; 2=magazine [0x42] Unknown42: ??? really unknown. (!!! I think this fiels is = 2*<count of pages> - only for graphic wolf!) [0x44] Unknown44: constant = fill with 0x00. [0x4B] Unknown4B: ??? really unknown. (!!! I think this fiels is = <count of pages> - only for graphic wolf!) [0x4D] Unknown4D: constant = fill with 0x00. [0x5F] Level23Items: count of all items on levels 2 and 3. [0x61] SubCatalogOffs: offset (from begining of file) to section "SubCatalog". 0, if there is no "SubCatalog" section. [0x65] Unknown65: constant = fill with 0x00. CatalogSize = 19 + CountOfLevel1TOCItems * 17 + Length(NamesInLevel1TOC) SubcatalogSize = 26 + CountOfAllTOCItems * 80 + Length(NamesInAllTOCLevels) PageTableSize = 105 + 56 * PagesCount {for ver="021211"} = 105 + 60 * PagesCount {for ver="001"} 2. Description: A string with 9 pseudo-XML elements. Every tag is followed by value and new line (#13#10). Tags with empty value can't be omited. <title> - Title of book. Max - 128 chars (according to WolfDLL description). <subject> - Subject, type. Max - 128 chars (according to WolfDLL description). <author> - Author name. Max - 128 chars (according to WolfDLL description). <adpter> - Adapter (???). Max - 128 chars (according to WolfDLL description). <translator> - Translator. Max - 128 chars (according to WolfDLL description). <publisher> - Publisher. Max - 128 chars (according to WolfDLL description). <time_publish> - Publishing time. Max - 16 chars (according to WolfDLL description). <introduction> - Annotation. Max - 1024 chars (according to WolfDLL description). This field allow using of new line chars (#10#13). <ISBN> - ISBN. Max - 128 chars (according to WolfDLL description). 3. Cover Section "Cover" contains description (header) and data for cover page: { CoverHeader CoverData } 3.1. CoverHeader Length = 10 bytes. { Compression : WORD; ImageWidth : WORD; BitsPerPixel : WORD; BytesPerLine : WORD; ImageHeight : WORD; } where: [0x00] Compression: 0xFFFF for raw data (no compression); 0x0001 for LZSS compression. [0x02] ImageWidth: width of image (in pixels) [0x04] BitsPerPixel: 1 for monochrome images; 2 for 4-level gray images. [0x06] BytesPerLine: count of bytes in one row of image. (= ImageWidth*BitsPerPixel/8) [0x08] ImageHeight: height of image (in pixels) 3.2. CoverData Raw bitmask for pixels (if Compression=0xFFFF) or compressed with LZSS (if Compression=0x0001). Note that in monochrome images 1 is black and 0 is white; in 4-level gray images 0 is black and 3 is white. 4. WolfPages Pseudo-XML node; tags are written without dividers. Warning: There is #13#10 between <wolf> and <catalog>, but not between </catalog> and </wolf>. { <wolf> <catalog> <img bitcount=%B compact=1 width=%W height=%H length=%L> ImageData (for page 1) </img> <img bitcount=%B compact=1 width=%W height=%H length=%L> ImageData (for page 2) </img> ... <img bitcount=%B compact=1 width=%W height=%H length=%L> ImageData (for last page) </img> </catalog></wolf> } where: %B: Bits per pixel - 1 for monochrome images; 2 for 4-level gray images. %W: Width of image (in pixels) %H: Height of image (in pixels) %L: Length of ImageData ImageData: compressed bitmask stream. Note that in monochrome images 1 is black and 0 is white; in 4-level gray images 0 is black and 3 is white. 5. Catalog Pseudo-XML node; tags are written without dividers (like new lines): { <catalog> <item>ItemName</item>ItemOffs ... <item>ItemName</item>ItemOffs </catalog> } where: ItemName: Name of element from first level in TOC (table of contents). ItemOffs: Offset from beginning of section "WolfPages" to description of page (<img...>). Every item represents one element from first level in TOC. If there is no TOC, catalog contains only one item with ItemName=BookTitle and ItemOffs=OffsetOfPage#1. 6. SubCatalog Describes full TOC. If there is no TOC, this section not exists. Pseudo-XML node; datas are written without dividers (like new lines): { <subcatalog> Item1 Item2 ... ItemN Names </subcatalog> } Every item represents one element from TOC. Elements are ordered as followed: first are all items in level 1, then all items in level 2, and then - all items in level 3. Elements in same level are ordered by his number (index) in level. 6.1. SubCatalog Item Length = 80 bytes. { PageOffs : DWORD; NameOffs : DWORD; NameSize : WORD; ChildsCount : WORD; PrevPeerOffs : DWORD; NextPeerOffs : DWORD; ChildOffs : DWORD; ParentOffs : DWORD: Level3Idx : Byte; Level2Idx : Byte; Level1Idx : Byte; AlignByte : Byte; ItemName : array[0..47] of Byte; } where: [0x00] PageOffs: offset from beginning of section "WolfPages" to description of page (<img...>). [0x04] NameOffs: offset from beginning of file to beginnig of name (in "Names" area). [0x08] NameSize: length (in chars) of name (in "Names" area). [0x0A] ChildsCount: count of subitems for this element from TOC. [0x0C] PrevPeerOffs: offset from beginning of file to the description of previous peer element in SubCatalog table. 0, if current item is the first child of parent. [0x10] NextPeerOffs: offset from beginning of file to the description of next peer element in SubCatalog table. 0, if current item is the last child of parent. [0x14] ChildOffs: offset from beginning of file to the description of first child in SubCatalog table. 0, if there is no subitems (in TOC) for current item. [0x18] ParentOffs: offset from beginning of file to the description of parent element in SubCatalog table. 0, if element is on level 1. [0x1C] Level3Idx: level 3 index of element; 0 if element is on level 1 or level 2 in TOC. [0x1D] Level2Idx: level 2 index of element; 0 if element is on level 1 in TOC. [0x1E] Level1Idx: level 1 index of element. [0x1F] AlignByte: constant = 0x00. [0x20] ItemName: name of item in TOC. All items are ordered by levels - first going all items in level 1, then all items in level 2, then all items in level 3. 6.2. Names All names for subcatalog items without dividers. Ends with constant = 0x08. 7. PageTable Pseudo-XML node; tags are written without dividers (like new lines): { <pagetable ver="021211 "> Group1Offs : DWORD; Group2Offs : DWORD; GroupDiv1Offs : DWORD; Group3Offs : DWORD; Group4Offs : DWORD; GroupDiv2Offs : DWORD; Group5Offs : DWORD; Group6Offs : DWORD; GroupDiv3Offs : DWORD; Group7Offs : DWORD; Group8Offs : DWORD; GroupDiv4Offs : DWORD; EndFileOffs : DWORD; </pagetable> PageOffsGroup1 PageOffsGroup2 GroupDivider1 PageOffsGroup3 PageOffsGroup4 GroupDivider2 PageOffsGroup5 PageOffsGroup6 GroupDivider3 PageOffsGroup7 PageOffsGroup8 GroupDivider4 } where: [0x00] Group1Offs: offset from beginning of file to PageOffsGroup1. [0x04] Group2Offs: offset from beginning of file to PageOffsGroup2. [0x08] GroupDiv1Offs: offset from beginning of file to GroupDivider1. [0x0C] Group3Offs: offset from beginning of file to PageOffsGroup3. [0x10] Group4Offs: offset from beginning of file to PageOffsGroup4. [0x14] GroupDiv2Offs: offset from beginning of file to GroupDivider2. [0x18] Group5Offs: offset from beginning of file to PageOffsGroup5. [0x1C] Group6Offs: offset from beginning of file to PageOffsGroup6. [0x20] GroupDiv3Offs: offset from beginning of file to GroupDivider3. [0x24] Group7Offs: offset from beginning of file to PageOffsGroup7. [0x28] Group8Offs: offset from beginning of file to PageOffsGroup8. [0x2C] GroupDiv4Offs: offset from beginning of file to GroupDivider4. [0x30] EndFileOffs: offset from beginning of file to end of file (size of file). GroupDividerX: constant = 0xFFFFFFFF. PageOffsGroup1, PageOffsGroup2, PageOffsGroup3, PageOffsGroup4, PageOffsGroup7 and PageOffsGroup8 have following structure: { CatalogOffs : DWORD; Page1Offs : DWORD; Page2Offs : DWORD; Page2Offs : DWORD; ... PageNOffs : DWORD; PageNOffs : DWORD; } where: [0x00] CatalogOffs: offset from beginning of file to beginning of Wolf catalog ("<catalog>" in section "WolfPages"). [0x04] Page1Offs: offset from beginning of file to description of first page (<img...>). [0x08] Page2Offs: offset from beginning of file to description of second page (<img...>). [0x0C] -"- ... [0x??] PageNOffs: offset from beginning of file to description of last page (<img...>). Minimal size of this structure is 2 items (8 bytes). PageOffsGroup5 and PageOffsGroup6 have following structure: { CatalogOffs : DWORD; Page2Offs : DWORD; Page3Offs : DWORD; ... PageNOffs : DWORD; } where all items are the same as in PageOffsGroup1 description. Minimal size of this structure is 1 item (4 bytes). Note: For page table version "001" header is: <pagetable ver="001"> and all groups are like PageOffsGroup5 and PageOffsGroup6. --- From the Hanlin SDK docs - /sdk_root/docs/Parser-Viewer.pdf A more descriptive file (the 2nd codeblock above) can be found in the CoolReader sources... /crengine/docs/WolfFormat.txt from the Coolreader site. Hope that helps! Y. |
|
![]() |
![]() |
![]() |
#5 | |
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Oct 2007
Device: none/Hanlin V3/Nokia E50
|
Quote:
Its proprietary Jinkie format with DRM ability. They releases MS Windows software, so you can "print" to WOLF format (check WOLFPrinter software - for V8, of course it works with V3). I'm not sure how close have you check your V3 - maybe you have noticed it. Near battery there is a slot for SIM card - it can be used for DRM'ing books. Any way - I've tried WOLF and I'm not impressed. For regular user there is nothing more than pdf (even filesize). |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,652
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Unless the V3 supports a DRM format that you can purchase at some ebook shop to get say the latest bestseller, its going to tank. I've said this from day one when they announced this Wolf format as their DRM format. And I still think so. The average person will have no idea what to do with a V3. It'll just be a case of "Oh that looks nice" and then into some drawer to sit there unused. I know Sony has their BBeB format, but at least they have a shop and real books in that format. Wolf format has no bestsellers and Jinke wanting to keep Wolf a closed format is just shooting themselves in the foot (so to speak).
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,260
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@mrdini
Thanks ![]() |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Connoisseur
![]() ![]() Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
|
Quote:
But in the case of the V6, there definitely is 2 versions of WOLF files. Let me explain... When you use the Hanlin printer, the output appears to be graphical/bitmapped, and the resulting output cannot be zoomed in/out. The result does look good, as the fonts matches what's on your computer display. When you use the Wolf application (chinese-only(?)) to create the WOLF file, it is rendered as text, and the text CAN be zoomed in/out, and the text does reflow, which leads me to think it's actual text. However, the output from the Wolf application is hmmm.... passable :P Nothing to write home about! Checking the code I gave earlier, it appears that the latter format isn't documented, although I could be wrong, as I haven't got enough C coding skills to be able to implement a Wolf parser yet... Hope that helps! Out of curiousity, what are you planning on doing with the WOLF format... |
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,652
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is it possible to purchase ebooks in this Wolf format?
|
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() ![]() Posts: 97
Karma: 177
Join Date: Sep 2007
Device: Hanlin V2 & V6
|
|
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,652
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If I am correct then, this Wolf format is not very useful for the United States then right?
|
![]() |
![]() |
![]() |
#14 |
Sir Penguin of Edinburgh
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Does anyone know how to make WOLF format ebooks, other than with Wolf Printer?
|
![]() |
![]() |
![]() |
#15 |
Zealot
![]() ![]() ![]() ![]() Posts: 120
Karma: 374
Join Date: Feb 2008
Location: Mexico, Queretaro
Device: PocketBook 602, LBook V3
|
Nate the great Yes, there are several possibilities.
1) JAP - to convert PDF/DjVu files directly to WOL format (with many useful functions, such as 2,3,4 frames per PDF page, manual frame positions adjusting (separately for even and odd pages), brightness/contrast adjusting etc. - it definitely worth trying. 2) LBookPrinter and LBookMaker 3) FB2GrWol - Convertor of the FB2 format to the graphical WOLF format (nice tool if you like Table of Content and custom fonts on V8). 4) Cool Reader 3 - the same engine used in V3 for FB2 rendering. Last edited by torbich; 03-04-2008 at 05:18 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free Book (Kindle/Nook/Sony/iBooks) - Wolf Signs | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 12 | 04-25-2012 09:56 PM |
Lone Wolf Game Books | jabberwock_11 | General Discussions | 18 | 10-11-2011 12:45 AM |
WOLF DRM | keng2000 | HanLin eBook | 0 | 09-03-2009 09:02 PM |
Lone wolf gamebooks | shousa | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 11-19-2008 02:28 PM |
Wolf Linux | cdnronin | HanLin eBook | 2 | 11-22-2006 10:37 PM |