File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ static void setUp()
8484 void testPDFBox988 () throws IOException
8585 {
8686 try (PDDocument doc =
87- Loader .loadPDF (new RandomAccessReadBuffer (PDFontTest .class .getResourceAsStream ("F001u_3_7j.pdf" ))))
87+ Loader .loadPDF (RandomAccessReadBuffer .createBufferFromStream (
88+ PDFontTest .class .getResourceAsStream ("F001u_3_7j.pdf" ))))
8889 {
8990 PDFRenderer renderer = new PDFRenderer (doc );
9091 renderer .renderImage (0 );
@@ -184,9 +185,10 @@ void testPDFBOX4115() throws IOException
184185 try (PDDocument doc = new PDDocument ())
185186 {
186187 PDPage page = new PDPage ();
187- try (PDPageContentStream contentStream = new PDPageContentStream (doc , page ))
188+ try (PDPageContentStream contentStream = new PDPageContentStream (doc , page );
189+ InputStream is = new FileInputStream (fontFile ))
188190 {
189- PDType1Font font = new PDType1Font (doc , new FileInputStream ( fontFile ) , WinAnsiEncoding .INSTANCE );
191+ PDType1Font font = new PDType1Font (doc , is , WinAnsiEncoding .INSTANCE );
190192
191193 contentStream .beginText ();
192194 contentStream .setFont (font , 10 );
You can’t perform that action at this time.
0 commit comments