Add Background to PDF using Excel VBA
I would like add a background to a PDF File using excel vba code, Please help as I cannot find any alternative other that watermarking API
[VBA]Function WatermarkPDF(Base_PDF As String, WatermarkPDF_AX As String)
Dim bolResult As Boolean
Dim pdfDoc1 As AcroPDDoc
Dim jsObj As Object
Set pdfDoc1 = CreateObject("AcroExch.PDDoc")
If pdfDoc1.Open(Base_PDF) Then
Set jsObj = pdfDoc1.GetJSObject
'jsObj.addWatermarkFromFile WatermarkPDF_AX ', bOnTop:=False
jsObj.addWatermarkFromFile WatermarkPDF_AX, 0, 0, 0, False, True, True, 0, 0, 0, 0, False, 1, False, 0, 1
End If
pdfDoc1.Save 1, Base_PDF
pdfDoc1.Close
Set jsObj = Nothing
Set pdfDoc1 = Nothing
End Function[/VBA]
1 Attachment(s)
Oops!!! No luck after testing some more PDF
Oops!.. It works only for PDF by adding the Watermark PDF on top of BASE PDF. Can you please test it with the attached PDF, BACKGROUND PDF need to appear behind Base PDF and the result need to me Merged PDF. I tried through code but no success (Behind pdf, tried bOntop as True/false)