Cross reference table or cross refference stream not found11

public static void main(String[] args) {
String inputFileName = Paths.get(“aaa.pdf”).toString();
Document pdfDocument = new Document(inputFileName);

    try {
        for (int pageCount = 1; pageCount <= pdfDocument.getPages().size(); pageCount++) {
            // Create stream object to save the output image
            String outputFilePath = "aaa.jpg";
   imageStream = new;
            Resolution resolution = new Resolution(300);
            JpegDevice JpegDevice = new JpegDevice(resolution);
            JpegDevice.process(pdfDocument.getPages().get_Item(pageCount), imageStream);
    } catch (FileNotFoundException e) {

    } catch (IOException e) {

    } finally {
        if (pdfDocument != null) {


image.jpg (299.8 KB)


We were able to replicate the issue in our environment while testing the scenario with 21.6 version of the API. Therefore, we have logged it as PDFJAVA-40665 in our issue tracking system. We will further look into its details and let you know once it is rectified. Please be patient and spare us some time.

We are sorry for the inconvenience.


We have investigated the logged ticket. This is not a bug of Aspose.PDF library as the input document is corrupted (Pages 17-24 have broken content). It also could be seen when opening the document via Adobe Acrobat or when check it with Adobe Preflight tool (Please see attached screenshots).
BrokenPages2.jpg (188.3 KB)
BrokenPages.png (22.3 KB)