RTTSoftware Support Forum

PDF-ShellTools => General => Topic started by: robg on July 17, 2014, 12:56:26 AM

Title: Editing merged files
Post by: robg on July 17, 2014, 12:56:26 AM
Hi, thanks for your help so far on scripting and the API.  :)

My current problem is this:
I am merging a selection of files and blank pages using IDocumentMerger, but when I'm finished, I want to set all the page sizes, trim boxes, bleed boxes etc to be the same via IPDFPages commands.

What is the best way of doing this to the merged file?

Do I have to save the merged file first before I can edit it's IPDFPage properties, and if so, how do I load this new file back into the script automatically?

I seem to also be having problems defining new bleed and trim box sizes if they don't already exist in the file?

Cheers

Rob
Title: Re: Editing merged files
Post by: RTT on July 17, 2014, 03:40:51 PM
Unfortunately, setting these page boxes isn't implemented yet, despite what the help file says.
When implemented, it will be possible to set in two ways.
While merging:
IPDFPage.CropBox=IFloatRect
IDocumentMerger.MergPage(IPDFPage)

Or after merging:
IDocumentMerger.EndAndSaveTo(newFilename)
IFileObject=pdfe.CreateFileObject(newFilename)
IFileObject.Pages(index).CropBox=IFloatRect
...
IFileObject.Pages.CommitChanges

Title: Re: Editing merged files
Post by: robg on July 21, 2014, 02:23:00 AM
Thanks - I look forward to the next release!

Keep up the good work  ;D