@@ -618,55 +618,6 @@ public void create1000PagesDocumentWithFullCompression() throws IOException {
618
618
pdfDocument .close ();
619
619
}
620
620
621
- @ Test (timeout = 0 )
622
- @ Ignore ("Too big result file. This test is for manual testing. -Xmx6g shall be set." )
623
- public void hugeDocumentWithFullCompression () throws IOException {
624
- int pageCount = 800 ;
625
- String filename = destinationFolder + "hugeDocumentWithFullCompression.pdf" ;
626
-
627
- final String author = "Alexander Chingarev" ;
628
- final String creator = "iText 6" ;
629
- final String title = "Empty iText 6 Document" ;
630
-
631
- PdfWriter writer = new PdfWriter (filename , new WriterProperties ().setFullCompressionMode (true ));
632
- PdfDocument pdfDoc = new PdfDocument (writer );
633
- pdfDoc .getDocumentInfo ().setAuthor (author ).
634
- setCreator (creator ).
635
- setTitle (title );
636
- for (int i = 0 ; i < pageCount ; i ++) {
637
- PdfPage page = pdfDoc .addNewPage ();
638
- PdfCanvas canvas = new PdfCanvas (page );
639
- canvas
640
- .saveState ()
641
- .beginText ()
642
- .moveText (36 , 700 )
643
- .setFontAndSize (PdfFontFactory .createFont (StandardFonts .HELVETICA ), 72 )
644
- .showText (Integer .toString (i + 1 ))
645
- .endText ()
646
- .restoreState ();
647
- PdfImageXObject xObject = new PdfImageXObject (ImageDataFactory .create (sourceFolder + "Willaerts_Adam_The_Embarkation_of_the_Elector_Palantine_Oil_Canvas-huge.jpg" ));
648
- canvas .addXObject (xObject , 100 , 500 , 400 );
649
- canvas .release ();
650
- page .flush ();
651
-
652
- }
653
- pdfDoc .close ();
654
-
655
- PdfReader reader = new PdfReader (filename );
656
- PdfDocument pdfDocument = new PdfDocument (reader );
657
- Assert .assertEquals ("Rebuilt" , false , reader .hasRebuiltXref ());
658
- PdfDictionary info = pdfDocument .getTrailer ().getAsDictionary (PdfName .Info );
659
- Assert .assertEquals ("Author" , author , info .get (PdfName .Author ).toString ());
660
- Assert .assertEquals ("Creator" , creator , info .get (PdfName .Creator ).toString ());
661
- Assert .assertEquals ("Title" , title , info .get (PdfName .Title ).toString ());
662
- Assert .assertEquals ("Page count" , pageCount , pdfDocument .getNumberOfPages ());
663
- for (int i = 1 ; i <= pageCount ; i ++) {
664
- PdfDictionary page = pdfDocument .getPage (i ).getPdfObject ();
665
- Assert .assertEquals (PdfName .Page , page .get (PdfName .Type ));
666
- }
667
- pdfDocument .close ();
668
- }
669
-
670
621
@ Test
671
622
public void smallDocumentWithFullCompression () throws IOException {
672
623
String filename = destinationFolder + "smallDocumentWithFullCompression.pdf" ;
0 commit comments