Author Topic: Editing merged files  (Read 4901 times)

0 Members and 1 Guest are viewing this topic.

robg

  • Newbie
  • *
  • Posts: 4
Editing merged files
« 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

RTT

  • Administrator
  • *****
  • Posts: 907
Re: Editing merged files
« Reply #1 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


robg

  • Newbie
  • *
  • Posts: 4
Re: Editing merged files
« Reply #2 on: July 21, 2014, 02:23:00 AM »
Thanks - I look forward to the next release!

Keep up the good work  ;D