joniles / rtfparserkit

Primary repository for RTF Parser Kit library
Apache License 2.0
104 stars 42 forks source link

Missing destination command pgdsctbl #29

Open Jmontch opened 1 year ago

Jmontch commented 1 year ago

I have wrote a simple text with Open Office Writer and saved it in rtf format. Parsing it with rtfparserkit, I have extra word "Standard;" added. Examining the file, I see that Open Office has put the destination command "pgdsctbl" that rtfparserkit does not know. File content : {\rtf1\ansi\deff0\adeflang1025 {\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\fnil\fprq2\fcharset0 Microsoft YaHei;}{\f4\fnil\fprq2\fcharset0 Lucida Sans;}{\f5\fswiss\fprq0\fcharset128 Lucida Sans;}} {\colortbl;\red0\green0\blue0;\red128\green128\blue128;} {\stylesheet{\s0\snext0\nowidctlpar{*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af6\langfe2052\dbch\af4\afs24\lang1081\loch\f0\fs24\lang1036 Standard;} {\s15\sbasedon0\snext16\sb240\sa120\keepn\hich\af3\dbch\af4\afs28\loch\f2\fs28 Titre;} {\s16\sbasedon0\snext16\sb0\sa120 Corps de texte;} {\s17\sbasedon16\snext17\sb0\sa120\dbch\af5 Liste;} {\s18\sbasedon0\snext18\sb120\sa120\noline\i\dbch\af5\afs24\ai\fs24 L�gende;} {\s19\sbasedon0\snext19\noline\dbch\af5 Index;} }{\info{\author Jean de Montcheuil}{\creatim\yr2022\mo12\dy10\hr18\min37}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment OpenOffice}{\vern4130}}\deftab709

{*\pgdsctbl {\pgdsc0\pgdscuse195\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Standard;}} \formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc \pgndec\pard\plain \s0\nowidctlpar{*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af6\langfe2052\dbch\af4\afs24\lang1081\loch\f0\fs24\lang1036{\rtlch \ltrch\loch Bla bla} \par }