Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Merging / Re-Arranging PDF Pages
Conf: (P-PDF) Developers, Msg: 54690
From: vivek75
Date: 5/29/2002 05:07 PM

Hi All,

Our team is now Planning to buy some Adobe software
for our requirements.
But we need your advice and suggestions on a
few points.

Our requirement is as follows :--
We are trying to convert crystal reports into
PDF files, and then merge the PDF files into
a single PDF file, then re-arrange the pages
in the PDF file, and E-Mail the resultant PDF to
some E-mail addresses.
We also want to attach a disclaimer page at the
end and a "Table of Contents" page at the beginning
of the PDF file.

We already have the mailer component.
We are using VB/ASP platform.
The approach we are having in mind right now,
is as follows ( i don't think this is the best way,
though ):--
1. To convert a Crystal report into a PDF, we are using
a plug-in ( PDFDriver), using the following piece of VB code :--

Dim crxExportOptions As CRAXDDT.ExportOptions
Set crxExportOptions = Report.ExportOptions
crxExportOptions.FormatType = crEFTPortableDocFormat
crxExportOptions.DestinationType = crEDTDiskFile
crxExportOptions.DiskFileName = "c:\TestPDF.pdf"
Report.Export False

2. We are appending the PDFs ( as and when they are created ),
into a single large PDF file. For this we are using
"Active PDF Server" ( Evaluation Copy ), for which we have the
following piece of ASP Code :--

value& = [form!]APServer.Test("This is a test!")
A return code of 0 indicates success
ASP Example
Set APServer = CreateObject("APServer.Control")
l = APServer.Test("This is a test!")
There should now be a file created

3. Now comes the problem of rearranging the pages. For
this we are having the following approach in mind :--
Extract the pages from the single large PDF ( created above ),
in the order the user wants, and append them into another PDF.
For this, we are having Acrobat Exchange in mind , for which
we have the following piece of VB code :--
Dim PDDocSource As Object, PDDocTarget As Object
Dim iStartPage As Integer, iNumPages As Integer
Dim bInserted as Boolean

Set PDDocSource = CreateObject("AcroExch.PDDoc")
Set PDDocTarget = CreateObject("AcroExch.PDDoc")

bInserted = PDDocTarget.InsertPages(-1, _
PDDocSource, _
iStartPage, _
iNumPages, _
Our problem seems to be as follows :--
In step 2, the "Active PDF server" seems to write
into the PDF ( which we can use for the Disclaimer text
and the table of contents ), but however we are not able to
re-arrange the pages, which acrobat exchange can do
in step 3. However, we have not found a way to make
acrobat exchange write strings into PDF files.
We are planning to buy some acrobat software to achieve the
above, but we want a single software that can do all these
things ( or atleast steps 2 and 3 would suffice ).
Please let me know if you know about any PDF software
that can do all of the above, the cost, and if possible,
the code.
Thanks a lot, in advance !

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.