Quantcast
Channel: Adobe Community : All Content - Acrobat SDK
Viewing all 2571 articles
Browse latest View live
↧

Start a saved action from vba

$
0
0

Is there anyway to start a saved "Action" in Acrobat Xi from VBA?

 

In acrobat 9.0  I was able to create a batch process and using send keys (not really happy using sendkeys, but it was the only way I could get this to work),  to kick off a Batch Process.

 

I can't seem to recreate this in Acrobat 10 and up.  Send keys no longer works as the Tools have no hot keys.

 

Can I use the SDK to call a previously saved action?

↧

Highlight a field in focus

$
0
0

I am creating an editable form. I have set highlight editable fields.

I find that the field in focus is not highlighted. For e.g., my form has radio buttons. Both the options of my radio button pair are highlighted as expected however when focus enters the first option, the option becomes transparent (with the focus around that radio button) and the other option remains highlighted.

 

Is it possible to keep the field highlighted even when it is in focus?

↧
↧

I need a Api or script which can compare a PDF file with another 10 Lac PDF file and provide the matching in percentage.

$
0
0

We need a Api or script which can compare pdf with another thousands of pdf files?

↧

Acrobat Pro DC automated TOC

$
0
0

I am trying to create Acrobat pro DC PDF's with automated table of contents. I need to create reports of project files, each sub-folder needs a table of contents that links to the individual files. Is there a way to automate this process?

 

Also, is there a way to have the pdfs I combine update when the source file changes? I can get Word to do this, but cannot figure out how to get acrobat to do the same or even import the linked files from word.

 

Thanks in advance for any insight!

↧

I need to download adobe 8 standard

$
0
0

Where can I download adobe 8 standard?

↧
↧

Does Acrobat Reader DC support plugins?

$
0
0

Does Acrobat Reader DC support plugins?

↧

Adobe sdk 9

$
0
0

Plase share link for Adobe SDK 9.

↧

Plugin created with Adobe SDK 10 not working with Adobe Pro 9

$
0
0

Adobe Plugin created with Adobe SDK 10 and its working with Adobe professional 10 , its not working in Adobe professional 9.

↧

Accessing a PDF file through VBA

$
0
0

0down votefavorite

 

 

I was reading from a forum thread: https://forums.adobe.com/thread/604177 and started experimenting with it.
But I think the function didn't load at all. I wasn't sure what might the reason be behind it -
I reckon it has to be simple and probably related to the library.
Can someone help point out why the following code failed to compile at all?
(the code appeared not to have ran upon execution in immediate as none of the breakpoints triggered)

The libraries I have loaded include

  • Acrobat Distiller
  • Adobe Acrobat 10.0 Type Library
  • Acrobat Scan 1.0 Type Library

The computer which this code is executed on have Acrobat Professional installed on it.

PublicFunction GetPDF()'(FilePath As String) As Object
Dim origPdf As Acrobat.AcroPDDoc
Dim path1 AsString
MsgBox
("Start") 

path1
= Application.ActiveWorkbook.Path
path1
= path1 &"/31700100" 

Set
origPdf = CreateObject("AcroExch.PDDoc") 

If
origPdf.Open(path1)Then
MsgBox
("weee")
EndIf 

origPdf
.Close
Set origPdf =Nothing
EndFunction
↧
↧

Can you save an empty page by creating a PDDoc object from scratch?

$
0
0

I am using VBA as a platform to do some PDF manipulation. The issue I am having is that I cannot seem to get the PDF object to save if the PDF object have not been opened. Below is a snippet of the code that inserts pages to the PDF object, and then saves the pdf object. In terms of the code, I have determined that it works since I have tested the save method with the same input with another pdf object and it worked just fine. Can someone help by explaining why it doesn't allow me to save the object?

Thanks!

Dim NewPDF AsNew Acrobat.AcroPDDoc 
Set NewPDF = CreateObject("AcroExch.PDDoc")
If NewPDF.InsertPages(j, OriPDF, j,1,0)Then MsgBox "Success"
If NewPDF.Save(PDSaveLinearized, WritePath &"\"& sh.Cells(StartRow + j -1, i).Value &".pdf")Then MsgBox "Success"
NewPDF
.Close
Set NewPDF =Nothing

When the above code was ran, neither of the success lines worked as expected.

↧

I am using Acrobat DC SDK not able to set the document title by using AVWindowSetTitle(window, text); in dc is there any way to set the document title programatically in DC ?

$
0
0

i am trying to set the title for the dc window by using the following code in c++.

 

void PDFUtils::SetDCWindowTitle(const CString& title)

{

ASTextHolder text(title);

AVDoc doc=AVAppGetActiveDoc();

if(doc!=NULL)

{

PDDoc pdDoc = PDFUtils::GetPDDoc(doc);

PDDocSetInfoAsASText(pdDoc,ASTextHolder("Title"),text);

AVWindow window = AVDocGetAVWindow(doc);

AVWindowSetTitle(window, text); // not working for now for DC version

}

}

 

but it's not working for DC, where as it is working fine for adobe 11.

i need to set the title for the window in DC . Please help for this.

 

Message was edited by: Jyothi Potti

↧

Is there a way to read invalid digital signatures in a PDF file using VBA code?

$
0
0

I'm trying to verify existence of digital signatures (validated or not) in a PDF file using VBA code.  Thanks to thread 2214538, I have code to do that.  I have two issues.

1) I have to wrapper the call to "jso.getField(f).SignatureInfo.Name" if the signature field is blank otherwise VBA throws error 438 - "...doesn't support property"

    While I have a solution to this issue, I'm just curious to why this happens.  I assume because there is no signature object?

2) I have a PDF file where I can visually see the digital signatures but my code reports the fields as blank. I do notice that they are not validated in Acrobat Pro (no blue bar across the top).

    Is there a way to read invalid digital signatures in a PDF file using VBA code?

↧

Digital signature value /Contents attribute

$
0
0

Hello,

 

 

I am currently working on adobe pdf digital signature. I used the DLI sample contained in Adobe PDF library.

During signature calculation, encryptBuffer function (which encrypts the document hash using private key) returns

a 256 characters long hex value which is supposed to be written in /Contents dictionary item under digital signature value object.

But when I inspect the value written inside /Contents in pdf document, it is 262 character long instead of 256. There are 6 additional

hex characters at the start. Can you please explain what do they represent? I have gone through all the documentation available but

couldn't find the answer. DLI doesn't suite us. We are trying to implement signature support by writing signature objects directly in pdf file without using

any Adobe API's. For that purpose we need clarification on those additional 6 characters written in /Contents. Your immediate response will be highly appreciated.

↧
↧

PDDoc.save bug? Or am I doing something wrong?

$
0
0

So, I have this file with 20 something pages in it. I wrote some code to split the files into different individual files based on a bunch of file names I have put in an excel spreadsheet (like page 1 is called file XXX and page 2 is called file YYY). It worked great for a good number of the files I have, but apparently, it did not work for all files. What troubles me is that, I have the following two lines in the code. which writes to the immediate console based on the save operation, and all of these operations showed as successful. Not all the files show up in file explorer (windows) after the save. Is this a bug within the PDDoc.save function? Or is there something I missed that is causing this?

 

If NewPDF.Save(PDSaveLinearized, WritePath & sh.Cells(StartRow + j - 1, i).Value & ".pdf") Then

    Debug.Print sh.Cells(StartRow + j - 1, i).Value & " Success"

Else

    Debug.Print sh.Cells(StartRow + j - 1, i).Value & " Failed"

End If

 

I initially thought, maybe it is a blank file and the insert prior to the save statement didn't work. But I checked and getpagenum is 1 during the execution of this line, so that does not appear to be cause. With my limited knowledge, I wasn't sure what the issue may be so I thought, maybe I should just ask.

 

Thanks!

↧

VBA or JavaScript to perform a text search 2,000+ times

$
0
0

Hi experts,

 

I need to search several PDFs containing a total of 40,000 pages for 2,000 account numbers.

 

Can this be automated using VBA or JavaScript or other? 

 

Which do you recommend and why? 

 

Thank you,

Peter

↧

remove all hyperlinks in a PDF by using VBA

$
0
0

HI,

 

I want to remove all hyperlinks in a PDF by using VBA. I am new in adobe vba. Your help is much appreciated. Thanks in Advance.

↧

Exception being thrown in the AcroPDF.dll thread when trying to display PDF from within our application.

$
0
0

We develop an MFC application that allows users to view PDFs from within it. We do this by creating an MFC modal window in the application, then hosting an instance of one of our objects that subclasses the Microsoft CHtmlView class. To display the PDF, we get path to the file and call the inherited "CHtmlView::Navigate2()" method.

 

There has been no issue with this until recently, where some users are seeing the entire application crash occasionally when trying to view a PDF.

NOTE: Adobe Reader XI (11.20.17) is installed.

 

I had the user create a dump file using debug diagnostics, and it looks like there is an exception being thrown in an AcroPDF.dll thread, due to a call in the MakeAccessible.api plugin having a read access violation at a very low memory location:

 

Unhandled exception at 0x5F126E1D (MakeAccessible.api) in dump_file_name_removed.dmp: 0xC0000005: Access violation reading location 0x00000018.

 

If there is a handler for this exception, the program may be safely continued.

 

And the call stack exhibits symptoms like the heap might be corrupted, because we're seeing calls to some of our methods within the AcroPDF.dll thread. (Methods that we defined, but we ourselves never call into)

Call stack looks like this:

 

  MakeAccessible.api!5f126e1d() Unknown

  [Frames below may be incorrect and/or missing, no symbols loaded for MakeAccessible.api]

  MakeAccessible.api!5f0ff41e() Unknown

  OUR METHOD WHICH IS NEVER CALLED Line 1194 C++

  MakeAccessible.api!5f0ef20c() Unknown

  MakeAccessible.api!5f0efabb() Unknown

  MakeAccessible.api!5f0dfe84() Unknown

  PDDom.api!6252cd21() Unknown

  PDDom.api!6254654e() Unknown

  PDDom.api!62546584() Unknown

  PDDom.api!62546aa2() Unknown

  PDDom.api!62546ad4() Unknown

  PDDom.api!62546b62() Unknown

  PDDom.api!6254645d() Unknown

  AcroRd32.dll!5d0b93e2() Unknown

  AcroRd32.dll!5d0fa846() Unknown

  uiautomationcore.dll!HookBasedServerConnectionManager::HookCallback(void *,unsigned long,void * *,unsigned long *,void * *) Unknown

  user32.dll!_NtUserKillTimer@8 () Unknown

  AcroRd32.dll!5db0d38f() Unknown

  AcroRd32.dll!5d0fa573() Unknown

  AcroRd32.dll!5d08eddc() Unknown

  user32.dll!_InternalCallWinProc@20 () Unknown

  user32.dll!_UserCallWinProcCheckWow@32 () Unknown

  user32.dll!_DispatchMessageWorker@8 () Unknown

  user32.dll!_DispatchMessageW@4 () Unknown

  AcroRd32.dll!5d0f8e14() Unknown

  AcroRd32.dll!5d0f8c68() Unknown

  AcroRd32.dll!5d0853fb() Unknown

  AcroRd32.dll!5d0855a6() Unknown

  AcroPDF.dll!0b8bad43() Unknown

  OUR METHOD Line 498 C++

  ntdll.dll!_ZwTestAlert@0 () Unknown

  ntdll.dll!_ZwContinue@8 () Unknown

  ntdll.dll!_LdrInitializeThunk@8 () Unknown

 

I've tried tracking down anything in the logic around displaying PDFs that might point to bad memory management and might cause heap corruption and I couldn't find anything.

 

Furthermore, I was later informed that this doesn't only happen when trying to view PDFs within our client, but also happens occasionally when trying view a PDF within Adobe reader independently.

Which leads me to believe there might be an issue with one of the adobe libraries.

 

Additionally, the user uninstalled reader and has been testing it for about a month now with a third party PDF viewer and hasn't seen a crash when trying to view PDFs yet.

 

Lastly, there are a couple other users who have Adober Reader DC installed (Win 7 and Win 10) who can view the first PDF successfully, but see the client crash after closing it and trying to view a 2nd one. In the dump file, they are also getting an Access violation at a very low memory location, but this time it's in the AcroPDFImpl.dll thread.  (Coincidentally it works fine for them in Adobe Reader XI  )

 

Unfortunately, I have not been able to create any of these issues locally with Adobe Reader XI installed, or on a VM where I have Adobe Reader DC installed . So I'm hoping someone here might have some more insight?

↧
↧

How to set Acrobat App Properties using C#

$
0
0

Hello all,

 

I want to make sure the fields of a PDF are highlighted.  I looked online, and found the JavaScript to do this (I want to do it programmatically) is "app.runtimeHighlight = true".

 

My C# code opens a PDF form, and makes it open for the user to edit in a WInForms panel.  THroughout the code, I've been using InvokeMethod to call various methods (such as getField()).

 

object jsObj = pdDoc.GetJSObject();

               

Type T = jsObj.GetType();

object jsReturn = T.InvokeMember("app", BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance, null, jsObj, null);

 

Type T2 = jsReturn.GetType();

object[] param = { "true" };

object jsReturn2 = T.InvokeMember("runtimeHighlight", BindingFlags.SetProperty | BindingFlags.Public | BindingFlags.Instance, null, jsReturn, param);

 

How can I mimic the "app.runtimeHighlight = true" syntax through the C# Acrobat SDK?

 

I'm using the Adobe Acrobat 10.0 Type Library.  "pdDoc" is a CAcroPDDoc object.

↧

Adding digital signature to pdf using vba

$
0
0

Hello All,

 

I'm a newbie.  I wish to write code to add a digital signature to a existing pdf using vba.  This is what i have so far but it is not working as intented.  The code will open the pdf, add a signature box, save it, close it.  However i does not sign the pdf.

The code excute fine until it gets to the line, oSign.signatureSign....

It seems that the signatureInfo object is causing the error.

 

How do i create a signatureInfo object from vba and pass it to JS?  Any help is appreciated.

 

 

Public Sub test()
On Error GoTo Err_Handler
    Dim pdfPDDoc As New AcroPDDoc, oJS As Object, oSign As Object, oPpklite As Object, oFields As Object
    Dim strFName As String, strSignFName As String
    Dim oSignInfo As Object, strSecInfo As String
    Dim oParam As Parameter
   
    strSignFName = "C:\Documents and Settings\638423\Ncts\AdobeSignature\testing.pfx"
           
    strFName = "C:\main.pdf"
   
    If pdfPDDoc.Open(strFName) Then
        Set oJS = pdfPDDoc.GetJSObject
       
        Set oFields = oJS.AddField("SignatureField", "signature", 0, Array(50, 750, 300, 700)) 'array(uplf, lwlf, lwrt, uprt)
        Set oSign = oJS.getField("SignatureField")
       
        Set oPpklite = oJS.Security.getHandler("Adobe.PPKLite", True)
        oPpklite.login "{'xxyy', '" & strSignFName & "'}"

        oSign.signatureSign oPpklite, "{password:xxyy, mdp: allowNone}", "C:\MainSigned.pdf", True
       
        pdfPDDoc.Save 1, strFName
        oPpklite.logout
    End If   
  
Exit_Proc:
    Exit Sub
       
Err_Handler:
   
    MsgBox "In test" & vbCrLf & Err.Number & "--" & Err.Description
   
    Resume Exit_Proc
End Sub

↧

adobe acrobat dc crashes on close

$
0
0

In a very simple Delphi program that holds an instance of TAcroPDF, if I set the .src property to a file, all is well and the pdf displays in my application.

 

However if I call any procedure on the ActiveX control (I've tried LoadFile, Print, PrintWithDialog, GotoNextPage, GotoPreviousPage) then the application crashes after closing. This even happens if I call a procedure without loading a file. And calling Free() on the ActiveX control also throws an exception

 

The program code hasn't changed. The only difference is installing Adobe Reader DC ActiveX (version X and XI worked fine for years). I have tested this on another computer to confirm. As soon as Adobe Reader DC is installed, the problem starts.

 

The error is:

Exception EAccessViolation in module xxx.exe at 51F04CE6.

Access violation at address 51F05CE6. Read of address 51F05CE6.

 

Code below:

 

 

unit Unit1;

 

 

interface

 

 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, StdCtrls, OleCtrlsAdobe, AcroPDFLib_TLB;

 

 

type

  TForm1 = class(TForm)

    AcroPDF1: TAcroPDF;

    btnLoadFile: TButton;

    btnPrint: TButton;

    btnPrintDialog: TButton;

    btnNext: TButton;

    btnPrev: TButton;

    btnSetSrc: TButton;

    btnExit: TButton;

    procedure btnLoadFileClick(Sender: TObject);

    procedure btnPrintClick(Sender: TObject);

    procedure btnPrintDialogClick(Sender: TObject);

    procedure btnNextClick(Sender: TObject);

    procedure btnPrevClick(Sender: TObject);

    procedure btnSetSrcClick(Sender: TObject);

    procedure btnExitClick(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

 

var

  Form1: TForm1;

 

 

implementation

 

 

{$R *.dfm}

 

 

procedure TForm1.btnLoadFileClick(Sender: TObject);

begin

   AcroPDF1.LoadFile('<filename goes here>'); // exception on close

   AcroPDF1.Setfocus;

end;

 

 

procedure TForm1.btnPrintClick(Sender: TObject);

begin

   AcroPDF1.Print; // exception on close

end;

 

 

procedure TForm1.btnPrintDialogClick(Sender: TObject);

begin

   AcroPDF1.PrintWithDialog; // exception on close

end;

 

 

procedure TForm1.btnNextClick(Sender: TObject);

begin

   AcroPDF1.gotoNextPage; // exception on close

end;

 

 

procedure TForm1.btnPrevClick(Sender: TObject);

begin

   AcroPDF1.gotoPreviousPage; // exception on close

end;

 

 

procedure TForm1.btnSetSrcClick(Sender: TObject);

begin

   AcroPDF1.src := '<filename goes here>'; // no exception

   AcroPDF1.Setfocus;

end;

 

 

procedure TForm1.btnExitClick(Sender: TObject);

begin

   AcroPDF1.src := '';

   //FreeAndNil(AcroPDF1); // immediate exception

   //AcroPDF1.Free; // immediate exception

 

 

   Close;

end;

 

 

end.

 

 

/////////////////////////////////////////////////////////////

 

object Form1: TForm1

  Left = 0

  Top = 0

  Caption = 'Form1'

  ClientHeight = 300

  ClientWidth = 635

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'Tahoma'

  Font.Style = []

  OldCreateOrder = False

  DesignSize = (

    635

    300)

  PixelsPerInch = 96

  TextHeight = 13

  object AcroPDF1: TAcroPDF

    Left = 8

    Top = 100

    Width = 619

    Height = 192

    Anchors = [akLeft, akTop, akRight, akBottom]

    TabOrder = 6

    ControlData = {000C0000FA3F0000D8130000}

  end

  object btnLoadFile: TButton

    Left = 16

    Top = 8

    Width = 75

    Height = 25

    Caption = 'LoadFile'

    TabOrder = 0

    OnClick = btnLoadFileClick

  end

  object btnPrint: TButton

    Left = 16

    Top = 39

    Width = 75

    Height = 25

    Caption = 'Print'

    TabOrder = 2

    OnClick = btnPrintClick

  end

  object btnPrintDialog: TButton

    Left = 97

    Top = 39

    Width = 75

    Height = 25

    Caption = 'Print Dialog'

    TabOrder = 3

    OnClick = btnPrintDialogClick

  end

  object btnNext: TButton

    Left = 340

    Top = 32

    Width = 75

    Height = 25

    Caption = 'Next'

    TabOrder = 5

    OnClick = btnNextClick

  end

  object btnPrev: TButton

    Left = 259

    Top = 32

    Width = 75

    Height = 25

    Caption = 'Prev'

    TabOrder = 4

    OnClick = btnPrevClick

  end

  object btnSetSrc: TButton

    Left = 97

    Top = 8

    Width = 75

    Height = 25

    Caption = 'Set Src (Ok)'

    TabOrder = 1

    OnClick = btnSetSrcClick

  end

  object btnExit: TButton

    Left = 552

    Top = 8

    Width = 75

    Height = 25

    Caption = 'Exit'

    TabOrder = 7

    OnClick = btnExitClick

  end

end

↧
Viewing all 2571 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>