Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Jon_Pyne@adobeforums.com #1
Add a watermark, the hard way
Hi.
I've been drooling over the Acrobat 7.0 SDK documentation. It talks about an addWatermarkFromFile() function in JavaScript. You lucky, lucky, lucky people.
I have Acrobat 6.0 (Pro). Ugh. You can add a watermark in the application, but there is no addWatermarkFromFile(). I had thought of using MenuItemExecute to work the menus...
acrApp.MenuItemExecute "COMP:AddBack"
SendKeys "%b"
SendKeys MY_PATH & "MY_FILE.pdf"
SendKeys "{ENTER}"
However, the crafty dialog seems to be modal, ie the code halts at MenuItemExecute and waits for me to dismiss it before executing the SendKeys commands.
Is there a way round this?
Jon
MS Office 2003
MS Windows XP Pro SP2
Adobe Acrobat 6.0 Pro
Jon_Pyne@adobeforums.com Guest
-
Watermark
How to remove watermark form an image,downloaded from net. -
Remove watermark
Is it ever possible to remove a watermark from a PDF? We generate PDFs from InDesign and send watermarked versions to the client until we get paid. A... -
Watermark???
Hello, How does one create an image thats nearly white/gray, as a watermark on an image in PS? I have an image for a community website. I... -
Picture over watermark
I have a big watermark on a page. The page is constructed with tables. I want to put a photo over the watermark. The photo is shaped as an elipse.... -
how hard to replace titanium internal hard drive? How to cloneold hard drive onto it?
Hi all - I have a 2001 titanium laptop with a 20 Gig hard drive. The thing is getting too full and I'm toying with the idea of getting a bigger... -
Bernd Alheit #2
Re: Add a watermark, the hard way
Is there a way round this?
Upgrade to Acrobat 9.
Bernd Alheit Guest
-
scollaris@gmail.com #3
Re: Add a watermark, the hard way
On Mar 31, 3:29*am, Jon_P...@adobeforums.com wrote:
************************************************** **************************************************> Hi.
> I've been drooling over the Acrobat 7.0 SDK documentation. It talks aboutan addWatermarkFromFile() function in JavaScript. You lucky, lucky, lucky people.
> I have Acrobat 6.0 (Pro). Ugh. You can add a watermark in the application, but there is no addWatermarkFromFile(). I had thought of using MenuItemExecute to work the menus...
>
> acrApp.MenuItemExecute "COMP:AddBack"
> SendKeys "%b"
> SendKeys MY_PATH & "MY_FILE.pdf"
> SendKeys "{ENTER}"
>
> However, the crafty dialog seems to be modal, ie the code halts at MenuItemExecute and waits for me to dismiss it before executing the SendKeys commands.
> Is there a way round this?
> Jon
>
> MS Office 2003
> MS Windows XP Pro SP2
> Adobe Acrobat 6.0 Pro
* Procedure: m_insertWatermark
* Author: Larry Leo
* Creation Date: 04/23/2008
* Purpose: Add water mark to pdf document from another pdf
document
* Parameters: l_pInputFile - full path of pdf to be "water
marked"
* l_pWatermarkFile - full path of pdf file
containing water mark to be used
* l_pOutPutFile - full path of resulting pdf with
water mark added
* ALL PARAMETERS ARE REQUIRED STRINGS
************************************************** **************************************************
* Modifications:
* Date Init Reason
* 04/14/2009 CLB Moved into PDF doc,
************************************************** **************************************************
LPARAMETERS l_pInputFile, l_pWatermarkFile, l_pOutPutFile
LOCAL l_opdDoc, l_oJSobj,l_nTotalDocs
l_oAcrobat = CREATEOBJECT("AcroExch.App") && Acrobat
l_opdDoc = CREATEOBJECT("AcroExch.PDDoc") && Document Object
l_opdDoc.OPEN(l_pInputFile)
l_oJSobj = l_opdDoc.GetJSobject && JavaScript Object
l_nTotalDocs = ALEN(l_oJSobj.app.activedocs) && needed so we don't
close acrobat if others are opened
l_oJSobj.addWatermarkFromFile( ;
l_pWatermarkFile ; && Watermark File
, 0 ; && SourcePage
, 0 ; && Start
, 99999 ; && End
, .T. ; && OnTop
, .T. ; && OnScreen
, .T. ; && OnPrint
, 0 ; && HorizAlign 1000
, 2000 ; && VertAlign 2000
, 140 ; && HorizValue 40
, 10 ; && VertValue -35
, .F, ; && Percentage
, .5 ; && Scale
, .F. ; && FixedPrint
, 0 ; && Rotation
, 1.0) && Opacity
* save file
l_opdDoc.SAVE(21, l_pOutPutFile)
l_opdDoc.CLOSE()
IF l_nTotalDocs = 1
l_oAcrobat.Exit()
ENDIF
l_opdDoc = NULL
l_oJSobj = NULL
l_oAcrobat = NULL
RETURN
scollaris@gmail.com Guest



Reply With Quote

