Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Converting Word to PDF

New Here ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

Hi,

I have a Word document having approx 10 pages. And I use smartTextReflow to load all the pages and then I want to export the entire document as PDF.

But only first page is getting exported before in the CEP script the export command gets executed before SmartTextReflow loads all the Word pages. Please help how to sync this.

Following is the code:

var tempDoc = app.documents.add();
var myPDFPage;
tempDoc.documentPreferences.facingPages = false;
tempDoc.documentPreferences.createPrimaryTextFrame = true;
var leftMargin = tempDoc.pages.item(0).marginPreferences.left;
var topMargin = tempDoc.pages.item(0).marginPreferences.top;
var myTextFrameTemp = tempDoc.pages.item(0).textFrames.firstItem();
myTextFrameTemp.geometricBounds = [leftMargin, topMargin, myDocument.documentPreferences.pageHeight - topMargin, myDocument.documentPreferences.pageWidth - leftMargin];
myPDFPage = myTextFrameTemp.place(File(myPDFFile), false)[0];
app.pdfExportPreferences.pageRange = "All";
tempDoc.exportFile(ExportFormat.PDF_TYPE, File(myPDFFile + ".pdf"), false);

TOPICS
Feature request, How to, Import and export, Scripting, Server developers, Sync and storage

Views

95

Likes

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
Adobe Community Professional ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

You might be better posting in the Acrobat forum.

Likes

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
New Here ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

But I need to do it using InDesign app only. Using CEP extension. Not using Acrobat.

Likes

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
Adobe Community Professional ,
Nov 15, 2021 Nov 15, 2021

Copy link to clipboard

Copied

So you are Placing a Word file into InDesign and exporting the resulting document to PDF – have you tried just using one of InDesign's Adobe PDF Presets?

Likes

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
New Here ,
Nov 15, 2021 Nov 15, 2021

Copy link to clipboard

Copied

I am using this setting to export all pages: app.pdfExportPreferences.pageRange = "All";

 

Problem is that the order of execution is not in sync. PDF is getting exported before SmartTextReflow loads all pages of Word doc.

Likes

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
Adobe Community Professional ,
Nov 15, 2021 Nov 15, 2021

Copy link to clipboard

Copied

LATEST

Ok. Then disable SmartTextReflow and add pages and frames until the story will not overflow.

Only then export to PDF.

 

Regards,
Uwe Laubender

( ACP )

Likes

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