xref: /freebsd/contrib/file/magic/Magdir/wordprocessors (revision ae316d1d1cffd71ab7751f94e10118777a88e027)
1
2#------------------------------------------------------------------------------
3# $File: wordprocessors,v 1.39 2024/11/09 23:26:33 christos Exp $
4# wordprocessors:  file(1) magic fo word processors.
5#
6####### PWP file format used on Smith Corona Personal Word Processors:
72	string	\040\040\040\040\040\040\040\040\040\040\040ML4D\040'92	Smith Corona PWP
8>24	byte	2	\b, single spaced
9>24	byte	3	\b, 1.5 spaced
10>24	byte	4	\b, double spaced
11>25	byte	0x42	\b, letter
12>25	byte	0x54	\b, legal
13>26	byte	0x46	\b, A4
14
15# URL:	http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
16# reference:	http://mark0.net/download/triddefs_xml.7z
17#		/defs/w/wps-works-dos.trid.xml
18# From:	Joerg Jenderek
19# Note:	older non OLE 2 Compound based versions
200	ubeshort	=0x01FE
21>112	ubeshort	=0x0100		Microsoft Works 1-3 (DOS) or 2 (Windows) document
22# title like THE GREAT KHAN GAME
23>>0x100	string		x		%s
24!:mime	application/vnd-ms-works
25#!:mime	application/x-msworks
26# https://www.macdisk.com/macsigen.php
27!:apple	????AWWP
28!:ext	wps
29
30# From:		Joerg Jenderek
31# URL:		https://en.wikipedia.org/wiki/Microsoft_Publisher
32# Reference:	http://fileformats.archiveteam.org/wiki/Microsoft_Publisher
33# Note:		older non OLE 2 (./ole2compounddocs) Compound based version
340	ubelong		=0xE7AC2C00	Microsoft Publisher (1.0)
35#!:mime	application/x-mspublisher
36# Not registered at IANA but
37# https://web.archive.org/web/20200930085807/https://reposcope.com/mimetype/application/vnd.ms-publisher
38!:mime	application/vnd.ms-publisher
39!:ext	pub
40
41# From:		Joerg Jenderek
42# URL:		http://fileformats.archiveteam.org/wiki/COSMI_MultiMedia
43#		https://en.wikipedia.org/wiki/Cosmi_Corporation
44# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/c/cosmi.trid.xml
45# Note:		called "COSMI document (generic)" by TrID
460	string/b	LCP		COSMI document
47#!:mime		application/octet-stream
48!:mime	application/x-cosmi
49# BCD~Business Card Maker BRO~Brochure Magic CRD~Greeting Card Magic DTP~Print Perfect PUB~Desktop Publisher
50!:ext		bcd/bro/crd/dtp/pub/
51
52# Corel/WordPerfect
53# URL:		https://en.wikipedia.org/wiki/WordPerfect
54# Reference:	https://github.com/OneWingedShark/WordPerfect/blob/master/doc/SDK_Help/FileFormats/WPFF_DocumentStructure.htm
55#		http://mark0.net/download/triddefs_xml.7z/defs/w/wp-generic.trid.xml
560	string	\xffWPC
57# WordPerfect
58>8	byte	1
59# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/w/wpm-macro.trid.xml
60# Note:		there exist other macro variants
61>>9	byte	1	WordPerfect macro
62#!:mime		application/octet-stream
63!:mime		application/x-wordperfect-wpm
64# like: ALTD.WPM ENDFOOT.WPM FOOTEND.WPM LABELS.WPM REVEALTX.WPM
65!:ext		wpm
66# Note:		used in WordPerfect 5.1; there exist other FIL variants
67>>9	byte	2	WordPerfect help file
68#!:mime		application/octet-stream
69!:mime		application/x-wordperfect-help
70# like: WPHELP.FIL
71!:ext		fil
72# pointer to document area like: 10h
73>>>4		ulelong	!0x10	\b, at %#x document area
74>>9	byte	3	WordPerfect keyboard file
75#!:mime		application/octet-stream
76!:mime		application/x-wordperfect-keyboard
77!:ext		wpk
78# no document area, so point to end of file; so this is file size like: 23381 2978 32835 3355 3775 919
79>>>4		ulelong	x	\b, %u bytes
80>>9	byte	4	WordPerfect VAX keyboard definition
81#!:mime	application/octet-stream
82!:mime	application/x-wordperfect-keyboard
83#!:ext	foo
84# URL:		http://fileformats.archiveteam.org/wiki/WordPerfect
85# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/w/wpd-doc-gen.trid.xml
86>>9	byte	10	WordPerfect document
87# https://www.iana.org/assignments/media-types/application/vnd.wordperfect
88!:mime		application/vnd.wordperfect
89#!:apple		????WPC2
90# TODO: distinguish different suffix
91!:ext		wpd/wpt/wkb/icr/tut/sty/tst/crs
92>>9	byte	11	WordPerfect dictionary
93>>9	byte	12	WordPerfect thesaurus
94>>9	byte	13	WordPerfect block
95>>9	byte	14	WordPerfect rectangular block
96>>9	byte	15	WordPerfect column block
97>>9	byte	16	WordPerfect printer data
98#!:mime		application/octet-stream
99!:mime		application/x-wordperfect-prs
100# like: STANDARD.PRS WORKBOOK.PRS
101!:ext		prs
102# like: "Standard Printer" "Workbook Printer"
103>>>0x64		pstring/B	>A	"%s"
104#>>9	byte	18	WordPerfect Prefix information file
105# printer resource .ALL
106>>9	byte	19	WordPerfect printer data
107#!:mime		application/octet-stream
108!:mime		application/x-wordperfect-all
109!:ext		all
110# display Resource
111>>9	byte	20	WordPerfect driver resource data
112#!:mime		application/octet-stream
113!:mime		application/x-wordperfect-drs
114# like: WPSMALL.DRS
115!:ext		drs
116# pointer to index area with string "smalldrs" like: 46h
117>>>4		uleshort	!0x46	\b, at %#x index area
118>>9	byte	21	WordPerfect Overlay file
119#!:mime		application/octet-stream
120!:mime		application/x-wordperfect-fil
121# like: WP.FIL
122!:ext		fil
123# URL:		http://fileformats.archiveteam.org/wiki/WordPerfect_Graphics
124# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-wpg.trid.xml
125# Note:		called "WordPerfect Graphics bitmap" by TrID and
126#		"WordPerfect Graphics Metafile" by DROID via x-fmt/395 fmt/1042
127#		"WPG (Word Perfect Graphics)" by ImageMagick `identify -verbose BUTTRFLY.WPG`
128>>9	byte	22	WordPerfect graphic image
129# TODO: skip DROID x-fmt-395-signature-id-132.wpg by check for existing document area
130#>>>4		ulelong	>15	WordPerfect_graphic_OK
131#!:mime		application/octet-stream
132# http://extension.nirsoft.net/wpg
133!:mime		image/x-wordperfect-graphics
134# https://reposcope.com/mimetype/application/x-wpg
135#!:mime		application/x-wpg
136# like: BUTTRFLY.WPG STAR-5.WPG input.wpg WORDPFCT.WPG
137!:ext		wpg
138# pointer to document area like: 10h 1Ah
139>>>4		ulelong		!0x1A	\b, at %#x document area
140>>9	byte	23	WordPerfect hyphenation code
141>>9	byte	24	WordPerfect hyphenation data
142>>9	byte	25	WordPerfect macro resource data
143#!:mime		application/octet-stream
144!:mime		application/x-wordperfect-mrs
145# like: WP.MRS
146!:ext		mrs
147>>9	byte	27	WordPerfect hyphenation lex
148>>9	byte	29	WordPerfect wordlist
149>>9	byte	30	WordPerfect equation resource data
150#!:mime		application/octet-stream
151!:mime		application/x-wordperfect-qrs
152# like: WQ.QRS wpDE.qrs wpen.qrs
153!:ext		qrs
154# jump to document area with some marker and equation
155>>>(4.l)	ubyte	x
156# equation like: "Fraction:  x OVER y"
157>>>>&1		string	>A	(...%-.19s...)
158# pointer to document area like: 17C4h
159>>>4		ulelong	x	\b, at %#x document area
160#>>9	byte	31	reserved
161#>>9	byte	32	WordPerfect VAX .SET
162>>9	byte	33	WordPerfect spell rules
163>>9	byte	34	WordPerfect dictionary rules
164#>>9	byte	35	reserved
165# video resource device driver
166# Note:		 filetype 26 for VRS and filetype 36 for WPD apparently is wrong
167>>9	byte	36	WordPerfect Video Resource
168#!:mime		application/octet-stream
169!:mime		application/x-wordperfect-vrs
170# like: STANDARD.VRS
171!:ext		vrs
172# like: "IBM CGA (& compatibles)"
173>>>0x20		string	>A	"%.23s"
174>>9	byte	39	WordPerfect spell rules (Microlytics)
175#>>9	byte	40	reserved
176>>9	byte	41	WordPerfect Install options
177#!:mime		application/octet-stream
178!:mime		application/x-wordperfect-ins
179# like: WP51.INS
180!:ext		ins
181# probably default directory name like: "C:\WP51\"
182>>>0x12		string	>A	"%.8s"
183# maybe mouse driver for WP5.1
184>>9	byte	42	WordPerfect Resource
185#!:mime		application/octet-stream
186!:mime		application/x-wordperfect-irs
187# like: STANDARD.IRS
188!:ext		irs
189# like: "Mouse Driver (MOUSE.COM)"
190>>>0x28		string	>A	"%.24s"
191>>9	byte	43	WordPerfect settings file
192# maybe Macintosh WP2.0 document
193>>9	byte	44	WordPerfect 3.5 document
194!:mime		application/vnd.wordperfect
195!:apple		????WPD3
196# like: WP3.wpd
197!:ext		wpd
198>>9	byte	45	WordPerfect 4.2 document
199# External spell code module (WP5.1)
200#>>9	byte	46	WordPerfect external spell
201# external spell dictionary .LEX
202#>>9	byte	47	WordPerfect external spell dictionary
203# Macintosh SOFT graphics file (SOFT (Sequential Object Format)
204#>>9	byte	48	WordPerfect SOFT graphics
205#>>9	byte	49	reserved
206#>>9	byte	50	reserved
207# WPWin 5.1 Application Resource Library added for WPWin 5.1
208#>>9	byte	51	WordPerfect application resource library
209>>9	byte	69	WordPerfect dialog file
210# From:		Joerg Jenderek
211# Note:		found in sub directory WritingTools inside WordPerfect 2021 program directory
212>>9	byte	70	WordPerfect Writing Tools
213#!:mime	application/octet-stream
214!:mime	application/x-wordperfect-cbt
215# like: Wt13cbede.cbt Wt13cbeit.cbt Wt13cbefr.cbt WT21cbede.cbt Wt13cbeEN.CBD WT21cbeEN.CBD
216!:ext	cbd/cbt
217>>9	byte	76	WordPerfect button bar
218>>9	default x
219>>>9	byte	x	Corel WordPerfect: Unknown filetype %d
220# Corel Shell
221>8	byte	2
222>>9	byte	1	Corel shell macro
223>>9	byte	10	Corel shell definition
224>>9	default x
225>>>9	byte	x	Corel Shell: Unknown filetype %d
226# Corel Notebook
227>8	byte	3
228>>9	byte	1	Corel Notebook macro
229>>9	byte	2	Corel Notebook help file
230>>9	byte	3	Corel Notebook keyboard file
231>>9	byte	10	Corel Notebook definition
232>>9	default	x
233>>>9	byte	x	Corel Notebook: Unknown filetype %d
234# Corel Calculator
235>8	byte	4
236>>9	byte	2	Corel Calculator help file
237>>9	default	x
238>>>9	byte	x	Corel Calculator: Unknown filetype %d
239# Corel File Manager
240>8	byte	5
241>>9	default	x
242>>>9	byte	x	Corel File Manager: Unknown filetype %d
243# Corel Calendar
244>8	byte	6
245>>9	byte 	2	Corel Calendar help file
246>>9	byte 	10	Corel Calendar data file
247>>9	default	x
248>>>9	byte	x	Corel Calendar: Unknown filetype %d
249# Corel Program Editor/Ed Editor
250>8	byte	7
251>>9	byte	1	Corel Editor macro
252>>9	byte	2	Corel Editor help file
253>>9	byte	3	Corel Editor keyboard file
254>>9	byte	25	Corel Editor macro resource file
255>>9	default	x
256>>>9	byte	x	Corel Program Editor/Ed Editor: Unknown filetype %d
257# Corel Macro Editor
258>8	byte	8
259>>9	byte 	1	Corel Macro editor macro
260>>9	byte 	2	Corel Macro editor help file
261>>9	byte	3	Corel Macro editor keyboard file
262>>9	default	x
263>>>9	byte	x	Corel Macro Editor: Unknown filetype %d
264# Corel Plan Perfect
265>8	byte	9
266>>9	default	x
267>>>9	byte	x	Corel Plan Perfect: Unknown filetype %d
268# Corel DataPerfect
269>8	byte	10
270# CHECK: Don't these belong into product 9?
271>>9	byte	1	Corel PlanPerfect macro
272>>9	byte	2	Corel PlanPerfect help file
273>>9	byte	3	Corel PlanPerfect keyboard file
274>>9	byte	10	Corel PlanPerfect worksheet
275>>9	byte	15	Corel PlanPerfect printer definition
276>>9	byte	18	Corel PlanPerfect graphic definition
277>>9	byte	19	Corel PlanPerfect data
278>>9	byte	20	Corel PlanPerfect temporary printer
279>>9	byte	25	Corel PlanPerfect macro resource data
280>>9	default	x
281>>>9	byte	x	Corel DataPerfect: Unknown filetype %d
282# Corel Mail
283>8	byte	11
284>>9	byte	2	Corel Mail help file
285>>9	byte	5	Corel Mail distribution list
286>>9	byte	10	Corel Mail out box
287>>9	byte	11	Corel Mail in box
288>>9	byte	20	Corel Mail users archived mailbox
289>>9	byte	21	Corel Mail archived message database
290>>9	byte	22	Corel Mail archived attachments
291>>9	default	x
292>>>9	byte	x	Corel Mail: Unknown filetype %d
293# Corel Printer
294>8	byte	12
295>>9	byte	11	Corel Printer temporary file
296>>9	default	x
297>>>9	byte	x	Corel Printer: Unknown filetype %d
298# Corel Scheduler
299>8	byte	13
300>>9	byte	2	Corel Scheduler help file
301>>9	byte	10	Corel Scheduler in file
302>>9	byte	11	Corel Scheduler out file
303>>9	default	x
304>>>9	byte	x	Corel Scheduler: Unknown filetype %d
305# Corel WordPerfect Office
306>8	byte	14
307>>9	byte	10	Corel GroupWise settings file
308>>9	byte	17	Corel GroupWise directory services
309>>9	byte	43	Corel GroupWise settings file
310>>9	default	x
311>>>9	byte	x	Corel WordPerfect Office: Unknown filetype %d
312# Corel DrawPerfect
313# URL:		http://fileformats.archiveteam.org/wiki/Corel_Presentations
314# Update:	Joerg Jenderek
315>8	byte	15
316# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shw-wp-2.trid.xml
317# Note:		called "WordPerfect Presentations (v2)" by TrID and
318#		"Corel Presentation" with version "7-8-9" by DROID via PUID fmt/877
319>>9	byte	10	WordPerfect Presentation
320#!:mime		application/octet-stream
321#!:mime		application/vnd.wordperfect
322!:mime		application/x-drawperfect-shw
323# like: BENEFITS.SHW chartbar.shw chartbul.shw chartgal.shw chartorg.shw fig-demo.shw figurgal.shw mastrgal.shw scuba.shw tutorial.shw
324!:ext		shw
325# pointer to document area like: 10h
326>>>4	ulelong	!0x10	\b, at %#x document area
327# according to TrID this is nil
328>>>12	ulelong	!0	\b, at 0xC %#x
329# search for embedded WP file like in tutorial.shw
330#>>>16	search/638/sb	\xffWPC	WPC_MAGIC_FOUND
331# GRR: indirect call leads to recursion! WHY?
332#>>>>&0	indirect	x	\b; contains
333# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shw-wp-3.trid.xml
334# Note:		called "WordPerfect/Corel Presentations (v3)" by TrID and
335#		"Corel Presentation" with version "3" by DROID via PUID fmt/878
336>>9	byte	15	Corel Presentation
337#!:mime		application/octet-stream
338#!:mime		application/vnd.wordperfect
339!:mime		application/x-drawperfect-shw
340# like: FIG_ANIM.SHW presenta.shw
341!:ext		shw
342# pointer to document area like: 1ah
343>>>4	ulelong	!0x1a	\b, at %#x document area
344# according to TrID this is nil
345>>>12	ulelong	!0	\b, at 0xC %#x
346# reserved like: 3
347>>>16	ulelong	!0x3	\b, at 0x10 %#x
348# file size, not including pad characters at EOF
349>>>0x14	ulelong x	\b, %u bytes
350# search for embedded WP file like in foo
351#>>>24	search/638/sb	\xffWPC	WPC_MAGIC_FOUND
352# GRR: indirect call leads to recursion! WHY?
353#>>>>&0	indirect	x	\b; contains
354# embedded inside Compound Document variant handled by ./ole2compounddocs
355>>9	byte	16	Corel Presentation (embeded)
356#!:mime		application/octet-stream
357#!:mime		application/vnd.wordperfect
358!:mime		application/x-corelpresentations
359# like: PerfectOffice_MAIN
360!:ext		/
361# pointer to document area like: 1ah
362>>>4	ulelong	!0x1a	\b, at %#x document area
363>>>12	ulelong	!0	\b, at 0xC %#x
364# reserved like: 3
365>>>16	ulelong	!0x3	\b, at 0x10 %#x
366# file size, not including pad characters at EOF
367>>>0x14	ulelong x	\b, %u bytes
368# search for embedded WP file
369#>>>24	search/638/sb	\xffWPC	WPC_MAGIC_FOUND
370# GRR: indirect call leads to recursion! WHY?
371#>>>>&0	indirect	x	\b; contains
372>>9	default	x
373>>>9	byte	x	Corel DrawPerfect: Unknown filetype %d
374# Corel LetterPerfect
375>8	byte	16
376>>9	default	x
377>>>9	byte	x	Corel LetterPerfect: Unknown filetype %d
378# Corel Terminal
379>8	byte	17
380>>9	byte	10	Corel Terminal resource data
381>>9	byte	11	Corel Terminal resource data
382>>9	byte	43	Corel Terminal resource data
383>>9	default	x
384>>>9	byte	x	Corel Terminal: Unknown filetype %d
385# Corel loadable file
386>8	byte	18
387>>9	byte	10	Corel loadable file
388>>9	byte	11	Corel GUI loadable text
389>>9	byte	12	Corel graphics resource data
390>>9	byte	13	Corel printer settings file
391>>9	byte	14	Corel port definition file
392>>9	byte	15	Corel print queue parameters
393>>9	byte	16	Corel compressed file
394>>9	default	x
395>>>9	byte	x	Corel loadable file: Unknown filetype %d
396>>15	byte	0	\b, optimized for Intel
397>>15	byte	1	\b, optimized for Non-Intel
398# Network service
399>8	byte	20
400>>9	byte	10	Corel Network service msg file
401>>9	byte	11	Corel Network service msg file
402>>9	byte	12	Corel Async gateway login msg
403>>9	byte	14	Corel GroupWise message file
404>>9	default	x
405>>>9	byte	x	Corel Network service: Unknown filetype %d
406# GroupWise
407>8	byte	31
408>>9	byte	20	GroupWise admin domain database
409>>9	byte	21	GroupWise admin host database
410>>9	byte	23	GroupWise admin remote host database
411>>9	byte	24	GroupWise admin ADS deferment data file
412>>9	default	x
413>>>9	byte	x	GroupWise: Unknown filetype %d
414# Corel Writing Tools WT*.*
415# From:		Joerg Jenderek
416# URL:		https://support.corel.com/hc/en-us/articles/215876258-Writing-Tools-Spell-Check-Dictionary-does-not-work-in-WordPerfect-X5
417#		http://wordperfect.helpmax.net/en/editing-and-formatting-documents/using-the-writing-tools/working-with-user-word-lists/
418# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/u/uwl-wp.trid.xml
419>8	byte	32
420>>9	byte	10	Corel Writing Tools User Word List
421#!:mime	application/octet-stream
422!:mime	application/x-wordperfect-wordlist
423# personal user word list UWL under user directory like: WTDE.UWL WTUS.UWL WT21DE.UWL WT21US.UWL WT13DE.UWL ...
424# and "template" SAV/HWL variant under program directory like: wt13en.hwl Wt13de.sav Wt13it.sav wt13ru.sav WT21us.sav Wtcz.sav ...
425!:ext	uwl/hwl/sav
426# jump to document area with some marker and word list
427>>>(4.l)	ubyte	x
428# look for beginning of word list starting mostly with letter a as UTF-16 like: Wt13es.sav
429# but not found in russian wt13ru.sav
430>>>>&0	search/91/sb	a\0
431# word list starting like: "acsesory\022accessory.\001\026acomodate\026accommodate4\001"
432>>>>>&0		lestring16	x	(...%-.33s...)
433# pointer to document area like: 200h
434>>>4	ulelong	!0x200	\b, at %#x document area
435# file size, not including pad characters at EOF
436>>>0x14	uleshort x	\b, %u bytes
437# IntelliTAG
438>8	byte	33
439>>9	byte	10	IntelliTAG (SGML) compiled DTD
440>>9	default	x
441>>>9	byte	x	IntelliTAG: Unknown filetype %d
442# Summary:	Corel WordPerfect WritingTools advise part
443# From:		Joerg Jenderek
444# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/a/adv-wp.trid.xml
445>8	byte	34
446>>9	byte	11	Corel WordPerfect dictionary advise
447#!:mime	application/octet-stream
448!:mime	application/x-wordperfect-adv
449#!:mime	application/vnd.wordperfect.adv
450# like: WT21de.adv Wt13de.adv Wt13es.adv Wt13fr.adv wt13us.adv
451!:ext	adv
452# advise text part often start with tag like: 580A
453#>>>(16.s)	ubequad	x	ADVISE PART %#llx
454# part of advise text like: "This is too informal for most writing."
455>>>(16.s+16)	string	x	(...%-.33s...)
456# everything else
457>8	default x
458>>8	byte	x	Unknown Corel/Wordperfect product %d,
459>>>9	byte	x	file type %d
460>10	byte	0	\b, v5.
461# version of WP file; 2.1~WP 8.0
462# major version of WP file like: 1 2
463>10	byte	!0	\b, v%d.
464# minor version of WP file like: 0 1
465>11	byte	x	\b%d
466
467# Hancom HWP (Hangul Word Processor)
468# Hangul Word Processor 3.0 through 97 used HWP 3.0 format.
469# URL: https://www.hancom.com/etc/hwpDownload.do
4700	string	HWP\ Document\ File     Hancom HWP (Hangul Word Processor) file, version 3.0
471!:ext	hwp
472
473# CosmicBook, from Benoit Rouits
4740       string  CSBK    Ted Neslson's CosmicBook hypertext file
475
4762       string  EYWR    AmigaWriter file
477
478# chi:  file(1) magic for ChiWriter files
4790       string          \\1cw\          ChiWriter file
480>5      string          >\0             version %s
4810       string          \\1cw           ChiWriter file
482
483# Quark Express from https://www.garykessler.net/library/file_sigs.html
4842	string	IIXPR3			Intel Quark Express Document (English)
4852	string	IIXPRa			Intel Quark Express Document (Korean)
4862	string	MMXPR3			Motorola Quark Express Document (English)
487!:mime	application/x-quark-xpress-3
4882	string	MMXPRa			Motorola Quark Express Document (Korean)
489
490# From:		Joerg Jenderek
491# URL:		http://fileformats.archiveteam.org/wiki/PageMaker
492#		https://en.wikipedia.org/wiki/Adobe_PageMaker
493# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/p
494#		pm4-pagemaker.trid.xml
495#		pm5-pagemaker.trid.xml
496# Note:		since version 6 in 1995 called Adobe PageMaker and
497#		embedded in Compound Document handled by ./ole2compounddocs
498#		mainly tested little endian variant
4994	ubelong		=0x0000FF99
500>0	use		PageMaker
501# big endian variant
5024	ubelong		=0x000099FF
503>0	use		\^PageMaker
504#	display information of Aldus/Adobe PageMaker document/publication
5050	name		PageMaker
506>110	uleshort	<0x0600			Aldus
507>110	uleshort	>0x05FF			Adobe
508>110	uleshort	x			PageMaker
509# "MP" marker for newer version 4 and above according to TrID
510#>108	string		x			\b, MARKER "%.2s"
511# http://www.nationalarchives.gov.uk/pronom/fmt/876
512!:mime		application/vnd.pagemaker
513#!:mime		application/x-pagemaker
514# different file name extensions are used depending on version
515# older version like 3
516>110	uleshort/256	=0			document
517# https://www.macdisk.com/macsigen.php
518!:apple	ALB3ALD3
519# PT3 for template and no example for PageMaker document/publication with PM3 extension
520!:ext	pm3/pt3
521>110	uleshort/256	=4			document
522!:apple	ALD4ALB4
523# no example for PT4 template
524!:ext	pm4/pt4
525>110	uleshort/256	=5			document
526!:apple	ALD5ALB5
527# no example for PT5 template
528!:ext	pm5/pt5
529>110	uleshort	=0x0600			document
530!:apple	ALD6ALB6
531# PT6 for template
532!:ext	pm6/pt6
533# HOWTO to distinguish version 7 from 6.5 ?
534>110	uleshort	=0x0632			document
535!:apple	AD65AB65
536# no example for T65 template
537!:ext	p65/t65/pmd/pmt
538# version 7 with PMT extension for template
539#!:ext	pmd/pmt
540#!:apple	????PUBF
541# endian marker FF 99 for little endian
542>6	ubyte	=0xFF			\b, little-endian
543>6	ubyte	=0x99			\b, big-endian
544# newer numeric version like: 4 5 6 6.50
545#>110	uleshort	x			\b, VERSION=%#x
546>110	uleshort	>0x03FF
547>>110	uleshort/256	x			\b, version %u
548>>110	uleshort%256	>0			\b.%u
549# older version like 3
550>110	uleshort	<0x0400			\b, maybe version 3
551
552# adobe indesign (document, whatever...) from querkan
5530	belong	0x0606edf5		Adobe InDesign
554>16	string	DOCUMENT		Document
555
556#------------------------------------------------------------------------------
557# ichitaro456: file(1) magic for Just System Word Processor Ichitaro
558#
559# Contributor kenzo-:
560# Reversed-engineered JS Ichitaro magic numbers
561#
562
5630	string		DOC
564>43	byte		0x14	Just System Word Processor Ichitaro v4
565!:mime	application/x-ichitaro4
566>43	byte		0x15	Just System Word Processor Ichitaro v5
567!:mime	application/x-ichitaro5
568>43	byte		0x16	Just System Word Processor Ichitaro v6
569!:mime	application/x-ichitaro6
570>144	string	JDASH		application/x-ichitaro4
571
572# Type: Freemind mindmap documents
573# From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
5740	string/w	\<map\ version	Freemind document
575!:mime	application/x-freemind
576
577# Type: Freeplane mindmap documents
578# From: Felix Natter <fnatter@gmx.net>
5790       string/w        \<map\ version="freeplane  Freeplane document
580!:mime  application/x-freeplane
581
582# Type:        Scribus
583# From:        Werner Fink <werner@suse.de>
5840	string	\<SCRIBUSUTF8\ Version		Scribus Document
5850	string	\<SCRIBUSUTF8NEW\ Version	Scribus Document
586!:mime	application/x-scribus
587
588# help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
589# URL: 		https://en.opensuse.org/Gfxboot
590# Reference:	https://github.com/openSUSE/gfxboot/blob/master/gfxboot
591#		http://mark0.net/download/triddefs_xml.7z/defs/h/hlp-gfxboot-main.trid.xml,hlp-gfxboot-opt.trid.xml
592# Note:		called "gfxboot compiled html help" (main),(opt) by TrID
593#		verified by command like `gfxboot --help-show en.hlp > en.html`
594# markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
5950	ulelong&0x8080FFFF	0x00001204
596# display "gfxboot compiled html help file" (strength=70) after one "TeX font metric data" (tri10u.tfm strength=71=50+21) handled by ./tex
597#!:strength +0
598>2	regex			\^(main|opt)	gfxboot compiled html help file, label %s
599#!:mime	application/octet-stream
600!:mime	application/x-gfxboot-hlp
601!:ext	hlp
602# check for title token \x14
603>>&0	ubyte			0x14		\b, title
604# title text ends with \x10
605>>>&0	regex			\^[[:print:]]+	'%s'
606
607# From:		Joerg Jenderek
608# URL:		https://en.wikipedia.org/wiki/StarOffice
609# Reference:	http://mark0.net/download/triddefs_xml.7z
610#		/defs/t/thm-staroffice.trid.xml
611# Note:		used in Star-, Open- and Libre-Office
612# named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
6130		ubeshort	0x0400
614# non nil gap
615#>(2.s+8)	ubequad		x		\b, gap %#16.16llx
616# test for null value in gap after theme name maybe unreliable
617#>(2.s+9)	ubyte		0		\b, 0-byte
618# look for keyword GALRESRV near the end
619# "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
620#>0		search/8415	GALRESRV	\b, GALRESRV found
621# "neues thema6.thm" MorePictures, 315 objects
622#>0		search/19299	GALRESRV	\b, GALRESRV FOUND
623#>2		uleshort	x		\b, name length %u
624# skip file2147.chk by check for positive name length like for sg16.thm "3D"
625>2		uleshort	>0
626# skip dBase printer form T6.PRF with misidentified gallery
627# name :\DBASE\IV\T6.txts by check for 1st object name or RESRV keyword
628# https://www.clicketyclick.dk/databases/xbase/xbase/dbase_ex.zip
629# template/t6/with_data/T6.PRF
630# by first char of object name or RESRV part of keyword GALRESRV
631>>(2.s+13)	ubyte		>0x1F		StarOffice Gallery theme
632!:mime		application/x-stargallery-thm
633# thm is also used for JPEG thumbnail images
634!:ext		thm
635# gallery name often 1 word like: 3D sounds Diagrams Flussdiagramme Fotos
636# or like private://gallery/hidden/imgppt "Cisco - WAN - LAN"
637>>>2		pstring/h	x		%s
638# number of objects
639>>>(2.s+4)	ulelong		x		\b, %u object
640# plural s
641>>>(2.s+4)	ulelong		!1		\bs
642# if available then display first object name
643>>>(2.s+4)	ulelong		>0
644# partial file name, URL or internal name like "dd2*" of 1st object or RESRV
645>>>>(2.s+11)	pstring/h	x		\b, 1st %s
646
647# From:	Joerg Jenderek
648# URL:	http://fileformats.archiveteam.org/wiki/StarOffice_Gallery
649# Note:	used in Star-, Open- and Libre-Office and found in directories like
650#	%APPDATA%\Roaming\LibreOffice\4\user\gallery
651#	$HOME/.config/libreoffice/4/user/gallery
6520	string		SGA3	StarOffice Gallery thumbnails
653# Unknown like 0x04000?0001000142
654#>4	ubequad		x	\b, UNKNOWN %#16.16llx
655#!:mime	application/x-sdg
656!:mime	application/x-stargallery-sdg
657!:ext	sdg
658# display image magic for debugging purpose like 'BM'
659# looking like PC bitmap, Windows 3.x format with unknown compression
660#>11	string		x	\b, image magic '%-.2s'
661# inspect 1st GALLERY thumbnail magic by ./images with 1 space at end
662#>11	indirect	x	\b; contains
663
664# Atari ST Hypertext files
6650	string	HDOC\0	ST-Guide file
6660	string	HREF\0	ST-Guide reference file
667