[ 
https://issues.apache.org/jira/browse/PDFBOX-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096487#comment-16096487
 ] 

Tilman Hausherr commented on PDFBOX-3639:
-----------------------------------------

Surprisingly, there is a test suite with three tests for FDF (testFDF.java) but 
it has been inactive since 2009 due to a copyright issue (PDFBOX-391, 
PDFBOX-492). Had they been active, one would have failed in 2.0. The other two 
always fail, but that are related to an expected appearance stream content. 
Such tests are done elsewhere so we don't need it. I'll replace the whole file 
with my own which is slightly inspired by the deleted test code.


> FDF does not parse: Missing root object specification in trailer.
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-3639
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3639
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.6
>         Environment: jdk1.8.0_111
>            Reporter: Joe Masinter
>            Assignee: Tilman Hausherr
>            Priority: Minor
>              Labels: regression
>             Fix For: 2.0.8, 3.0.0
>
>
> FDF file generated with IText does not parse with PDFBox FDFParser
> FDFParser parser = new FDFParser(new FileInputStream("D:/dev/failsfdf.fdf"));
> parser.parse();
> java.io.IOException: Missing root object specification in trailer.
>       at 
> org.apache.pdfbox.pdfparser.COSParser.parseTrailerValuesDynamically(COSParser.java:2121)
> Content of FDF file:
> {code}
> %FDF-1.4
> %âãÏÓ
> 1 0 obj
> <</FDF<</Fields[<</T(ELD Goal2)/V()>><</T(ELD Goal3)/V()>><</T(ELD 
> Goal1)/V()>><</Kids[<</T(modifications:3)/V()>><</T(level)/V(Early 
> Advanced)>><</T(variations:1)/V(Test in small 
> group)>><</T(accommodations:3)/V(Test over more than one 
> day)>><</T(variations:3)/V()>><</T(variations:2)/V()>><</T(accommodations:1)/V(Administer
>  at time most beneficial to student)>><</T(accommodations:2)/V(Supervised 
> breaks within a section of the 
> test)>><</T(modifications:2)/V()>><</T(modifications:1)/V()>>]/T(EL_Listening)>><</T(Alt
>  Ed Levels)/V( )>><</Kids[<</T(modifications:3)/V()>><</T(level)/V(Early 
> Advanced)>><</T(variations:1)/V(Test in small 
> group)>><</T(accommodations:3)/V(Test over more than one 
> day)>><</T(variations:3)/V()>><</T(variations:2)/V()>><</T(accommodations:1)/V(Administer
>  at time most beneficial to student)>><</T(accommodations:2)/V(Supervised 
> breaks within a section of the 
> test)>><</T(modifications:2)/V()>><</T(modifications:1)/V()>>]/T(EL_Speaking)>><</T(ELD
>  Location)/V(General education class)>><</T(Meeting 
> Date)/V(9/10/2013)>><</T(ELD Services)/V/SEI>><</T(ELD Strategies4)/V( 
> )>><</T(ELD 
> Strategies2)/V(Think/pair/share)>><</T(_NATIV_LANG1)/V(Spanish)>><</T(ELD 
> Strategies3)/V(Modeling & visualizing)>><</T(ELD Frequency)/V(day)>><</T(ELD 
> Strategies1)/V(Graphic organizers or study 
> guides)>><</T(BIRTHDATE)/V(8/30/2001)>><</T(_NATIV_LANG2)/V(Spanish)>><</Kids[<</T(modifications:3)/V()>><</T(level)/V(Beginning)>><</T(variations:1)/V(Test
>  in small group)>><</T(variations:3)/V()>><</T(accommodations:3)/V(Test over 
> more than one 
> day)>><</T(variations:2)/V()>><</T(accommodations:1)/V(Administer at time 
> most beneficial to student)>><</T(accommodations:2)/V(Supervised breaks 
> within a section of the 
> test)>><</T(modifications:2)/V()>><</T(modifications:1)/V()>>]/T(EL_Reading)>><</Kids[<</T(modifications:3)/V()>><</T(level)/V(Early
>  Intermediate)>><</T(variations:1)/V(Test in small 
> group)>><</T(accommodations:3)/V(Test over more than one 
> day)>><</T(variations:3)/V()>><</T(variations:2)/V()>><</T(accommodations:1)/V(Administer
>  at time most beneficial to student)>><</T(accommodations:2)/V(Supervised 
> breaks within a section of the 
> test)>><</T(modifications:2)/V()>><</T(modifications:1)/V()>>]/T(EL_Writing)>><</T(SELPA
>  Header)/V(LA County Charter)>><</T(NATIV_LANG)/V(Spanish)>><</T(ELD Location 
> minutes)/V()>><</T(Assmt Instrument)/V(CELDT)>><</Kids[<</T(level)/V(Early 
> Intermediate)>>]/T(EL_Overall)>><</T(EL CELDT Overall Date)/V()>>]>>>>
> endobj
> trailer
> <</Root 1 0 R>>
> %%EOF
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to