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

AxAcroPDF Crashes without Admin Elevation

$
0
0

I've got a VB.Net viewer application that works fine as long as the user has elevated privilages - not an option on a work server in mass deployment.

 

Is there some way to get it to run otherwise??

the error being thrown is this (not a lot of use probably):

 

System.InvalidOperationException was unhandled

  HResult=-2146233079

  Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: Error HRESULT E_FAIL has been returned from a call to a COM component.

  Source=PDFStamperInterface

  StackTrace:

       at PDFStamperInterface.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190

       at PDFStamperInterface.My.MyProject.MyForms.get_FrmLoadedPdfs()

       at PDFStamperInterface.My.MyApplication.OnCreateMainForm() in Y:\Calibre Design Software Development\BCDocManager V0.1.8.1\PDFStamperInterface\My Project\Application.Designer.vb:line 35

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel( )

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)

       at PDFStamperInterface.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81

  InnerException: System.Runtime.InteropServices.COMException

       ErrorCode=-2147467259

       HResult=-2147467259

       Message=Error HRESULT E_FAIL has been returned from a call to a COM component.

       Source=System.Windows.Forms

       StackTrace:

            at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)

            at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)

            at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)

            at System.Windows.Forms.AxHost.CreateInstance()

            at System.Windows.Forms.AxHost.GetOcxCreate()

            at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)

            at System.Windows.Forms.AxHost.CreateHandle()

            at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

            at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

            at System.Windows.Forms.AxHost.EndInit()

            at PDFStamperInterface.FrmLoadedPdfs.InitializeComponent() in Y:\Calibre Design Software Development\BCDocManager V0.1.8.1\PDFStamperInterface\frmLoadedPdfs.Designer.vb:line 386

            at PDFStamperInterface.FrmLoadedPdfs..ctor() in Y:\Calibre Design Software Development\BCDocManager V0.1.8.1\PDFStamperInterface\frmLoadedPdfs.vb:line 40

       InnerException:


Licensing questions...

$
0
0

It's been suggesting that the project I'm working on might violate T&C, so I'm trying to clarify if what I'm doing is wrong, and what's the right way to do it if so.

 

We have a small application for stamping pdfs with things (construction company, things like "tender" or "for construction". We want to manage this ourselves so we can tie the actions back into AutoCAD.

 

Right now, I've been looking at just using the free pdf viewer that comes with reader (AxAcroPdf) and basic itextsharp functions, but I'm not sure that is legal. I've never used the SDK.

We have multiple copies of Acrobat Professional X and Distiller X though NOT one for every computer and this would be on every computer.

 

1)Is what I'm doing legal?

2)if not, is there a legal way to do it with the SDK and do our copies permit that?

3)are 3rd party components a legal way around this? if not, how do they exist?

 

Thanks in advance!!

Acrobat DC ActiveX crashes

$
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.

 

(If I put the ActiveX control in a Visual C# program it's fine. This seems to be limited to Delphi.)

 

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

Using Visual basic to search string in PDF files (acroavdoc.findtext)

$
0
0

Hello,

Using Excel 2010 and Adobe Acrobat Standard XI, I am trying to create a VBA script searching PDF files for a specified string.

According to object brovser in VBA the acroAVDoc.findtext is specified as:

 

Function FindText(szText As String, bCaseSensitive As Long, bWholeWordsOnly As Long, bReset As Long) As Boolean

 

The code below works EXCEPT that I can not manage to make the search case sensitive or for whole Words only! Anobody who can help?

 

 

 

Sub AcrobatFindText2()
'variables
Dim Resp 'For message box responses
Dim gPDFPath As String
Dim sText As String 'String to search for
Dim sStr As String 'Message string
Dim foundText As Long 'Holds return value from "FindText" method
Dim caseSensitive As Long
caseSensitive = 1000
Dim WholeWords As Long
WholeWords = 1000
Dim bReset As Long
bReset = 1000

'Dim ln0 As Long
'Dim ln1 As Long
'ln0 = 0
'ln1 = 1

'hard coding for a PDF to open, it can be changed when needed.
gPDFPath = "C:\*path*"
'Initialize Acrobat by creating App object
Set gApp = CreateObject("AcroExch.App", "")
gApp.Hide
'Set AVDoc object
Set gAvDoc = CreateObject("AcroExch.AVDoc")
' open the PDF
If gAvDoc.Open(gPDFPath, "") Then
sText = "STRING TO FIND IN PDF"

"PROBLEM STARTS HERE"
'Function FindText(szText As String, bCaseSensitive As Long, bWholeWordsOnly As Long, bReset As Long) As Boolean
foundText = gAvDoc.FindText(sText, caseSensitive, WholeWords, bReset)  'Returns -1 if found, 0 otherwise
"PROBLEM ENDS HERE"

Debug.Print foundText
Else ' if failed, show error message
Resp = MsgBox("Cannot open" & gPDFPath, vbOKOnly)
End If
If foundText = -1 Then
'compose a message
sStr = "Found: " & sText
Resp = MsgBox(sStr, vbOKOnly)
Else ' if failed, 'show error message
Resp = MsgBox("Cannot find: " & sText, vbOKOnly)
End If
'Visa dokument
gApp.Show
gAvDoc.BringToFront

End Sub

how to programmatically convert pdf to html using Acrobat SDK

$
0
0

I need to convert many pdf files to html and found acrobat dc has the highest performance.

 

After scanning  ‘Acrobat DC SDK Documentation’ and ‘Acrobat and PDF Library API Reference’, I only found AVConversionConvertFromPDFProc may be usful.

 

However I'm not sure about that, and have no idea how to use it.

 

So:

1. does this AVConversionConvertFromPDFProc can help to programmatically convert pdf to html?

2. how to use this api? no matter in C/C++/C# or JS

How can we extract pdf images Using IAC method or Jquery SDk methods.

$
0
0

I wan to extract all PDF images using C#/Vb.net .

Is it possible or not using IAC Methods.

 

 

thanks

Pawan

Adobe Reader in .Net

$
0
0

I am using adobe reader as control in .Net app. I am trying to find out a function which return current opened page number. Any help will be appreciated.

command-line to execute acrobat action wizard?

$
0
0

I'm using Acrobat XI Professional. Is there a way to execute the Actition Wizard actions in the command-line?

 

Thanks.


Anchors and buttons in a 3rd party software

$
0
0

Hi everybody!

I have the CC suite actual version (January 2016)

 

I need to export an interactive PDF made by indesign with some ACHORS.

The goal> I have to link those anchors with some buttons in a software, to allow software users to open the PDF at the right "chapter". (the document is the software technical manual!)

 

I tried in this way, but i have a problem!

 

1 create anchors in the document with a specific names

2 export interactive pdf

3 check the pdf source code with an editor like TextWrangler looking for the specific names

 

I found my anchors in a form like: "DocumentName.indd:AnchorName:Number"

 

THE PROBLEM IS THE Number

 

The old version of indesign (5.5 in my case) doesn't add that number! What kind of number is it? Apparently is it a progressive number but i have no idea from where it comes...

 

My software developers can't add these numbers in the buttons code because numbers changes every time i'm exporting and so they cannot "see in the future" and find the right numbers...

 

Is there a way to export the document without adding the number? Any script or anything else?

 

I accept any suggestion to reach the goal...

 

Thank you!

best regards

 

Mauro

 

RSS Feed for Document Cloud?

$
0
0

Is there a way to create an RSS feed for my Document Cloud that updates when new files are uploaded?

char offset vs word offset

$
0
0

Hello,

 

I am trying to highlight a searched word within the callback function wordenumerator.

 

I can obtain a char offset from a PDWord, but the HiliteEntry object needs a word offset to highlight this word.

 

How can I obtain the word offset for the HiliteEntry object ?

 

Thanks,

Arno

Get hold of existing instance of acrobat in C#

$
0
0

Hi All:

 

My requirement is to get hold of an already open instance of acrobat pro and read the content from the pdf in a C# windows application.

 

I am trying to achieve this using inter application communication but couldn't find way. I was wondering if I can get a sample of how can I do it.

 

everywhere I try to find, I just get an example of CreateObject("AcroExch.App") but I believe this creates an instance of Acrobat app where as I need to get hold of the already open app.

 

Help truly appreciated.

 

Thanks in advance.

 

Regards
Rahul

Hello folks How can we Drag and drop the PDF Elements using Adobe Acrobat SDK .

$
0
0

I want to build a Software where I'm drag and drop the PDF elements according to my need .

 

Give any suggestion .

 

Thanks

Pawan

Docx to pdf using c#

$
0
0

How to convert .docx and .doc file to PDF using acrobat dc and c#?

wie kann ich die Textgröße bei einem Formular ändern (Ausfülltext)

$
0
0

wie kann ich die Textgröße bei einem Formular ändern (Ausfülltext)


Adding an PDOCG to an existing PDOCMD

$
0
0

Quick question.  How does one add an OCG to an existing OCMD with the Adobe SDK with PDFLib?  Basically, I'm moving an OCG inside another OCG and need to associate them with an already existing OCMD, that I need to update.  I need containers that are set to this OCMD to reflect the visiblity of both of these OCG's, instead of just the previous one.  The Acrobat API says to "To add a group to an existing OCMD, get the current OCG list, modify it, then create a new OCMD with the new list of groups (PD_Layer.PDOCMD (Acrobat)."  How does one accomplish that?  I can't quite figure it out.  Thanks for the help!

password security and page extraction

$
0
0

Hello,

 

I need some informations regarding a PDF protected by Password security.

I have an Adobe plugin (SDK9, acrobat XI) that does several actions on PDF, and a PDF with the attached protection details.

 

security.JPG

 

The only action not allowed is "Page Extraction", but my plugin launch an error when I try the clonePDDoc() action. Is this the expected behaviour?

I would expect an error on clonePDDoc() if the "content copy" action is not allowed and not if the Page Extraction is the only not-allowed action

 

Thanks

merging and saving layers one by one

$
0
0

Hi,

 

I have an acrobat file containing multiple language layers (about 25). The file layers are thus made up:

 

...

layer 4: NL

layer 3: FR

layer 2: EN

layer 1: IMAGES

 

Is there a way to fasten the save into seperate language PDF's?

I now click a language layer visible, flatten the file, name it to that language. Open the master PDF again, and repeat.

Note: the image layer needs to be visible at all times, the language layers are clicked visible on/off.

 

I'm looking for a way to fasten this tedious job - preferably in Indesign, or otherwise in Abrobat...?

 

Thanks

Vanessa

How to debug plugin in Visual Studio 2013?

$
0
0

I followed all the necessary steps as descripted in the Plugin Apps Developer Guide document to debug a plugin into Visual C++:

 

Specify the Acrobat plug-ins directory under the link | output tab in the Project settings dialog box.

● Specify the Acrobat or Adobe Reader executable under the executable for debug session in the Project settings dialog box.

● The first time you build a plug-in, do a Rebuild All.

● Set breakpoints in your source code by selecting the line and clicking the hand icon or pressing the F9 key.

● After setting breakpoints, press the F5 key to have Microsoft Visual Studio launch Acrobat or Adobe Reader.

 

However I received the following message when a press F5 key:

 

Capturar.PNG

 

 

 

Of course I don't have PDB file of Acrobat's executable. So what do I have to do? Other question, the plugin have a lot of callbacks, can VS handle that?

 

Thanks,

Rodrigo Gonçalves.

Get access to certificate store

$
0
0

I want to replace the hardwired certificate example in the DocSign sample (John Doe). I have looked to PubSec Acrobat Address Book Methods but I could not make it work out. Am I doing right to look for these methods? How to use them?

 

I am trying to get access to the Acrobat certificate store or using the OS's.

Viewing all 2571 articles
Browse latest View live


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