Skip navigation
somefreename
Currently Being Moderated

Why won't this show (same) four pages in the Adobe Reader?

Jul 31, 2012 9:35 AM

%PDF-1.6

3 0 obj

<</Type /Font /BaseFont /Times-Italic /Subtype /Type1 >>

endobj

6 0 obj

<</Length 158 >>

stream

1 0 0 1 50 200 cm /X1 Do

1 0 0 1 0   200 cm /X1 Do

1 0 0 1 0   200 cm /X1 Do

1 0 0 1 200 -400 cm /X1 Do

1 0 0 1 0 200 cm /X1 Do

1 0 0 1 0 200 cm /X1 Do

endstream

endobj

4 0 obj

<</Type /XObject /Subtype /Form /BBox [0 0 1000 1000] /Resources <</Font <</F1 3 0 R>> >>

/Length 77 >>

stream

BT /F1 18 Tf 0 0 Td (18 Point) Tj ET

BT /F1 25 Tf 0 50 Td (25 Point) Tj ET

endstream

endobj

5 0 obj

<</Type /Page /Parent 2 0 R /Contents 6 0 R /MediaBox [0 0 595.27 841.88] /UserUnit 0.5 /Resources <</XObject <</X1 4 0 R>> >>

>>

endobj

2 0 obj

<</Type /Pages /Kids [5 0 R 5 0 R 5 0 R 5 0 R ] /Count 4 >>

endobj

1 0 obj

<</Type /Catalog /Pages 2 0 R >>

endobj

xref

0 7

0000000000 65535 f

0000000745 00000 n

0000000667 00000 n

0000000010 00000 n

0000000297 00000 n

0000000517 00000 n

0000000085 00000 n

trailer

<<

/Root 1 0 R

/Size 7

>>

startxref

796

%%EOF

 

Works OK with Chrome's reader......

 
Replies
  • Currently Being Moderated
    Jul 31, 2012 11:40 AM   in reply to somefreename

    Because PDF isn't a text format, there's little value in just copy/pasting the text. The line endings could be wrong. Almost certainly, byte addresses will change. However, I can see the problem here.

     

    The problem is the duplicated page object. You can duplicate everything else e.g. Contents, Resources as indirect objects.

     

    The reason is that Acrobat needs to be able to say "here is an object, it's a page object. What page is it?" -- then negotate the Pages tree to find it.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 12:36 PM   in reply to somefreename

    How did you create the file? Why did you post this in a forum for Adobe Acrobat?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 1:17 AM   in reply to somefreename

    1. It may surprise you, but more than 50% of the problems which people ask about with PDF generators turn out to be related to the exact byte layout, and disappear (or get worse) with copy/paste. People with tools for PDF examination like to be able to use them and know they are working on the exact/same file.

     

    "But why can it not do that."

    Because the question is unanswerable. Imagine an API call

     

    PageObjectGetPageNumber().

     

    Given object 5 0 R and asking for the page number, what is the correct answer - 1, 2, 3, or 4? This is of more than academic interest. For example, the page object might be the destination of a link, and an interactive viewer needs to know which page to navigate to. So, while a simple PDF viewer could display it, many things might not work.

     

    ISO 32000-1 doesn't forbid it. But there isn't much mileage in taking the high ground and saying that one is making good files but Acrobat isn't compliant.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 5:58 AM   in reply to somefreename

    You weren't taking the high ground, but I've been there and found it most unhelpful, so I was trying to steer the discussion back to what works rather than the detail of what the ISO spec says.

     

    If we do want to pursue it we could look at 12.3.2.1 "A destination defines a particular view of a document, consisting of  ...The page of the document that shall be displayed", and not "one or more pages". So in practical terms these are unhelpful, and some might argue implicitly forbidden.

     

    This structure will also mess up users who take their PDFs through editing tools. Any addition of content, or annotations, will update the single page object and hence all the pages, which may well confuse both user and software. I think you'll find other software getting confused if it goes beyond viewing.

     

    It would helpful for ISO32000-2 to be more specific.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 2, 2012 2:03 AM   in reply to somefreename

    I use the technique of sharing identical content streams myself and no problems have yet been reported. This may also be due to the Acrobat model of low level object editing; streams cannot be edited, only recreated. So an updated content stream stored in one page object would then "break free" of the other duplicates.

     

    IdenticalResources could give problems, but don't seem to in practice. It is common practice in any case to add the same resources throughout a document, so editors should start by duplicating direct resources before starting per-page edits. I would not recommend identical Annots.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 5:11 AM   in reply to Test Screen Name

    Moving this discussion to the Acrobat SDK.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points