Files
pdf/tests/edits/forensic_obj_compare_out.txt
T
2026-07-30 16:48:46 +05:30

171 lines
24 KiB
Plaintext

[2026-07-30 16:15:08.216] [info] [STAGE_3_WASM_INPUT] fontSize=16.00, trueVerticalSize=16.00, exactNominal=16.00, exactScaleY=1.0000
[2026-07-30 16:15:08.216] [info] [FONT_METRICS_DEBUG] exactNominal=16.00, exactScaleX=1.00, exactScaleY=1.00, trueVerticalSize=16.00, textAspect=1.00
[2026-07-30 16:15:08.217] [info] Resolving system fallback font for: Helvetica
[2026-07-30 16:15:08.217] [info] [FONT_COVERAGE_DEBUG] internalFontId='Helvetica_Type1_32' full font MISSING codepoint U+0000 (char='?')
[2026-07-30 16:15:08.217] [info] [FONT_FALLBACK_DEBUG] internalFontId='Helvetica_Type1_32' useEmbedded=false useSystem=false isSubsetFont=false subsetLacksGlyphs=true fontSupportsAll=false cacheKey='standard_Helvetica#5943434773564074515' fallbackStd='Helvetica'
[2026-07-30 16:15:08.218] [info] [STAGE_4_REFLOW_OUTPUT] lineFontSize=16.00, emitFontSize=16.00, mtxScaleY=1.0000
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 20.0000, 100.0000], bbox=[20.85, 99.82, 31.44, 111.65]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 32.4480, 100.0000], bbox=[32.98, 99.82, 40.75, 108.48]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 41.3440, 100.0000], bbox=[41.87, 99.82, 49.65, 108.48]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 50.2400, 100.0000], bbox=[50.78, 99.82, 57.98, 111.46]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 59.1360, 100.0000], bbox=[60.18, 99.82, 67.38, 111.46]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 68.0320, 100.0000], bbox=[68.29, 96.66, 75.89, 108.30]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 76.0320, 100.0000], bbox=[76.62, 99.82, 84.27, 108.48]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 84.9280, 100.0000], bbox=[86.26, 97.74, 87.95, 101.60]
[2026-07-30 16:15:08.219] [info] [STAGE_4_REFLOW_OUTPUT] lineFontSize=16.00, emitFontSize=16.00, mtxScaleY=1.0000
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 93.8240, 100.0000], bbox=[93.87, 100.00, 105.25, 108.30]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 105.3760, 100.0000], bbox=[105.90, 99.82, 113.68, 108.48]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 114.2720, 100.0000], bbox=[115.31, 100.00, 119.82, 108.48]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 119.6000, 100.0000], bbox=[120.62, 100.00, 122.03, 111.46]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 123.1520, 100.0000], bbox=[123.70, 99.82, 130.90, 111.46]
[2026-07-30 16:15:08.219] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 132.0480, 100.0000], bbox=[133.42, 100.00, 135.17, 111.46]
[2026-07-30 16:15:08.219] [info] [STAGE_5_SERIALIZED_JSON] {"anchorPage":0,"columnLeft":20.847999572753906,"lines":[{"adv":[12.447998046875,8.896003723144531,8.89599609375,8.896003723144531,8.89599609375,8.0,8.896003723144531,4.447998046875,4.447998046875,11.552001953125,8.896003723144531,5.3280029296875,3.552001953125,8.89599609375,1.743988037109375],"baselineY":100.0,"fontSize":16.0,"pageIndex":0,"text":"Goodbye, world!","x0":20.0}]}
[2026-07-30 16:15:08.222] [info] Document caches have been invalidated.
[2026-07-30 16:15:08.238] [info] [STAGE_3_WASM_INPUT] fontSize=16.00, trueVerticalSize=16.00, exactNominal=16.00, exactScaleY=1.0000
[2026-07-30 16:15:08.238] [info] [FONT_METRICS_DEBUG] exactNominal=16.00, exactScaleX=1.00, exactScaleY=1.00, trueVerticalSize=16.00, textAspect=1.00
[2026-07-30 16:15:08.239] [info] Resolving system fallback font for: Helvetica
[2026-07-30 16:15:08.239] [info] [FONT_COVERAGE_DEBUG] internalFontId='Helvetica_Type1_32' full font MISSING codepoint U+0000 (char='?')
[2026-07-30 16:15:08.240] [info] [FONT_FALLBACK_DEBUG] internalFontId='Helvetica_Type1_32' useEmbedded=false useSystem=false isSubsetFont=false subsetLacksGlyphs=true fontSupportsAll=false cacheKey='standard_Helvetica#2735223242198986561' fallbackStd='Helvetica'
[2026-07-30 16:15:08.240] [info] [KEYSTROKE_BACKEND_DEBUG] columnLeft=20.85, columnRight=270.85, columnWidth=250.00, firstBaselineY=100.00, oldLineCount=1, hangingIndent=0.00
[2026-07-30 16:15:08.241] [info] [STAGE_4_REFLOW_OUTPUT] lineFontSize=16.00, emitFontSize=16.00, mtxScaleY=1.0000
[2026-07-30 16:15:08.241] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 20.0000, 100.0000], bbox=[20.85, 96.66, 87.95, 111.65]
[2026-07-30 16:15:08.241] [info] [STAGE_4_REFLOW_OUTPUT] lineFontSize=16.00, emitFontSize=16.00, mtxScaleY=1.0000
[2026-07-30 16:15:08.241] [info] [EDITED_TEXT_OBJECT_DEBUG] fontSize=16.00, matrix=[1.0000, 0.0000, 0.0000, 1.0000, 93.8282, 100.0000], bbox=[93.88, 99.82, 144.39, 111.46]
[2026-07-30 16:15:08.241] [info] [STAGE_5_SERIALIZED_JSON] {"anchorPage":0,"columnLeft":20.847999572753906,"lines":[{"adv":[12.44525,8.8985,8.8985,8.8985,8.8985,8.0,8.8985,4.44525,4.44525,11.55475,8.8985,5.32825,3.55475,8.8985,4.44525,8.0],"baselineY":100.0,"fontSize":16.0,"pageIndex":0,"text":"Goodbye, world!x","x0":20.0}]}
[2026-07-30 16:15:08.247] [info] Document caches have been invalidated.
PDF: corpus\basic\hello_world.pdf
============================================================
STEP 4 ù why measureFace is nullptr
============================================================
FontInfo: id=Helvetica_Type1_32 name=Helvetica embedded=False type=Type1 subset=False
PATH TAKEN in loadEmissionFont():
matchedFontInfo && !isEmbedded
-> cacheKey = "standard_" + fontName
-> useEmbedded = false
-> useSystem = false
skip embedded/system load branches
fall through to FPDFText_LoadStandardFont()
measureFace ONLY set from loadedFontDataBuffers_ (TTF bytes)
standard fonts never put bytes in that buffer
=> measureFace remains nullptr BY DESIGN for non-embedded fonts
FontInfo: id=Times-Roman_Type1_32 name=Times-Roman embedded=False type=Type1 subset=False
PATH TAKEN in loadEmissionFont():
matchedFontInfo && !isEmbedded
-> cacheKey = "standard_" + fontName
-> useEmbedded = false
-> useSystem = false
skip embedded/system load branches
fall through to FPDFText_LoadStandardFont()
measureFace ONLY set from loadedFontDataBuffers_ (TTF bytes)
standard fonts never put bytes in that buffer
=> measureFace remains nullptr BY DESIGN for non-embedded fonts
============================================================
ORIGINAL PDF TEXT OBJECTS
============================================================
text='Goodbye, world!' font=Helvetica id=Helvetica_Type1_32 size=16.00 emb=False type=Type1 w=114.320 glyphs=15 objs=[1]
meta: ascent=905.0 descent=-211.0 subset=False
text='Hello, world!' font=Times-Roman id=Times-Roman_Type1_32 size=12.00 emb=False type=Type1 w=63.120 glyphs=13 objs=[0]
meta: ascent=891.0 descent=-215.0 subset=False
content fontDicts: [{'subtype': 'Type1', 'baseFont': 'Times-Roman'}, {'subtype': 'Type1', 'baseFont': 'Helvetica'}]
content Tf/Tj ops (6):
{'op': 'Tf', 'fontRes': 'F1', 'size': 12.0}
{'op': 'Tf', 'fontRes': 'F2', 'size': 16.0}
{'op': 'Td', 'tx': 20.0, 'ty': 50.0}
{'op': 'Td', 'tx': 0.0, 'ty': 50.0}
{'op': 'Tj', 'raw': '(Hello, world!) Tj'}
{'op': 'Tj', 'raw': '(Goodbye, world!) Tj'}
--- applying EDIT ENTRY reflow (unchanged text) ---
============================================================
EDIT-ENTRY PDF TEXT OBJECTS
============================================================
text='Goodbye,' font=Helvetica id=Helvetica_Type1_32 size=16.00 emb=False type=Type1 w=67.104 glyphs=8 objs=[14, 13, 12, 11, 10, 9, 8, 7]
text=' ' font= id= size=1.00 emb=False type= w=0.000 glyphs=1 objs=[]
text='world!' font=Helvetica id=Helvetica_Type1_32 size=16.00 emb=False type=Type1 w=41.296 glyphs=6 objs=[6, 5, 4, 3, 2, 1]
text='Hello, world!' font=Times-Roman id=Times-Roman_Type1_32 size=12.00 emb=False type=Type1 w=63.120 glyphs=13 objs=[0]
content fontDicts: [{'subtype': '?', 'baseFont': 'Times-Roman'}, {'subtype': '?', 'baseFont': 'Helvetica'}]
content Tf/Tj ops (0):
============================================================
COMPARE ORIGINAL vs EDIT-ENTRY
============================================================
object/run count: 2 -> 4
[0] 'Goodbye, world!' CHANGED
text: 'Goodbye, world!' -> 'Goodbye,'
w: 114.31999969482422 -> 67.10400390625
glyphCount: 15 -> 8
[1] 'Hello, world!' CHANGED
text: 'Hello, world!' -> ' '
fontName: 'Times-Roman' -> ''
fontId: 'Times-Roman_Type1_32' -> ''
fontSize: 12.0 -> 1.0
fontType: 'Type1' -> ''
w: 63.120004653930664 -> 0.0
glyphCount: 13 -> 1
firstOrigin: (20.0, 50.0) -> (89.376, 100.0)
[2] ADDED: 'world!' font=Helvetica size=16.0
[3] ADDED: 'Hello, world!' font=Times-Roman size=12.0
--- applying ONE-CHAR reflow ---
============================================================
ONE-CHAR PDF TEXT OBJECTS
============================================================
text='Goodbye,' font=Helvetica id=Helvetica_Type1_32 size=16.00 emb=False type=Type1 w=67.104 glyphs=8 objs=[2]
text=' ' font= id= size=1.00 emb=False type= w=0.000 glyphs=1 objs=[]
text='world!x' font=Helvetica id=Helvetica_Type1_32 size=16.00 emb=False type=Type1 w=50.512 glyphs=7 objs=[1]
text='Hello, world!' font=Times-Roman id=Times-Roman_Type1_32 size=12.00 emb=False type=Type1 w=63.120 glyphs=13 objs=[0]
content fontDicts: [{'subtype': '?', 'baseFont': 'Times-Roman'}, {'subtype': '?', 'baseFont': 'Helvetica'}]
content Tf/Tj ops (0):
============================================================
COMPARE EDIT-ENTRY vs ONE-CHAR
============================================================
object/run count: 4 -> 4
[0] 'Goodbye,' same
[1] ' ' same
[2] 'world!' CHANGED
text: 'world!' -> 'world!x'
w: 41.29600524902344 -> 50.512001037597656
glyphCount: 6 -> 7
firstOrigin: (93.824, 100.0) -> (93.828, 100.0)
[3] 'Hello, world!' same
============================================================
COMPARE ORIGINAL vs ONE-CHAR
============================================================
object/run count: 2 -> 4
[0] 'Goodbye, world!' CHANGED
text: 'Goodbye, world!' -> 'Goodbye,'
w: 114.31999969482422 -> 67.10400390625
glyphCount: 15 -> 8
[1] 'Hello, world!' CHANGED
text: 'Hello, world!' -> ' '
fontName: 'Times-Roman' -> ''
fontId: 'Times-Roman_Type1_32' -> ''
fontSize: 12.0 -> 1.0
fontType: 'Type1' -> ''
w: 63.120004653930664 -> 0.0
glyphCount: 13 -> 1
firstOrigin: (20.0, 50.0) -> (89.376, 100.0)
[2] ADDED: 'world!x' font=Helvetica size=16.0
[3] ADDED: 'Hello, world!' font=Times-Roman size=12.0
============================================================
FIRST DIFFERENCES SUMMARY
============================================================
Original run count: 2
Edit-entry run count: 4
One-char run count: 4
Original Tj/TJ ops: 2
Entry Tj/TJ ops: 0
One-char Tj/TJ ops: 0
Original fontDicts: [{'subtype': 'Type1', 'baseFont': 'Times-Roman'}, {'subtype': 'Type1', 'baseFont': 'Helvetica'}]
Entry fontDicts: [{'subtype': '?', 'baseFont': 'Times-Roman'}, {'subtype': '?', 'baseFont': 'Helvetica'}]
One-char fontDicts: [{'subtype': '?', 'baseFont': 'Times-Roman'}, {'subtype': '?', 'baseFont': 'Helvetica'}]
Wrote C:\Users\Maskan\Desktop\pdf_editor\pdf\tests\edits\forensic_obj_compare.json