• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Framemaker 2015 - FDK Client application page size issue

Guest
Jan 31, 2016 Jan 31, 2016

Copy link to clipboard

Copied

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

Views

452

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 01, 2016 Feb 01, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 01, 2016 Feb 01, 2016

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 02, 2016 Feb 02, 2016

Copy link to clipboard

Copied

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().

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 02, 2016 Feb 02, 2016

Copy link to clipboard

Copied

LATEST

Thank you Mike for your kindness, I will try to implement this solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines