Skip to main content
February 1, 2016
Question

Framemaker 2015 - FDK Client application page size issue

  • February 1, 2016
  • 1 reply
  • 654 views

Hi everybody,

I wrote an application using the FDK that simply opens a book, saves it as pdf (using API call F_ApiSave and FS_FileType=FV_SaveFmtPdf). Everything works like a charme but the page size. The book contains several A4 documents but the final PDF is created using the US Letter format resulting in a too short page.

If I export manually the book (using Framemaker interactively) the resulting PDF contains A4 sized pages.

I already tried to set the Adobe PDF printer default settings via the Control Panel (I set A4 as default page size).

Hopefully someone can point me out to a solution.

Thanks

This topic has been closed for replies.

1 reply

Participating Frequently
February 1, 2016

I'd suggest that you set the FP_PDFPageHeight and FP_PDFPageWidth properties for the FO_Book object. See also the other PDF properies listed for books in the FDK Programmer's Reference.

If this doesn't work, try asking again in the Adobe: FrameMaker Scripting forum.

February 1, 2016

Dear Mike,

thanks for your reply. This sounds like a good suggestion but I have no clue how to set FP_PDFPageHeight and FP_PDFPageWidth properties.... I looked at the programmer reference but I can't find them. Any further help?

Participating Frequently
February 2, 2016

If you search the FDK Programmer's Reference for FP_PDFPageHeight, you'll find the following documentation within the Object Reference chapter, FO_Book section:

PropertyTypeMeaning
FP_PDFPageHeightMetricTPage height for the generated PDF
FP_PDFPageWidthMetricTPage width for the generated PDF

So these are properties of type MetricT . You must set them using the call F_ApiSetMetric().

#include "fapi.h"

VoidT F_ApiSetMetric(F_ObjHandleT docId, F_ObjHandleT objId, IntT propNum, MetricT setVal);

(RTFM for more details.)

In your case, you need something like the following:

F_ApiSetMetric(FV_SessionId, bookId, FP_PDFPageHeight, 297*FV_METRIC_MM);

F_ApiSetMetric(FV_SessionId, bookId, FP_PDFPageWidth, 210*FV_METRIC_MM);

where bookId is the id of your book, that you later pass as the first parameter of F_ApiSave().