Discussion:
A PDF into a FM file then save as pdf... how to have alll the pages of the included pdf file
(too old to reply)
hjk
2007-03-22 17:34:43 UTC
Permalink
FM 7.2

We can import a complete PDF file as an object into a framemaker file. Then
when we try to generate a pdf from this framemaker file, we have only the
firts page of the pdf imported.

Is there a method to import a pdf file and force FM to generate a pdf file
with save as... with the complete pdf file inserted into the padf ?
Johannes
2007-03-23 21:37:08 UTC
Permalink
Post by hjk
We can import a complete PDF file as an object into a framemaker file. Then
when we try to generate a pdf from this framemaker file, we have only the
firts page of the pdf imported.
Is there a method to import a pdf file and force FM to generate a pdf file
with save as... with the complete pdf file inserted into the padf ?
FrameMaker imports PDF files per page only. To do something similar to
what you intend, I once came up with a Windows shell script that
writes out a MIF file, incorporating the name of a referenced PDF file
and its page count.

Note that the MIF code was just stripped off a file and isn't
constructed very nicely, but it does the job. After running the
script, you should use FrameMaker to open and save the output file.
There is no text flow, thus you can't import the file into a document,
but you can use it as part of a book instead.

Regards
Johannes


Here is the VB script, feel free to post an optimized version:

Dim fso, mif, pdfname, pagecount, counter
Set fso = CreateObject("Scripting.FileSystemObject")
pdfname = InputBox("Name of PDF file to include:")
pagecount = CInt(InputBox("Enter number of pages to import (will begin
at first page):"))
Set mif = fso.CreateTextFile("PDFcontainer.mif", True)
mif.writeline("<MIFFile 7.00>")
mif.writeline("<Units Ucm>")
mif.writeline("<Document <DPageSize 21.0 cm 29.7 cm> >")
counter = 1
do until counter > pagecount
mif.writeline("<Page")
mif.writeline("<ImportObject")
mif.write ("<ImportObFileDI `<c\>")
mif.write (FileObj.FileName)
mif.writeline("'>")
mif.write ("<ImportObFile `")
mif.write (FileObj.Filename)
mif.writeline("'>")
mif.write ("<ImportObEditor `#PageNumber(")
mif.write (counter)
mif.writeline(")'>")
mif.writeline("<ImportObUpdater `PDF'>")
mif.writeline("<ShapeRect 0.0 cm 0.0 cm 20.99028 cm 29.66862 cm>")
mif.writeline("<BRect 0.0 cm 0.0 cm 20.99028 cm 29.66862 cm>")
mif.writeline("<FlipLR No>")
mif.writeline("<NativeOrigin 0.0 cm 29.66862 cm>")
mif.writeline(">")
mif.writeline(">")
counter=counter + 1
loop
mif.close

Loading...