-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b08725e
commit 51f5fd1
Showing
12 changed files
with
433 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Add bookmarks to pages in the PDF | ||
oSVR.AddPageBookmark "Parent", 1, 1, "Fit" | ||
oSVR.AddPageBookmark "Child 1", 0, 2, "Fit" | ||
|
||
' Add bookmarks to URLs | ||
oSVR.AddURLBookmark "Parent URL Bookmark", 1, "http:'www.activepdf.com" | ||
oSVR.AddURLBookmark "Child URL Bookmark", 0, _ | ||
"https:'www.activepdf.com/products/server" | ||
|
||
' Add bookmarks pointing to pages in external PDF | ||
' Both Local and UNC file paths are accepted | ||
oSVR.AddLinkedPDFBookmark "Parent PDF Bookmark", 1, _ | ||
strPath & "Server.Sample.pdf", 1, "Fit" | ||
oSVR.AddLinkedPDFBookmark "Child PDF Bookmark", 0, _ | ||
strPath & "Server.Sample.pdf", 2, "Fit" | ||
|
||
' Add bookmarks pointing to any external file | ||
' Both Local and UNC file paths are accepted | ||
oSVR.AddFileBookmark "Parent File Bookmark", 1, _ | ||
strPath & "Server.PowerPoint.Input.pptx" | ||
oSVR.AddFileBookmark "Child File Bookmark", 0, _ | ||
strPath & "Server.Word.Input.doc" | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.AddBookmarks.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Add PDF marks to be used in the converted PDF | ||
' PDF Mark Reference: | ||
' http:'www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmark_reference.pdf | ||
|
||
' Notes (Page 20 - PDF Marks Reference) | ||
oSVR.AddPDFMark "[ /SrcPg 1 /Rect [32 32 216 144] /Open false /Title (ActivePDF Comment) /Contents (Note Type Comment Example.) /Color [1 0 0] /Subtype /Text /ANN pdfmark" | ||
|
||
' Free Text (Page 17 - PDF Marks Reference) | ||
' Used for the text in the link created below | ||
oSVR.AddPDFMark "[ /SrcPg 1 /Rect [262 26 350 46] /Contents (ActivePDF.com) /DA ([0 0 1] rg /Helv 12 Tf) /BS << /W 0 >> /Q 1 /Subtype /FreeText /ANN pdfmark" | ||
|
||
' Links (Page - PDF Marks Reference) | ||
' Add a link around the activePDF.com text created above | ||
oSVR.AddPDFMark "[ /SrcPg 1 /Rect [262 26 350 46] /Contents (ActivePDF.com) /BS << /W 0 >> /Action << /Subtype /URI /URI (http:'ActivePDF.com) >> /Subtype /Link /ANN pdfmark" | ||
|
||
' Bookmarks (Page 26 - PDF Marks Reference) | ||
oSVR.AddPDFMark "[ /Count -5 /Title (ActivePDF Server - AddPDFMark) /Page 1 /F 2 /OUT pdfmark" | ||
oSVR.AddPDFMark "[ /Page 1 /View [/Fit] /Title (AddPDFMark - Page 1) /C [0 0 0] /F 2 /OUT pdfmark" | ||
oSVR.AddPDFMark "[ /Page 2 /View [/Fit] /Title (AddPDFMark - Page 2) /C [0 0 0] /F 2 /OUT pdfmark" | ||
|
||
' Document Information (Page 28 - PDF Marks Reference) | ||
oSVR.AddPDFMark "[ /Title (PDF Marks) /Author (ActivePDF Server) /Subject (PDF Marks) /Keywords (pdfmark, server, example) /DOCINFO pdfmark" | ||
|
||
' Document View Options (Page 29 - PDF Marks Reference) | ||
oSVR.AddPDFMark "[ /PageMode /UseOutlines /Page 1 /View [/Fit] /DOCVIEW pdfmark" | ||
|
||
' Document Open Options | ||
oSVR.AddPDFMark "[ {Catalog} << /ViewerPreferences << /HideToolbar true /HideMenubar true >> >> /PUT pdfmark" | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.AddPDFMark.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Create a stamp collection for the image stamp | ||
oSVR.AddStampCollection "IMGimage" | ||
|
||
' Add an image stamp to the lower right corner of each page. | ||
oSVR.AddStampImage strPath & "Server.ImageInput.jpg", 508.0, 50.0, 64.0, 64.0, True | ||
|
||
' Set whether the stamp collection(s) appears in the background or | ||
' foreground | ||
oSVR.StampBackground = 0 | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.AddStampImage.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Stamp Images and Text onto the output PDF | ||
oSVR.AddStampCollection "TXTinternal" | ||
oSVR.StampFont = "Helvetica" | ||
oSVR.StampFontSize = 108 | ||
oSVR.StampFontTransparency = 0.3 | ||
oSVR.StampRotation = 45.0 | ||
|
||
oSVR.StampFillMode = 2 | ||
oSVR.SetStampColor 255, 0, 0, 0 | ||
oSVR.SetStampStrokeColor 100, 0, 0, 0 | ||
|
||
oSVR.AddStampText 116.0, 156.0, "Internal Only" | ||
|
||
' Set whether the stamp collection(s) appears in the background or | ||
' foreground | ||
oSVR.StampBackground = 0 | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.AddStampText.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Specify the PDF version for the created PDF | ||
oSVR.CompatibilityLevel = 0 | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.CompatibilityLevel.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Specify the PDF version for the created PDF | ||
oSVR.LinearizePDF = True | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.LinearizePDF.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' Add an email | ||
oSVR.AddEMail | ||
|
||
' Set server information | ||
' UPDATE THIS LINE WITH YOUR SERRVER INFORMATION | ||
oSVR.SetSMTPInfo "#.#.#.#", 0 | ||
oSVR.SetSMTPCredentials "john.doe", "activePDF", "asdfasdf" | ||
|
||
' Set email addresses | ||
oSVR.SetSenderInfo "John Doe", "john.doe@asdidlwenra.com" | ||
oSVR.SetReplyToInfo "John Doe", "john.doe@asdidlwenra.com" | ||
oSVR.SetRecipientInfo "Jane Doe", "jane.doe@asdidlwenra.com" | ||
oSVR.AddToCC "Jim Doe", "jim.doe@asdidlwenra.com" | ||
oSVR.AddToBcc "Janice Doe", "janice.doe@asdidlwenra.com" | ||
|
||
' Subject and Body | ||
oSVR.EMailSubject = "PDF Delivery from activePDF" | ||
oSVR.SetEMailBody "<html><body style='background-color: #EEE; padding: 4px;'>Here is your PDF!</body></html>", True | ||
|
||
' Attachments - Binary attachments can be added with | ||
' AddEMailBinaryAttachment | ||
oSVR.AddEMailAttachment strPath & "Server.Input.ps" | ||
|
||
' Other email options | ||
oSVR.EMailReadReceipt = False | ||
oSVR.EMailAttachOutput = True | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.SendEmail.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Dim FSO, strPath, results | ||
|
||
' Get current path | ||
Set FSO = CreateObject("Scripting.FileSystemObject") | ||
strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" | ||
Set FSO = Nothing | ||
|
||
' Instantiate Object | ||
Set oSVR = CreateObject("APServer.Object") | ||
|
||
' View settings for how the PDF shows in a PDF reader | ||
oSVR.SetViewMode 3, 1, "Fit" | ||
|
||
' Convert the PostScript file into PDF | ||
Set result = oSVR.ConvertPSToPDF( _ | ||
strPath & "Server.Input.ps", _ | ||
strPath & "Server.SetViewMode.pdf") | ||
|
||
' Output conversion result | ||
WriteResult result | ||
|
||
' Process Complete | ||
Wscript.Quit | ||
|
||
Sub WriteResult(oResult) | ||
message = "Result Status: " & result.ServerStatus | ||
If result.ServerStatus = 0 Then | ||
message = message & ", Success!" | ||
Else | ||
message = message &", " & result.Details | ||
End If | ||
Wscript.Echo message | ||
End Sub |
Oops, something went wrong.