Quantcast
Channel: Adobe Community : Discussion List - Acrobat SDK
Viewing all 2791 articles
Browse latest View live

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?


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

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

Calling AVPageViewGoTo from another thread

$
0
0

Hello,

 

I would like to synchronize external events (from a WebSocket) and the advancement of my presentation in Acrobat.

I'd like to use the AVPageViewGoTo function when I get an event from this WebSocket.

Therefore, I created a C++ class  handling my WebSocket connection. In this class, I have a method binding the WebSocket's events to a function passed as a parameter.

 

In my plugin, I have a function ("GoToPage") which looks like this:

void GoToPage(int pageNumber)

{

AVPageView page = AVDocGetPageView(AVAppGetActiveDoc());

AVPageViewGoTo(page,pageNumber - 1);

}

I pass it as a parameter (as a std::function<void(int)>) to my WebSocket client.

 

My problem is that whenever the "AVPageViewGoTo(page,pageNumber - 1);" line is called from the client, my plugin crashes and I have an access read violation (even if page is not null).

 

I guess that this problem is due to the fact that I try to call a function of Adobe Acrobat's API outside the main thread (as explained here https://forums.adobe.com/thread/1432181). Is this correct?

 

If that is the case, can I create a handler as explained in the documentation to achieve my initial goal? And if so, may I get a bit more information on the topic?

 

Thanks in advance for your answers.

PDF to HTML Conversion with Interapplication Communication Api in Mac OS

$
0
0

I'm trying to convert a PDF file via the Interapplication Communication API of Adobe Acrobat using Adobe Acrobat Pro DC 2017.009.20058 Trial Version.

My script doesn't appear to be converting my file from PDF to HTML.  It works for some formats (e.g. plain-text), but not for others (e.g. spreadsheet, xlsx).  Perhaps it is because I'm using the trial version?   Here is my AppleScript code:

 

 

setmyfileto "/PATH/pdf_schedule.pdf"

setoutfileto ("PATH:pdf_schedule.html" astext)

 

tellapplication "Adobe Acrobat"

  -- get every conversion

  activate

  openmyfile

  savedocument 1 tofileoutfileusingconversion "com.adobe.acrobat.html"

  closedocument 1

endtell

 

 

And `get every conversion` returns this (with html highlighted in blue):

 

{EPS Conversion "com.adobe.acrobat.eps" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.xlsx" ofapplication"Adobe Acrobat",conversion "com.adobe.acrobat.html" of application "Adobe Acrobat", conversion "com.adobe.acrobat.jpeg" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.jp2k" ofapplication "Adobe Acrobat", conversion"com.callas.preflight.pdfa" ofapplication "Adobe Acrobat", conversion "com.callas.preflight.pdfe" ofapplication "Adobe Acrobat", conversion "com.callas.preflight.pdfx" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.png" ofapplication "Adobe Acrobat", PostScript Conversion "com.adobe.acrobat.ps" ofapplication "Adobe Acrobat", conversion"com.adobe.acrobat.pptx" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.rtf" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.accesstext" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.plain-text" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.tiff" ofapplication "Adobe Acrobat", conversion"com.adobe.acrobat.doc" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.docx" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.xml-1-00" ofapplication "Adobe Acrobat", conversion"com.adobe.acrobat.spreadsheet" ofapplication "Adobe Acrobat"}

C#: convert a PDF file to a text file using Acrobat

$
0
0

I am writing a C# application that needs to use Adobe Acrobat DC to open a PDF file and save it as a text file, using Acrobat's file conversion. How do I do this? Can anybody show me some sample code using the SDK? I have already looked through the sample code provided with the SDK but I don't see anything that helps me convert a PDF file to a .txt file.


How to convert tables and

$
0
0

We need to get specific data from tables from PDF-files, is there any way to convert all tables in the copiable PDF-files to processable and formated tables(doc/xls/etc.) by patch ways.

Many Thanks! !

Send and track for Outlook stopped working?

$
0
0

2015-07-03 Send and track for Outlook worked perfect. Today (same environment, no changes made by me or system administrator) I just get a message (in Swedish) "This Adobe ID can not be found. Open Acrobat and log in with your Adobe ID". Wich I did. Several times. Also closed Outlook inbetween and so on. Sad that this excellent service from within Outlook (that MS failed to offer, despite all kind of "professional" Sharepoint services) stopped working so soon. Is there anything I can do to restore the function?

Is there APIs available in Acrobat for extracting text from images using C#

$
0
0

Is there APIs available in Acrobat for extracting text from images using  C#

Acrobat Javascript Interface, add Image, save as PDF/X1a

$
0
0

I need to be able to add and place one or more TIF images into a page in a PDF and save it as PDF/X1a.  I am using Acrobat DC and the JavaScript interface right now.

 

I have tried successfully creating a Button field where the image should go, and then use importIcon() to import the image, and buttonSetIcon() to insert it into the field.  But, I don't want a button field in the PDF.

 

I have also successfully tried using addWatermarkFromFile which works great with one problem: The image has a transparency property and because of that I can't export to PDF/X1a.

 

Any help is appreciated.

C# Encrypt existing PDF using a Certificate

$
0
0

Hi all,

 

I am creating a component for a server based application where we take an existing PDF and want to apply encryption.

 

The certificate used to apply the encryption can be identified but I need help which Adobe component to be used best and which calls to be used best in a C# .NET 4.0 server application.

 

All users have Adobe Acrobat Standard installed on their machines.

 

Thanks

Daniel

How to apply digital signature in abdobe acrobat using RSA Algorithm?

$
0
0

I want to apply digital signature in  a PDF with abdobe acrobat using RSA Algorithm. I need to verify the signature in it by a public key pair of the private key with which signature was set   in c# to the PDF.

Application crash when using ActiveX control (C++ and C#/.net projects)

$
0
0

I've been debugging a crash in an application which appears to stem from the Acrobat Reader ActiveX components, when Acrobat Reader DC 2017 is installed on the computer. The application is a native Windows application written in C++, but I cannot easily create a sample project for it (inherited code base, not my forte), but I'm getting the same error (Structured Exception) from a simple test/repro project made in C#.

 

In this specific crash instance, it appears that the key step is performing any key press operation, within the control, after loading a document. This brings up the special tools in the right-hand side of the viewer's control area.

 

The sample C# repro project can be downloaded here: Dropbox - AcrobatReaderCrash.zip , and the steps to reproduce from it are as follows:

 

  1. Start the application, with or without debugging enabled
  2. Click on either of the "Load" buttons, at least once, up to however many you'd like
  3. Click within the viewer
  4. Press the "Esc" key
  5. Click the load buttons again, if you'd like. This part doesn't make a different
  6. Click the "Exit" button (or "X" in the Windows bar, Alt+F4, System menu + "Close", etc)
  7. Exception is raised and application crashes.

 

To the best of my diagnosing abilities, but don't take my word as the final authority on it, what appears to be happening is that a component created or referenced within the ActiveX control is getting double-freed, thus causing the "NullReferenceException" in the .net code, and the "ACCESS_VIOLATION" SEH from "native" code.

 

Is there any call which should be made prior to closing or disposing of the control? Or perhaps some property that can be set to prevent the command bar from being displayed (it can also be activated by clicking the "Acrobat" triangle logo which appears in the floating bar with page numbers, etc, in the viewer).


PDEElementGetBBox returns different value

$
0
0

Hi.


I have developed a plugin which delete the text element from PDF.
In some cases, the value obtained from PDEElementGetBBox return the different value from two text element

at same position within PDDoc objects(objectA and objectB).

 

objectA makes from objectB.

 

     const PDDoc objectA = PDDocCreate();
     PDDocCreatePage( objectA, PDBeforeFirstPage, srcrect );
     PDDocReplacePages( objectA, 0, objectB, pagenum, 1, false, NULL, NULL, NULL, NULL );

 

I Used PDEElementGetBBox to same position text element within objectA and objectB.
but return value(textBBox.left and textBBox.right) is different.

 

can you tell me reason about this case happened.

Acrobat SDK Export with CCITT

$
0
0

I have created an Acrobat Plugin using Visual Studio 2013 and C++.

 

In that plugin, I am doing the following:

  1. Create a new PDF document
  2. Use AVConversionConvertToPDF and PDEElementCopy to create a PDEImage ( I repeat for 2 images: a 1-bit monochrome TIF and an 8-bit grayscale TIF)
  3. Use PDEContentAddElem to add the images to a new document.
  4. Save document

 

The saved document has the 2 images with the proper values (bit depth, dimensions), except for 'Filters'.  The 1-bit monochrome image shows JBIG2 as a filter, but I want to use CCITT.

 

Can I change the compression for a PDEImage element before I save the PDF file?

 

Note: I am not using PDEImageCreate because AVConversionConvertToPDF handles all types of image formats already.  The resulting PDF file is fine, except for the image's compression.

Need VB.Net help with detecting vertical text

$
0
0

I have a process that detects rotated pages and sets their orientation to 0 but I also need to detect vertical text on a page and act on that. In the test files I an using the page has not been rotated but the text (rasterized) is vertical. Using the Acrobat 11.0 object model through VB.NET, how can I achieve that? The following code does handle where the page has been rotated but does not detect the vertical text. Any help is appreciated.

 

    Private Sub cmdConvert_Click(sender As Object, e As EventArgs) Handles cmdConvert.Click

 

        Dim AcroXApp As Acrobat.AcroApp

        Dim AcroXAVDoc As Acrobat.AcroAVDoc

        Dim AcroXPDPage As Acrobat.AcroPDPage

        Dim AcroXPDDoc As Acrobat.AcroPDDoc

        Dim JSO As Object

 

        AcroXApp = CreateObject("AcroExch.App")

        AcroXApp.Hide()

        AcroXAVDoc = CreateObject("AcroExch.AVDoc")

        AcroXAVDoc.Open(txtTargetFile.Text, "")

        AcroXPDDoc = AcroXAVDoc.GetPDDoc

        JSO = AcroXPDDoc.GetJSObject

 

        Dim iPageCount = AcroXPDDoc.GetNumPages

 

        For i = 0 To iPageCount - 1

            Dim rotation = JSO.getPageRotation(i)

            Select Case rotation

                Case 90

                    AcroXPDPage = AcroXPDDoc.AcquirePage(i)

                    Debug.Print("Page " & i & " was set at " & rotation & " degree rotation")

                    AcroXPDPage.SetRotate(0)

                Case 180

                    AcroXPDPage = AcroXPDDoc.AcquirePage(i)

                    Debug.Print("Page " & i & " was set at " & rotation & " degree rotation")

                    AcroXPDPage.SetRotate(0)

                Case 270

                    AcroXPDPage = AcroXPDDoc.AcquirePage(i)

                    Debug.Print("Page " & i & " was set at " & rotation & " degree rotation")

                    AcroXPDPage.SetRotate(0)

            End Select

        Next

 

        Dim strOutFileName As String = Replace(txtTargetFile.Text, ".pdf", "_Rotated.pdf")

 

        JSO.SaveAs(strOutFileName)

        AcroXAVDoc.Close(False)

        AcroXApp.Exit()

        AcroXApp = Nothing

        AcroXAVDoc = Nothing

        AcroXPDDoc = Nothing

        JSO = Nothing

 

    End Sub

Is it possible to catch mouse click events?

$
0
0

Hello, I am tasked with looking for several professional libraries needed for product development in my company.

One of our planned product's core features requires click event handling within a PDF file, or the ability the detect bookmark/hyperlink click events. I can't seem to find any help about this specific issue, does anyone know if it's possible? And if it is, can it be done with natively with C#? Does it require a complicated workaround or JS event handling?

 

Thanks,

DK

Can javascript function "importTextData()" work in adobe reader?

$
0
0

I have created a javascript for loading some data into a text field from txt file. It can work in acrobat, but it does not work in adobe reader, can anybody take a look for me?  Thanks.

 

I create a folder level javascript file:
//**************
console.println("getID() initialize");

trustedgetID=app.trustedFunction(function getID()
{
app.beginPriv();    // Explicitly raise privilege
this.importTextData("testID.txt", 0)
app.endPriv();

})
//*****************

Then, I attach the following JS command to a button click event in pdf:
//************
trustedgetID();
//************

In acrobat, when I click the button, it load the data from testID.txt into the field in pdf, based on the column name. But, nothing happen when I do the same in adobe reader.

When I look into the SDK document, it seems that the importTextData() can work also in acrobat reader. Is there any other setting that I need to take care in adobe reader for runing such a script?

Viewing all 2791 articles
Browse latest View live


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