Copying Pictures fron one PDF to another

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
jggori
Posts: 10
Joined: Wed Oct 18 2006

Copying Pictures fron one PDF to another

Post by jggori »

Is there an easy way to copy a Picture Object from One PDF Document to another PDF Document that I am creating. Assume that it is not an External file?

I am using the PDF Creator.

Thank you
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

You can use acCommandToolCopy to copy the current selected object to the clipboard and acCommandToolPaste to paste the object in the second pdf file.

Hope this helps.
jggori
Posts: 10
Joined: Wed Oct 18 2006

Post by jggori »

I tried the following

oSource = CREATEOBJECT("PDFCreactiveX.PDFCreactiveX.3")
oDest = CREATEOBJECT("PDFCreactiveX.PDFCreactiveX.3")
oSource.OpenEx("foo.pdf")
oSource.CurrentPage = 1
oDest.InitBlank()
oDest.ReportState = acReportStateDesign
oDest.DoCommandTool(acCommandToolPageView)
oDest.CurrentPage = 1
oPage = oSource.ObjectAttribute("Pages[1]","Objects")
FOR EACH oSourceObjects IN oPage
DOEVENTS Force
oSourceObjects.Selected = 1
oSource.DoCommandTool(acCommandToolCopy)
oSourceObjects.Selected = 0
oDest.DoCommandTool(acCommandToolPaste)
OdEST.Refresh()
ENDFor
oDest.DoCommandTool(acCommandToolRunDocument)
oDest.Save("foo2.pdf",1)


Am I Missing something?
Post Reply