pdf page counting (2025 Update)

Dec 22, 2024 Last reply: 1 year ago 20 Replies

Anyone have any idea how to publish a pdf so that it recognizes a frontispiece with roman numeral pagination?



The body page one currently recognized as page 14.



Annoying.



RL


I want the pdf reader to 'recognize' page numbers from the print, even if I have to do it manually on a per-page basis.

The pdf document is intended as a replica of existing hard copy, so those original numbers/roman numerals can't change.

RL

I just assume that the first page of a document is sheet 1.

I just did a test with Libre Office Writer. I created a document in which the first three pages use a page style with roman numerals, and the next three pages use another style with arabic numerals. I added a table of contents, which automatically displays correctly the page numbers in both forms. I then export as PDF. The document displays exactly as it should, but page 1 is numbered by the PDF viewer as 4 oin the page counter. Clicking on the table of contents, on the line for page 1 goes correctly to page 1, although the pdf shows page 4.

I do not see a way to change this.

There is an Usenet group called comp.text.pdf, you could ask there.

It'll have to be somebody else who has the right software, then. I get pdfs either from a scan or through printing utilities. No intention of giving Adobe money for a format that was developed for common usage.

Thought it might take if I processed it through html formatting, but that didn't seem to 'take' either.

RL

if your using word, then use a section break and insert your page number. You can deattach the sections from one another to number them separately.

Cheers

Have you looked at Libreoffice?

formatting link

...

That is what I did. The pages are numbered correctly inside LO and in the printed result, and in the PDF export. However, the page counter in the PDF viewer doesn't reflect numbering styles or renumbering.

In Word (doc), or Mozilla Composer (html) I'm formatting individual pages.

The only time they get 'sewed up' is in the final pdf file.

RL

The html was only an exercise with a few pages.

Although I've mounted books as html bodies, they were fairly short, simple and just begging to have single page access for download ( tube curves, spec sheets etc).

formatting link
The thing I'm working on now is 422 pages with a 5000 line index. I'm not going through THAT, manually inserting links.

A preliminary draft ( there are already 40 pages updated for the next draft) is available for comment and criticism. At 100Meg ( but getting smaller) it may be a slow download. Few will find the actual content of interest.

formatting link
Keep in mind that this is a replica - all original spelling, formatting and layout (including original errors) is intentionally preserved. Unless you've got an original hard copy, it may be hard to tell what's wrong - but overlapping images/text, or ocr source errors (rn / m , 1/l/I CG e/a) still abound.

OCR on this was so bad that the output was often useless as a textual contribution, but could sometimes be edited and reformatted manually. PDF-OCR scanned page file size was also 3 to 30 x larger than a pdf published from a text-corrected doc.

I think you'll find that you are misled in Adobe's original source for the pdf and eps files' original development.

They were always intended to be open source.

There is no money in this work; or for anybody involved.

RL

I'm not completely sure you are fully understanding what the OP wants. I think he has the page numbers showing correctly in the headers of all his pages but wants to have the reader itself know the page numbers he used in his headings so that he can tell the reader to go to page 17 and it goes to the page with "17" in the header and shows page 17 / whatever as it's status.

I am fairly certain that what you want cannot be done with a PDF, based on reading many documents where this would have been beneficial, such as the

3544 page Florida Building Code where the page labeled as (RAS)109.1 is PDF page 2625, or the 1235 page Square-D Digest with page 22-1 on PDF page 968. Both of these documents are made tolerable by links to major sections from the index. The Square-D Digest is exceptional in providing hyperlinks to web documents with part specs, drawings and CAD files for almost everything in the catalog.

Glen

That was the sort of Reader output that I had in mind.

I'll pay more attention to the features offered by my pdf publishing utility, (pdf995) to see what results I can get here.

If I can't wrestle it into shape, I may take you up on your offer, just to get this out of my hair, after revisions.

I'd normally add or remove pages by printing partial portions, then rejoining them. That doesn't appear to be practical if 'sections' carry un-numbered or oddly-paginated groups.

0 seems particularly problematic.

How would an end-user print the copyright page, or dedication page, if the select-page-to-print area of the gui offers pages ' -425 ' ?

Many thanks.

RL

I notice that the Foxit reader doesn't recognize the new labeling. That's pretty popular.

RL

Here's a radical idea: call the first page of a document page 1, and increment from there.

Then, if someone wants to see page 207, there it is.

adobe is a MS kind of tool. Professionals use TeX. I generated the ciforth documentation with texinfo. In ghostview the two cover pages appear as 1 2 in the page column, The body is on the third page with a page number 1. The content are on the end, showing negative numbers in the page column, and are marked I ,, XII .

Groetjes Albert

I've heard TeX pushed in tech forums, but tech publishers and regulators specify the format for submissions, and it ain't TeX.

RL

Depends on the outfit.

I’ve submitted two book manuscripts in LaTeX, no worries. Physics papers are usually done in TeX as well.

The resized and typod version boiled down to ~80meg.

Surprise, surprise - the PDF995 tool can be manipulated to give sectional page counting that's recognized by Adobe and Foxit readers.

Joining two volumes initially preserves page count of both. This disappears when the enjoined volume is reprinted. Solution - 'don't do that'.

I noticed this by accident - the second stitching exercise used ~ 20-page sections to avoid repeated reprint of large single-page-count increments.

formatting link
I could check the mail, have a snack, read a book chapter any time a large file was reprinted for editing/sequencing.

Anyways, that's all over and I can forget all about it, as with most software tools these days.

BeeMaid's lawyuhs are still twiddling thumbs, though author and editor are thrilled. Reading the book, you can concieve Saskatchewan co-op membership getting screwed regularly by their Manitoban brothers over time. This may just be one more kick in the can. The largest shippers always end up ruling the roost and these days you can only join 'if there's a spot' and you commit to non-part-time volumes.

At a certain scale, the differences between co-op and corporate begin to blurr, but they could still be bought out tomorrow by a wingnut corporation from poughkeepsie, if the members voted to do so. So far they've maintained at least the semblance of producer independence and mutual protection in a wild marketplace and invreasingly hazardous environment for bees.

RL

Good info, thanks. Took me a while to check it out, but I found that pdftk can add or revise PageLabels. Using the sample file at:

formatting link

you can extract the file data with:

dump_data Reads a single input PDF file and reports its metadata, book- marks (a/k/a outlines), page metrics (media, rotation and labels), data embedded by STAMPtk (see STAMPtk's embed option) and other data to the given output filename or (if no output is given) to stdout. Non-ASCII characters are encoded as XML numerical entities. Does not create a new PDF.

pdftk PageLabelsTest.pdf dump_data > orig.info

edit or add page labels in orig.info, save as revised.info,

pdftk PageLabelsTest.pdf update_info revised.info output RevisedLabelTest.pdf

produced a file showing my revisions.

Using that .info file as an example I was able to add page labels to a file which contained none, and the labels display correctly with Ubuntu Document Viewer.

Pdftk is also available for Windows. I use it mostly to assemble documents from CAD system individual page PDF files but it has a lot of other functionality.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required