Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Size not decreasing after splitting a document

$
0
0

Hi,

I am trying to split a pdf document using the below code. where wipDocument is a java bean holding split document information.

for

(WipDocumentPage wipDocumentPage : wipDocument

.getDocumentPages()) {

if (wipDocumentPage.getPageActions().contains("split")) {

Page page = pdfDocument.getPages().get_Item(

wipDocumentPage.getPageNumber());

splitPdfDocument.getPages().add(page);

}

}

wipDocument.getDocumentPages().orderByPageNumberDescending();

for (WipDocumentPage wipDocumentPage : wipDocument

.getDocumentPages()) {

if ( wipDocumentPage.getPageActions().contains("split")) {

log.debug("delete page number " + wipDocumentPage.getPageNumber());

pageCollection.delete(wipDocumentPage.getPageNumber());

}

}

 

Document gets splitted properly using this code the only issue is size of files does not increase. attached is the test  document.

 

Can you please help.


Viewing all articles
Browse latest Browse all 3131

Trending Articles