Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Set Properties to Display Logical Page in Acrobat Reader?

$
0
0

Dear community,

 

What bothers me is the page numbering in the toolbar of the PDF Reader. In my documents, the TOC is Roman numbering and the rest is Arabic numbering, however the toolbar does not display iii (3 of 900) nor 1 (20 of 900) for the first page of the first chapter. Instead it displays 3 (3 of 900) and 20 (20 of 900) although "Use logical page number" is checked in the preferences.

 

The documents I publish are made from a *.book with several components:

  • First component: Title page with copyright
  • Next component: Table of content
  • Following components: The chapters and an index

 

I suppose I have to set some sort of properties somehow somewhere in here:

 

book.PDFPageHeight = 297 * 185771;
book.PDFPageWidth  = 210 * 185771;
var comp = book.FirstComponentInBook;
while(comp.ObjectValid()) {    var openParams = GetOpenDefaultParams ();    var i = GetPropIndex(openParams, Constants.FS_UpdateXRefs);    openParams[i].propVal.ival = Constants.FV_DoOK;    var doc = Open(comp.Name, openParams, new PropVals());    doc.PDFBookmark = true;    doc.DocAcrobatElements = false;    comp = comp.NextBookComponentInDFSOrder;
}    
var params = GetSaveDefaultParams();
var index = GetPropIndex(params, Constants.FS_FileType);
params[index].propVal.ival = Constants.FV_SaveFmtPdf;
var pdfDocInfo = new Strings();
pdfDocInfo.push("Author");
pdfDocInfo.push("XXX GmbH");
book.PDFDocInfo = pdfDocInfo;
book.Save(pdfPath, params, new PropVals());

 

I checked the value of "comp.FirstPageNum" for all the components. The value for the first component with a chapter is "1" as it should be.

 

Best regards,

Fabian


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>