Skip to content

Commit

Permalink
#326 - We are now PDF/A2a compliant.
Browse files Browse the repository at this point in the history
Unfortunately, we are using some structure types introduced in PDF 1.5 so we are not PDF/A1a compliant, at least when using tables.
  • Loading branch information
danfickle committed Mar 3, 2019
1 parent 20605f2 commit 96850ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public void testAllInOnePdfA1b() throws Exception {
assertTrue(run("all-in-one-no-alpha", PDFAFlavour.PDFA_1_B, PdfAConformance.PDFA_1_B));
}

@Ignore // Failing because we haven't set up structure tagging for PDF/A1a standard.
@Test
@Ignore // Failing because TFoot, Tbody and THead strcuture types were only introduced with PDF 1.5.
@Test // We have to factor them out when using PDF/A1a.
public void testAllInOnePdfA1a() throws Exception {
assertTrue(run("all-in-one-no-alpha", PDFAFlavour.PDFA_1_A, PdfAConformance.PDFA_1_A));
}
Expand All @@ -120,7 +120,6 @@ public void testAllInOnePdfA2b() throws Exception {
assertTrue(run("all-in-one", PDFAFlavour.PDFA_2_B, PdfAConformance.PDFA_2_B));
}

@Ignore // Failing because we haven't set up structure tagging for PDF/A2a standard.
@Test
public void testAllInOnePdfA2a() throws Exception {
assertTrue(run("all-in-one", PDFAFlavour.PDFA_2_A, PdfAConformance.PDFA_2_A));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ public class PdfBoxRenderer implements Closeable {
_testMode = state._testMode;
_useFastMode = state._useFastRenderer;
_outputDevice = state._useFastRenderer ?
new PdfBoxFastOutputDevice(DEFAULT_DOTS_PER_POINT, _testMode, state._pdfUaConform, state._pdfAConformance != PdfAConformance.NONE) :
new PdfBoxFastOutputDevice(DEFAULT_DOTS_PER_POINT, _testMode,
state._pdfUaConform || state._pdfAConformance.getConformanceValue().equals("A"),
state._pdfAConformance != PdfAConformance.NONE) :
new PdfBoxSlowOutputDevice(DEFAULT_DOTS_PER_POINT, _testMode);
_outputDevice.setWriter(_pdfDoc);
_outputDevice.setStartPageNo(_pdfDoc.getNumberOfPages());
Expand Down

0 comments on commit 96850ee

Please sign in to comment.