Quantcast
Channel: Adobe Community : All Content - Acrobat SDK
Viewing all 2571 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?


Is there any internal property that indicates when a form field was last modified?

$
0
0

Greetings,

 

I am working with a client on a fairly long form for manufacturing process validation.  It's 115 pages and has nearly 4,000 user editable fields.

 

They want to be able to verify when each field has been entered by users.  While we can certainly use signatures to confirm that fields were filled in before the signature, the order in which fields are completed and the time between field completion matters to them from a process management standpoint.

 

My (perhaps simple) question is this:  does Acrobat track the time when a field's content was last updated?  If it does, does it also track the user name? Since it knows what's been changed since a signature was applied I'm hopeful that it's tracking that information internally and I can access it programmatically.

 

If not, has anyone ever used Javascript on the fields to try and accomplish the same thing?

 

Thanks!

How to get the full path of the current open PDF file?

$
0
0
How to get the full path of the current open PDF file from PDDOC or AVDOC??

Thanks!!

Adobe Acrobat DC SDK - Reader plugin disable Save as shortcuts programmatically

$
0
0

Hello,

 

We are using Adobe Reader DC plugin and would like to disable Adobe keyboard shortcuts like F8 to show/hide the Adobe Toolbars, Ctrl+Shift+S to Save, Ctrl+P to Print, etc programmatically

 

We understand that in previous releases of Adobe Acrobat/Reader this was NOT possible or restricted. Can some one confirm if this is possible with Acrobat/Reader DC? Also, a quick example of how this can be achieved could also help.

 

Please let me know your views on this.

 

Thanks,

Amish

How to load a PDF from a stream

$
0
0
Hi,

I'm looking at how to load a PDF file from a stream in .NET, e.g. something like a MemoryStream or FileStream. All of the methods I've seen so far only allow the PDF to be loaded from a file which we don't want to do because of security issues. I know I can do this with a third party tool, but is this possible without using any additional tools?

Cheers,

Dave Harrington.

Digitally signing a pdf in using Excel VBA

$
0
0

I have a script that successfully populates data from Excel into a form I have created and saves it.  However, I'm having difficulty digitally signing the form.  The following is old code I found from previous literature and it seems like it should work but it has not yet.  Thanks!

 

            strSignFName = "C:\misc\Test.pfx"

            Set oSign = objJSO.getField("Test")

'            Set oSign = objJSO.getField("Pool Manager Signature")

            Set oPpklite = objJSO.Security.getHandler("Adobe.PPKLite", True)

          

            oPpklite.login "Test123", "C:\misc\Test.pfx"

            oSign.signatureSign oPpklite

            oPpklite.logout  

          

            'Create the output path, which will be like C:\Users\Christos\Desktop\Forms\01) First Name Last Name.pdf.

            strPDFOutPath = "S:\XXXXX\YYYY\FPU_" & wsF.Cells(i, 7).Value & ".pdf"

          

            'Save the form as new PDF file.

            objAcroPDDoc.Save 1, strPDFOutPath

Pdf to word(.docx) conversion and corresponding licenses

$
0
0

Hi,

 

I am using the Acrobat dll to convert a PDF to a word document using the SaveAs() function. My company has a license for Acrobat Reader Pro. I am building a web application that will run on the server. It works locally but does not work on the server. I understand that Acrobat SDK is not suited for applications running on the server. Adobe PDF Library SDK allows for server deployment but it does not have capabilities to convert a PDF document to a word document. Which license or SDK/API do I need? What am I missing? Please help.

Why are not all words transferred to my Excel sheet?

$
0
0

The code transfers all the values from the PDF file into my Excel sheet .... I thought so .... On page 2 and following, after two-thirds of the page the enumeration ends and it continues on the next page ... On page 1 but everything is transferred .... has anyone ever had the phenomenon? I need all the text from the PDF

 

 

Set jso = PDDoc.GetJSObject

 

i = 0

 

For iPage = 0 To PDDoc.GetNumPages - 1

    icount = jso.getPageNumWords(0)

        For iWord = 0 To icount - 1

            word = jso.getPageNthWord(iPage, iWord, True)

            If VarType(word) = vbString Then

              Tabelle5.Cells(i + 1, 1) = word

                i = i + 1

            End If

        Next iWord

Next iPage

  

Set PDDoc = Nothing

Set jso = Nothing

 

 

 

greetings tobi


PDF to PNG Image

$
0
0

Hi,

 

We are converting PDF page to PNG image by using below code:

 

  ASCab config = ASCabNew();

  ASCabPutInt (config, kExtractImgCmdKeyColorSpace, kColorSpaceAuto);
  ASCabPutInt (config, kExtractImgCmdKeyResolution, kImgResolutionAuto);
  ASCabPutBool(config, kExtractImgCmdKeyConfigured,true);
  ASCabPutInt(config, kExtractImgCmdKeyConvFormat, kImgConversionFormatPng); 
  AVConversionStatus bSucceeded = AVConversionConvertFromPDFWithHandler(convFromPDFFilter.handler, config,  kAVConversionNoFlags,
        pdPageDoc, outPath, fileSys, NULL);

 

But out image file is wrong.(Viewer can't open this picture because the file appears to be demaged, corrupted, or is too large)

 

Please help us to resolve the problem.

 

Thanks

How to open PDF in existing instance of Acrobat Pro DC through C#

$
0
0

Using Acrobat DC SDK in C#, with following code

   

     Type PDFType = Type.GetTypeFromProgID("AcroExch.App");
     CAcroApp AcroAppObj = Activator.CreateInstance(PDFType) as CAcroApp;

 

     AcroAppObj.Show();

     CAcroAVDoc AvDocObj = AcroAppObj.GetActiveDoc() as CAcroAVDoc;

     CAcroPDDoc PdDocObj = AvDocObj.GetPDDoc() as CAcroPDDoc;

 

I am able to get an opened document, How can I open PDF document in this existing instance through C#?

Easiest way to draw all annotations with PDPageDrawContentsToMemory?

$
0
0

I am currently trying to draw a PDF (as well as the text annotations) using PDPageDrawContentsToMemory, but I'm running into problems.This  [https://forums.adobe.com/thread/827380] thread seems to suggest text annotations will draw if kPDPageIsPrinting and kPDPageUseAnnotFaces are set as drawFlags, but this doesn't appear to be working when I try it. The PDF draws to the screen, but without the annotations. What am I missing here? Thanks

 

 

Relevant code snippet:

"

...

csAtom = ASAtomFromString("DeviceRGB");

drawFlags = kPDPageIsPrinting | kPDPageUseAnnotFaces |  kPDPageSwapComponents;

smoothFlags = kPDPageDrawSmoothText | kPDPageDrawSmoothLineArt | kPDPageDrawSmoothImage;

 

PDPageDrawContentsToMemory( pdPage, drawFlags, &matrix, pASInvRect, smoothFlags, csAtom, 8, &bRect, (char*)pBits, bitsSize, nil, nil);

"

How can I use adobe acrobat from command line

$
0
0

I have a licence product of adobe acrobat installed in my pc. I want to use the feature 'save pdf as docx' from windows/linux command line. Is there any way to achieve this?

Shall we use watch folder concept in plugin

$
0
0

How can we use watch folder or timer concept in plugin using SDK? Please anyone answer my question

how to execute .sequ file using acrobat SDK?

$
0
0

how to execute .sequ file using acrobat SDK?

xml export using .net

$
0
0

We are working on automating some customer files we receive on a daily basis. We have used some 3rd party tools to export as text.

BUT.. We tried a export to XML from our full version of Adobe Acrobat and we like how the data is exporting out.

here is the question.

 

Is there a way to use .net to interface with Acrobat to tell it to export the xml data?

We are getting a bit lost in the sdk info.


Print from PDF and change Paper Size

$
0
0

Dears,

 

I have the challenge that I need to print an PDF in Format A5. Want to do this with VBA.

 

The AVDoc /PDDoc matter can bee out of scope here, not finally decided who I will feed the PDF in.

 

The Challenge is:

 

Print PDF on Standard Printer, Format A5. The default Format is A4.

 

I am already searched here and the whole SDK, from this I was able to Build up something. But this is not workung fine and my main Issue is not fixed here.

 

Dim AcroApp As Acrobat.CAcroApp

Dim PdDoc As Acrobat.CAcroPDDoc

 

 

Set AcroApp = CreateObject("AcroExch.App")

Set PdDoc = CreateObject("AcroExch.PDDoc")

 

 

Dim AcroPDDoc As Acrobat.AcroPDDoc

 

 

 

 

Dim JSObject As Object

 

 

Dim pp As Object

 

 

Dim fv As Object

 

 

If PdDoc.Open("C:\Users\ND01132\Downloads\Loadlist (6).pdf") = True Then

 

 

 

 

Set JSObject = PdDoc.GetJSObject

 

 

 

 

Set pp = JSObject.getPrintParams

 

 

pp.Interactive = AcroPrintParams.Constants.interactionLevel.Silent

 

 

 

 

 

pp.firstPage = 0

 

 

pp.lastPage = 1

 

 

pp.pageHandling = 1

 

 

 

 

 

Set fv = pp.Constants.flagValues

 

 

pp.flags = fv.setPageSize()

 

 

JSObject.Print (pp)

 

 

 

 

End If

 

For the Line pp.Interactive = AcroPrintParams.Constants.interactionLevel.Silent I always get the Runtime Error 424 - Object Required. Not Sure how to fix This.

Next Point is fv.setPageSize() How can I change the Papersize to A5 ?

 

Happy to hear some Tips !

 

Regards

 

Yannick

Insert a JPEG into an image field using Excel/VBA

$
0
0

Hi,

 

I have been using a modified version of the code on this website (Read And Write PDF Forms From Excel (VBA) ~ My Engineering World ) to copy text from an excel document to a PDF template and then save the result. Now I want to have the macro also add in an image to the image field in my template. I'm pretty new to VBA coding, so appologies if this is a dumb question.

 

Basically for my text I was just using "objAcroPDDoc.GetJSObject. GetField.[field name].Value" to highlight the relevant field in the PDF and paste in the value from my excel file. But I'm not sure how to modify it to have it add in an image from a specified file path instead.

 

Thanks in advance for any help!

conversion from a word file with AVConversionConvertToPDF hangs when word file is in revision mode, conversion from a word file with AVConversionConvertToPDF hangs when word file is in revision mode

$
0
0

conversion from a word file with AVConversionConvertToPDF hangs when word file is in revision mode, conversion from a word file with AVConversionConvertToPDF hangs when word file is in revision mode.

 

I am supposing that, like in manual mode, Word is waiting for the user to acknoledge some dialog.

 

Can I control Word from the conversion process?

 

Thanks a lot.

Christian

open pdf in new window, interact with third-party plugin?

$
0
0

I would like to create a program that will open a pdf in a new window, automatically save the pdf on any change to the document, and will close the window when the program determines is appropriate. However, I would also like the pdf window to interact with a third-party pdf-signing plugin like it currently does in Acrobat Reader DC. Currently, when the user clicks on a signature field in Acrobat Reader DC, a signature box pops up so the user can apply his/her signature and then when they click Accept, the signature box closes and the signature field on the pdf is updated. If I create a "plug-in" that opens a pdf in a new window, will that window still interact with the third-party plugin in the same way Adobe Reader DC does? Would I use the AcroPDF object’s LoadFile method? I am trying to determine what is and is not possible before embarking down a path, so thanks in advance for any help.

open pdf in new window, interact with third-party plugin?

$
0
0

I would like to write a program that opens a pdf in a new window, saves the pdf on any change to the document, and closes the window when the program determines is appropriate. However, I would also like the pdf to interact with the user through a third-party plugin in the same way it does in Adobe Reader DC. With the third-party plugin installed, when the document is open in Adobe Reader DC and the user clicks on a signature field, a signature box pops up for the user to apply their signature, and when they click Accept, the signature field on the pdf is updated. Is it possible to open a pdf in a non-Adobe-Reader-DC window (without the scrolling options frame on the right and without the toolbar at the top) that still interacts with third-party Reader plugins? Would I use AcroPDF object’s LoadFile method? I am trying to determine what is and is not possible before embarking down a path, so any help is greatly appreciated.

Viewing all 2571 articles
Browse latest View live


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