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

Populate pdf fields using vba

$
0
0

I'm trying to fill in an existing pdf file fields using access vba by the code below. "User Name:" is one field on my pdf. I'm trying to enter a value to this field. When I run this with an appropriate file path it gives me an error saying: Run-time error '424': Object required.  The adobe file version is Adobe Acrobat XI Pro.

 

 

Private Sub Adobefill_Click()

Dim FileNm, gApp, avDoc, pdDoc, jso

 

FileNm = "C:\projects\test\"

Set gApp = CreateObject("AcroExch.app")

 

Set avDoc = CreateObject("AcroExch.AVDoc")

If avDoc.Open(FileNm, "") Then

    Set pdDoc = avDoc.GetPDDoc()

    Set jso = pdDoc.GetJSObject

 

    jso.getfield("User Name:").Value = "Steve fredricks"      '<-------- I get an error here

    pdDoc.Save PDSaveIncremental, FileNm 'Save changes to the PDF document

    pdDoc.Close

End If

 

'Close the PDF; the True parameter prevents the Save As dialog from showing

  1. avDoc.Close (True)

 

'Some cleaning

Set gApp = Nothing

Set avDoc = Nothing

Set pdDoc = Nothing

Set jso = Nothing

End Sub


Convert fillable pdf to read only using vba

$
0
0

Hi I have a fillable pdf with information. I want to convert the fillable pdf to read only programmatically using vba. Is it possible to do so? If so can someone help me with the code?

Insert a certificate dynamically

$
0
0

After now paste the certificate now (static) works,

I should insert now dynamically as possible depending on a text.

How can I determine the position of a text or a graphic,

or what other way there is the positioning?

Highlight selection with IAC and AutoHotkey

$
0
0

Hi,

I would like to highlight a selected text in a certain colour via shortcut (that is to say, execute the command available in the context menu of a text selection programmatically (right click on selection > Highlight text)). I have used IAC with AutoHotkey before, but I am not sure which route to take... could somebody point me to an example for text annotation creation over a selected text?

Thank you in advance for your help and suggestions.

Can Plug-Ins be Created With Visual Studio 2017?

$
0
0

Is there any problem with using Visual Studio Professional 2017 to develop C++ plug-ins for Adobe Acrobat?

CreateWindow with AVWindowNewFromPlatformThing

$
0
0

I'm unsure where I have to call `AVWindowNewFromPlatformThing' and `AVWindowDestroy'.

Everything works fine until I exit Acrobat and get an alert box with `Adobe Acrobat DC has stopped working'.

I've tried to put the function calls everywhere without any success.

 

Problem signature:

  Problem Event Name: BEX

  Application Name: Acrobat.exe

  Application Version: 18.11.20055.27899

  Application Timestamp: 5b363d8a

  Fault Module Name: pluginname.api_unloaded

  Fault Module Version: 0.0.0.0

  Fault Module Timestamp: 5b5f717b

  Exception Offset: 708eda78

  Exception Code: c0000005

  Exception Data: 00000008

  OS Version: 6.1.7601.2.1.0.256.48

  Locale ID: 1031

  Additional Information 1: 8508

  Additional Information 2: 85082419dd18a94700c1143a806349b7

  Additional Information 3: a9e2

  Additional Information 4: a9e2f2cd020b33c1d41a5eff016d3fab

 

Where do I have to call `AVWindowNewFromPlatformThing' and `AVWindowDestroy' from and do I need to call `DestroyWindow' myself or not?

 

 

Code (with error handling removed):

 

AVWindow my_window;

 


LRESULT CALLBACK WindowCallback(HWND window_handle, UINT msg, WPARAM wParam, LPARAM lParam) {

  switch(msg) {

   case WM_CLOSE:

  DestroyWindow(window_handle);

   break;

   case WM_DESTROY:

  PostQuitMessage(0);

   break;

   default:

   return DefWindowProc(window_handle, msg, wParam, lParam);

  }


  return0;

}


void SpawnWindow(std::string title) {

  constchar window_class_name[] = "myWindowClass";


  WNDCLASSEX window_class;

  HWND window_handle;

  MSG window_message;


  if (GetClassInfoEx(gHINSTANCE, window_class_name, &window_class) == 0) {

  window_class.cbSize = sizeof(WNDCLASSEX);

  window_class.style = 0;

  window_class.lpfnWndProc = WindowCallback;

  window_class.cbClsExtra = 0;

  window_class.cbWndExtra = 0;

  window_class.hInstance = gHINSTANCE;

  window_class.hIcon = LoadIcon(NULL, IDI_APPLICATION);

  window_class.hCursor = LoadCursor(NULL, IDC_ARROW);

  window_class.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);

  window_class.lpszMenuName = NULL;

  window_class.lpszClassName = window_class_name;

  window_class.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

  }


  window_handle = CreateWindowEx(

  WS_EX_CLIENTEDGE, window_class_name,

  title.c_str(), WS_OVERLAPPEDWINDOW,

  CW_USEDEFAULT, CW_USEDEFAULT,

   400, 300, 0, 0,

  gHINSTANCE, NULL

  );


  my_window = AVWindowNewFromPlatformThing(NULL, NULL, NULL, gExtensionID, reinterpret_cast<AVPlatformWindowRef>(window_handle));

  ShowWindow(window_handle, SW_SHOWDEFAULT);

  UpdateWindow(window_handle);


  while(GetMessage(&window_message, NULL, 0, 0) > 0) {

  TranslateMessage(&window_message);

  DispatchMessage(&window_message);

  }


  AVWindowDestroy(my_window);

  UnregisterClass(window_class_name, gHINSTANCE);


  return;

}

Adobe SDK 9 or Adobe SDK 8

$
0
0

Dear support,

I need some help here.

I've been tried for find AdobeSDK 8 and 9, anyone have an Adobe SDK  9 and Adobe SDK 8?

 

Regards

custom tool appear in web browser

$
0
0

dear support I need some help here,

can we custom tool group to show in web browser?

 

regards


PDF version

$
0
0

How do I extract the PDF version of a PDF file using Visual Basic code?

how to rotate pdfs via a api

$
0
0

hello

 

we scan plans, about 300, i would rotate  all files in a folder via a vb.net program.

 

Sub Drehunng(inRichtung As String, inPDF As System.IO.FileInfo)

        Dim PDFout1 As New Acrobat.AcroPDDoc

        Dim Seite As Acrobat.AcroPDPage

        PDFout1.Open(inPDF.FullName)

        For i As Long = 0 To PDFout1.GetNumPages - 1

            Seite = PDFout1.AcquirePage(i)

            Select Case inRichtung

                Case "n"

                    Seite.SetRotate(0)

                Case "l"

                    Seite.SetRotate(270)

                Case "r"

                    Seite.SetRotate(90)

                Case "k"

                    Seite.SetRotate(180)

            End Select

        Next

        PDFout1.Save(1, inPDF.FullName)

        PDFout1.Close()

        gApp.CloseAllDocs()

    End Sub

 

it rotates but only from the orginal scanned pdf direction and not from the direction whitch is actually  saved.

How can we rotate from the actually saved direction and not from the orginal scanned pdf direction?

enhance Scanned API

$
0
0

Hi Team,

I am not able to find enhance scan api in adobe dc SDK, can someone help me with API details to explore.

Use VBA to Create Bookmark to Execute a Menu Item (Open File)

$
0
0

Hi

 

I am designing an Access Database that combines a number of PDF documents and adds a set of bookmarks to various locations in the document , and also to a number of files and / or folder external to the PDF document. Currently I using VBA to open the PDF object and create the set of bookmarks, which for the most part work fine, however the are some issues:  some of the linked JPG or other graphic files open in a browser  (not the associated graphics program) or not at all  (The cause is not a file association issue).  Oddly, the resulting PDF will work correctly with some PDF readers and/or versions of Acrobat. but not in others.

 

I have included some of the code below which should explain what I am doing:-

 

     'Late Binding

    Set gApp = CreateObject("AcroExch.App")

    Set gPDDoc = CreateObject("AcroExch.PDDoc") 

......

    If gPDDoc.Open(sTargetPDFPath) Then

Set jso = gPDDoc.GetJSObject

Set BMR = jso.BookMarkRoot

BMR.createChild "My DOCUMENTS", "", 0

BMR.createChild "SUB HEADING 1", "", 1

     ... etc...

 

Then I iterate though some DB records to retrieve file paths and create the Java script  App.LaunchURL call which is added to the bookmark  

 

  sPath = RSLvl!ExhibitBMPath        '(Get file/folder Path from DB)

  sBMName = RSLvl![Bmk_Name]   '(Get Bookmark Text to display)

  bmcChldLv2.createChild sBMName, "app.launchURL('" & sPath & "', true)", PositionIndex     '(Create and insert the Bookmark)

 

What I would like to do instead of using the app.launchURL code option (which I believe is the likely cause of the intermittent issues I am having)  is to use the   'Execute a Menu Item'  > 'Open File'  and/or 'Execute a Menu Item'  > 'Open Folder'   (naturally providing the path to the relevant file/folder.)  which are options available when you are manually creating bookmarks in Acrobat.   

 

(All bookmark create manually with the Execute Menu Item option (open file / Open Folder) to the same file/folder paths inserted by the database work as expected.)

 

I have googled for days and days, read an re-read the SDK and numerous other on-line publications and bits and pieces, which was all helpful and helped me with what I already have, but for the life of me I can not workout how to build the bookmark to Execute a Menu Item (rather than App.LaunchURL)

 

An assistance or advice would be greatly appreciated.

 

Thank you.

Need help on Acrobat SDK Plugin Licensing

$
0
0

Hi,

I am really confused by the SDK licensing based on the forum posts and the license terms on the Acrobat website.

 

I wish to build plug-in that will be implemented with Acrobat Pro DC version only and not with Adobe Reader.

Are there any cost attached to the SDK? To my understanding, if we are not planning to have the plugin for Adobe Reader, there is no need for RIKLA program. However, do we need to pay or get approval for plugins for Acrobat Pro DC?

 

Are there any restrictions in distributing plug-in made using the SDK for users with Acrobat Pro DC only ?

Extracting Pantone Shades using Creative SDK for Web app

$
0
0

I am building a ui, where i want to extract pantone shades/colors from a pdf file. Can't find any documentation for the same.

How Can We Save PDF into XML SpreadSheet 2003 format using IAC?????

$
0
0

Dear all, 

               I am trying to pro-grammatically Save PDF into XML Spreadsheet 2003 Format.

               Manually, I would go through File>Save as>Spreadsheet>XML Spreadsheet 2003, From reading the documentation I was expecting that I could achieve the same using (C# and IAC) .AvconversionconvertFromPDFWithHandler()  method is use for saving pdf file into d/f format.

How can we do this task Please Help me .

 

Thanks In Advance


Regards

Pawan Pant

 


How to check PDF is password protected or not in c# or Javascript or Jquery?

$
0
0

I want to do the following in web application developed using .NET(JQUERY, ANGULAR):

1. Check PDF is password protected or not

2. Check PDF is corrupted or not

 

Please help with sample codes and examples

Best design to create a document

$
0
0

Hi all,

 

I am creating a PDF document from scratch with the Adobe SDK Library. My first version of the code is working but I would like to improve the speed of the algorithm.

 

Here is the initial workflow :

 

1 - Create a new empty document via

     * PDDocCreate

     * PDDocCreatePage

     * PDDocSave

2 - For each text element to add

     * PDDocOpen

     * PDDocAquirePage

     * PDPageAcquirePDEContent

     * PDEContentAddElem

     * PDPageSetPDEContent

     * PDDocSave

 

As I said, this process works fine but it's not efficient because each time we open and save the same file. So my second thought was to do :

 

1 - Create a new empty document via

     * PDDocCreate

     * PDDocCreatePage

     * PDDocSave

     * return pdDoc

2 - For each text element to add, using the already known pdDoc

     * PDDocOpen

     * PDDocAquirePage

     * PDPageAcquirePDEContent

     * PDEContentAddElem

     * PDPageSetPDEContent

     * PDDocSave

 

In this way it seems to be two times faster. It is great but I would like to know if it is possible to avoid the PDDocSave and doing it only one time at the end. Here is the Idea :

 

1 - Create a new empty document via

     * PDDocCreate

     * PDDocCreatePage

     * PDDocAquirePage

     * PDPageAcquirePDEContent

     * PDDocSave

     * return pdeContent

2 - For each text element to add, using the already known pdeContent

     * PDDocOpen

     * PDDocAquirePage

     * PDPageAcquirePDEContent

     * PDEContentAddElem

     * PDPageSetPDEContent

     * PDDocSave

3 - Save the Document

    * ???

 

The Question are :

 

- How can I deal with the multiple page ? Is PDEContentAddPage the answer ?

- I think I could use PDPageSetPDEContent to send the pdeContent to a pdPage but what is the pdDoc for PDDocSave ? How could I set it with pdPage ?

 

Thank you in advance for your help.

When will Acrobat support CEP?

$
0
0

When will CEP be supported for Acrobat?

Many pages of online API reference are missing

$
0
0

As title. It seems more often than not, when I select a page in the API reference site (linked from the current SDK documentation), the page returns an HTTP 404 error. I'm having an incredibly hard time getting started with the SDK, as I'm just not able to find the documentation I need to get things running.

VBA, library problem

$
0
0

Hi, i wrote a little app in excel (VBA) to fill a pdf and it is working perfectly on my laptop, i have Adobe Acrobat pro DC, but when i use it on another laptop i get an error:

"Project or Library not found", the other laptop has an Acrobat Pro XI, and i have already included all the Acrobat libraries in references.

please advise.

Viewing all 2791 articles
Browse latest View live


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