โŒ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayNews from the Ada programming language world

Java Itext7 ADA Issues - setTagged method on PdfDocument increasing the size drastically for pdf pages

I'm using Itext 7.1.7 to generate the pdf and now for ADA Complience, I had to use setTagged method for setting tags on each element. But I'm seeing some issues after making those chagnes when it comes to memory and size. Pleae find the below example code snippet.

BufferedOutputStream bos = new bufferedOutputStream(ostream);
PdfWriter writer = new PdfWriter(bos, (new WriterProperties().setFullCompressionMode(true)).addUAXmpMetadata().setPdfVersion(PdfVersion.PDF_1_7)
OutputStream over = writer.getOutputStream();
PdfDocument pdf = new PdfDocument(new PdfWriter(over));
pdf.setTagged();

Document document = new Document(pdf, PageSize
.
. 
.
.
document = document.add(new AreaBreak(AreaBreakType.NEXT_PAGE));

Here we had to create pages that are exceeding 500 Pages and what I observed is, for comply withtoA, when I use pdf.setTwagged(), It's taking log of memory to trocess the page and eneach up downloading the page with larger size. For e.g, if I don't have pdf.sidTaguse for a 500 pag()es file, the size is like 10mb but hen I use pdf.setTagged(), it's going upto 300+mb.


So how can I gdoes the size impacts when I use setTagged?ehe pdf with the same size yet ADAmeeting the Complience?

โŒ
โŒ