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

How do I generate PDF and CHM files from the a command line in windows?

Community Beginner ,
May 07, 2014 May 07, 2014

I am trying to set up a PC to build some documents during the night. I was looking for a way to get framemaker to generate PDF and CHM files via a command line in windows? How is this done with FrameMaker 12

Thanks for the help

Alex

2.2K
Translate
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

correct answers 1 Correct answer

Community Beginner , May 19, 2014 May 19, 2014

I have the pdf part of this working now. Made a jsx that generates the PDF via the doc.Save(). And when the pdf is generated the script then closes down FrameMaker via the app.Close methode.

Then I only need to copy the script to the FrameMaker autorun dir and start FrameMaker to get the pdf genenerated.

I am now trying to do something alike with the chm filegeneration. But I can't find anything on how to get FrameMaker to make CHM files via extend script. Is there anyone that have some good place

...
Translate
LEGEND ,
May 07, 2014 May 07, 2014

That's what the FM Publishing Server was designed for (if you have very deep pockets... ).

You would probably have to create a startup script that reads and runs entries from an external file telling FM what & how to process the desired files.

You would then need to use the system scheduler to fire off FM at a specified time for overnight runs.

To just do PDFs, you could try using any of the batch processors available from:

1. Datazone (DZbatcher available at: http://www.miramo.com/english/overview/download.html)

2. Omni Systems as part of the mif2go package (it works just fine from the demo version): http://mif2go.com/download/all

Translate
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
Community Beginner ,
May 19, 2014 May 19, 2014

I have the pdf part of this working now. Made a jsx that generates the PDF via the doc.Save(). And when the pdf is generated the script then closes down FrameMaker via the app.Close methode.

Then I only need to copy the script to the FrameMaker autorun dir and start FrameMaker to get the pdf genenerated.

I am now trying to do something alike with the chm filegeneration. But I can't find anything on how to get FrameMaker to make CHM files via extend script. Is there anyone that have some good places to look for that?

Thanks for the help

Alex

Translate
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
Enthusiast ,
May 19, 2014 May 19, 2014

Full details about the environment you're working in would be more than

helpful.... they'd be the basic before anyone can advise you.

OS, networked/local, FM version, how you're generating the chm....

Art Campbell

art.campbell@gmail.com

"... In my opinion, there's nothing in this world beats a '52 Vincent and

a redheaded girl." -- Richard Thompson

No disclaimers apply.

DoD 358

I support www.TheGrotonLine.com, hyperlocal news for Groton MA.

Translate
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
Community Beginner ,
May 20, 2014 May 20, 2014

I am using FrameMaker version 12.0.1.331 in a local installation on a Window 7 professional 64 bit.

And I am trying to figure out how to generate CHM files using the extendScript/javascript you can use in FrameMaker 12

/Alex

Translate
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
Community Beginner ,
Nov 27, 2014 Nov 27, 2014
LATEST

Hi,

The part with generate a PDF via a jsx seems to work OK, except when FrameMaker decides that it will not work anymore. I must say I am not impressed with the stabillity of FrameMaker 12, there is room for a lot of improvement!.

I have given up on how to figure out how to get FrameMaker 12 to generate chm files via jsx scripts, any pointes are still very welcome.


The route I have taken is I make a RoboHelp project for each chm files I need to generate. The only thing this RoboHelp project contains is a link to the actual FrameMaker project I want to generate a chm file.

To make the chm I start RoboHelp with a script that

1) Opens the desired project

2) Sets the desired output chm files name

3) Generates the chm file

4) And finally quits RoboHelp

Below is a copy of the jsx in case anyone can reuse anything.  And yes parameters are transfered via enviroments variable. I have later learned there is some way to read the parameters given at a command line but this seems to work so I stick to this for now.

// Get parameters
var RhProjName = $.getenv("RH_PROJ_NAME");
var RhChmName = $.getenv("RH_CHM_NAME");
var RhLogFileName = $.getenv("RH_LOGFILE_NAME");

var RhLogFile = new File(RhLogFileName);

RhLogFile.open("w", "TEXT");

RhLogFile.writeln("RH_PROJ_NAME : ", RhProjName);
RhLogFile.writeln("RH_CHM_NAME : ", RhChmName);

doc = RoboHelp.openProject (RhProjName, 1);

var sslmngr = RoboHelp.project.SSLManager;
for(var i = 1; i<=sslmngr.count; i++){
  var ssl = sslmngr.item(i);
  if(ssl.name == 'Microsoft HTML Help') {

    // Set the output location and file name

    ssl.setSpecificProperty("DestinationProjectName", RhChmName);

    if (doc.saveAll(true) ) {
      RhLogFile.writeln("saveAll returned TRUE");
    } else {
      RhLogFile.writeln("saveAll returned FALSE");
    }

    if ( ssl.generate() ) {
      RhLogFile.writeln("ssl.generate returned TRUE");
    } else {
      RhLogFile.writeln("ssl.generate returned FALSE");
    }
  } else {
    // alert ("Found " + ssl.name + " dont do anything");
  }
}

doc.saveAll(true);
RhLogFile.close();
RoboHelp.closeProject();
RoboHelp.quit();

Translate
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