File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/UglyToad.PdfPig.Tests/Integration Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 44 using DocumentLayoutAnalysis . PageSegmenter ;
55 using DocumentLayoutAnalysis . WordExtractor ;
66 using PdfPig . Core ;
7+ using PdfPig . Tokens ;
78 using SkiaSharp ;
89
910 public class GithubIssuesTests
1011 {
12+ [ Fact ]
13+ public void Revert_e11dc6b ( )
14+ {
15+ var path = IntegrationHelpers . GetDocumentPath ( "GHOSTSCRIPT-699488-0.pdf" ) ;
16+
17+ using ( var document = PdfDocument . Open ( path , new ParsingOptions ( ) { UseLenientParsing = true } ) )
18+ {
19+ var page = document . GetPage ( 1 ) ;
20+ var images = page . GetImages ( ) . ToArray ( ) ;
21+
22+ Assert . Equal ( 9 , images . Length ) ;
23+
24+ foreach ( var image in images )
25+ {
26+ if ( image . ImageDictionary . TryGet ( NameToken . Filter , out var token ) && token is NameToken nt )
27+ {
28+ if ( nt . Data . Contains ( "DCT" ) )
29+ {
30+ continue ;
31+ }
32+ }
33+
34+ Assert . True ( image . TryGetPng ( out _ ) ) ;
35+ }
36+
37+ var paths = page . Paths ;
38+ Assert . Equal ( 66 , paths . Count ) ;
39+ var letters = page . Letters ;
40+ Assert . Equal ( 2685 , letters . Count ) ;
41+ }
42+ }
43+
1144 [ Fact ]
1245 public void Issue1199 ( )
1346 {
You can’t perform that action at this time.
0 commit comments