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

Convert PDF to PDF/A-2b

$
0
0

I am trying to build the option to convert PDF files to PDF/A-2b into my already existing Acrobat X plugin.

 

I have figured out how to select the correct handler for AVConversionConvertFromPDFWithHandler (com.callas.preflight.pdfa),

and if I give the flag kAVConversionInteractive it displays the preflight dialog to select which PDF/A profile,

but I cannot figure out how to do this selection from software (no dialog).

 

Is this possible in Acrobat X?

 

If its possible I guess its done thru the "ASCab insettings" parameter,

but I can't seem to find any documentation on what to put in there for the "com.callas.preflight.pdfa" handler.


Acrobat SDK C# Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

$
0
0

Hi,

 

Here I want to known one thing clearly, that is I was developed one application in C# with Acrobat SDK.

 

In my application I am using Acrobat AxAcroPDFLib.AxAcroPDF and  also some other acrobat class.

 

In my development system i am using Acrobat 7.0.

 

When my application installed in my client system I am faced different types of problem.

 

  • System 1

System Configuration

OS : XP

Acrobat 7.0

 

Result : Success

 

  • System 2

System Configuration

OS : XP

Acrobat 5.0

Acrobat 7.0

 

Result : Fail

 

Error : Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

 

  • System 3

System Configuration

OS : XP

Acrobat 7.0

Adobe Reader 9

 

Result : Success

 

Note:

 

But I having problem when I am use my application while Adobe Reader 9 is open.

 

What is problem?

 

Error is related to ActiveX COM fail like

 

    1. Error HRESULT E_FAIL has been returned from a call to a COM component.
    2. Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-2E68-101B-B02E-04021C009402} failed due to the following error: 80080005

 

  • System 4

System Configuration

OS : XP

Acrobat 7.0

 

Result : Success

 

Problem:

At the time of tool installation the system configuration will be as mention above, after by mistake they installed Adobe Reader 5.0. I faced the problem to use my application ActiveX COM failed

 

So I was un installed Adobe Reader 5, and tried but I got the following error,

 

     System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception      from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

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

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

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 Greenleaf_MetaData.ArticleMetaData_Jnl.InitializeComponent()

at Greenleaf_MetaData.ArticleMetaData_Jnl..ctor()

at Greenleaf_MetaData.MainForm.btn_Process_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)   

 

 

So, I am advised my System Admin team to Re-Install the Acrobat 7.0, after the Re-Installation of Acrobat 7.0, all the problem get solved.

 

But I want to known what is problem?

 

And also what is the Adobe COM connection between Acrobat ActiveX and my Application(C#, VB, etc…).

 

So Please give clear information and guidance...

 

Thanks & Regard

Thirusanguraja Venkatesan

PdfExporter won't do my 451 page doc to exel

$
0
0

how do I convert a large file - bought the product and it does not work for what I need - if can't be done may as well get refund

Using VBA, how do I merge a 3-page PDF with an existing PDF?

$
0
0

Sub MergePDFS

 

Dim AcroApp As Acrobat.CAcroApp

Dim cover As Acrobat.CAcroPDDoc

Dim backup As Acrobat.CAcroPDDoc

Dim coverName As String

 

Set AcroApp = CreateObject("AcroExch.App")

Set cover = CreateObject("AcroExch.PDDoc")

Set backup = CreateObject("AcroExch.PDDoc")

 

Doc_Folder = "C:\Users\smith\Desktop\PDF\"

 

cover.Open (Doc_Folder & coverName)

 

numbackPages = backup.GetNumPages()

 

If numbackPages > 0 Then

   mergefile = cover.InsertPages(0, backup, 0, numbackPages, 0) 

End If

 

cover.Save 1, "C:\Users\smith\Desktop\PDF\Merged Files\" & coverName

 

cover.close

 

End Sub

 

 

Note:  I was able to merge 2 individual 1-page pdf's with the 1-page "cover" PDF - code not shown above - but I couldn't get it to also merge the 3-page "backup" PDF.

           I really don't know what the initial, second & final zero parameters in the above InsertPages command stand for or do.  That could be my problem, but I haven't

           been able to find much information on the InsertPages arguments (or parameters) on the web.

Calculating outSigValueSize

$
0
0

Good day,

 

I am writing a signature handler (like DocSign example) and I use kPSSigMethodPKCS7Detached to create the signature value; the digestValue is NULL and I use the dataBuffer to fetch the bytes to digest.

 

How can safely calculate the size of the signature value, i.e. outSigValueSize?

 

Regards,

Magda

Add digital signature by SDK API

$
0
0
Hello,
I want to add digital signature in my plug-in.Can I use PSDataBufferEnum to get databuffer then use PSDataBufferDigest to add digital signature?
Can someone give me sample to use SDK API to add digital signature ?

Thanks!

Tom.

Prevent printing to PDF file

$
0
0

Hi,

 

I'm trying to prevent the user to print a protected PDF document to a PDF file.

My questions:

- How do I detect that the user prints to a specific printer?

  My replacement callback for AVDocDoPrint is called before the print dialog is viewed. But after the dialog is closed I have no chance to find out, which printer the user has chosen.

  My replacement callback for AVDocPrintPagesWithParams is never called..

  Or how can I find out the properties of the selected printer, like it is a "PDF printer" or a "postscript printer"?

 

If I print a protected document with the "Adobe PDF" printer, I get the message

"

%%[ ProductName: Distiller ]%%

This PostScript file was created from an encrypted PDF file.

Redistilling encrypted PDF is not permitted.

%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

%%[ Warning: PostScript error. No PDF file produced. ] %%"

 

How do I achieve this for every other printer?

 

Best regards,

Stefan

How to Print a PDF programmatically without the Adobe Reader Window

$
0
0

Hi,

 

I'm trying to print a PDF my application. I would prefer to do it as silent as possible - no PrintDialogue | Adobe Reader Window.

 

  • Language C#
  • Adobe Reader 10.0

 

Here´s some Code:

 

    public static void PrintPDF(string file, string printerName)
    {
        Process proc = new Process();
        proc.StartInfo.FileName = @"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe";
        proc.StartInfo.Arguments = @" /t /h " + "\"" + file + "\"" + " " + "\"" + printerName + "\"";
        proc.StartInfo.UseShellExecute = true;
        proc.StartInfo.CreateNoWindow = true;
        proc.Start();
        Thread.Sleep(1000);
        proc.WaitForInputIdle();
       

proc.Kill();

    }

 

It works, but the Adobe Reader Window is still popping up -> /h (start the reader minimized) does not work.

 

Is there another way to hide the Window ?

 

Regards


get digestValue

$
0
0

Good day,

 

I am writing a signature handler (like DocSign example) and I use PROP_PSENG_SignFormatPKCS1 to create the signature value; the digestValue is NULL and it says the dataBuffer is a handler to fetch the bytes to digest, but how?

 

And what's the difference between PROP_PSENG_SignFormatPKCS1Digest and PROP_PSENG_SignFormatPKCS1? The PubSecHFT.h says if using PROP_PSENG_SignFormatPKCS1Digest the handler need to do its own digesting and the PROP_PSENG_SignFormatPKCS1 don't. Then why the digestValue is null? For it's constant, when is it produced?

 

Please help me out. I'm really confused.

 

 

Regards,

freesnowxdy

Disable "Save" functionality when opened trhu web application in IE (.net)

$
0
0

HI

 

I am working on a Web Application developed using .net

 

Through the application the users will open pdf files available on the server and view it, in Internet explorer.

 

Now,since this is a sensitive data, we want to restrict the users from "Saving a copy " of the Pdf file.

 

How can i prevent the user from saving a copy of the pdf file

 

I observered that there are options to disable copying, selecting, printing of the pdf file. But i dont find an option to disable Save feature

 

If there are no straight forward approach for this, I would like to know any roundabout ways of achieving this

 

Thanks in Advance.

 

Thanks

Babu

Why me use acrobat SDK7.0 ADM create a Plugin(include Dialog), the Dialog change large

$
0
0

Why  me  use  acrobat  SDK7.0  ADM create  a  Plugin(include Dialog),

the  Dialog  change large when  the Plugin run in  win8X64+acrobat10

applescript to run "action" in action wizard

$
0
0

Hi Forum,

 

using this applescript I m running my "INDEGN" action from action wizard...

 

 

the first step is activated through the applescript.. (ie. INDEGN action is correctly picked)

 

but how to "click next button" to proceed to next steps..

 

 

 

tell application "System Events"

    tell application process "Acrobat"

        tell application "Adobe Acrobat Pro" to activate

        click the menu item "INDEGN" of menu 1 of menu item "Action Wizard" of the menu "File" of menu bar 1  ## here it is not cliking next button.....

        click button "Next" of window "Action: INDEGN"

click button "Close" of window "Action: INDEGN"

    end tell

end tell

 

many thanks for the support..

Acrobat 10.1.7 crash by loading plugin which using CLR

$
0
0

Hi,

 

I have develop some plugins using Acrobat SDK with CLR, specified /clr option.

But these plugins causes application crash of Acrobat X, 10.1.7, when trying to close the application.

 

Simply plugin with /clr option, not loading CLR dynamically, also causes crash of Acrobat.

It is IMPORTANT problem for plugin developper like me.

 

Please tell me how to avoid this problem.

 

Regards.

How can I access the "security" constant from JSObject?

$
0
0

I would like to set the permissions for printing to "none" using C#.  The Javascript documentation says to use the "security" constant to access like this:

security.getHandler(security.PPKLiteHandler, true);

to access the handler and then to apply the permissions:

this.encryptForRecipients({

oGroups :

[

{userEntities:importantUsers,permissions:{allowAll:true }},

{userEntities: otherUsers, permissions:{allowPrinting:"none"}}

],

bMetaData : true

});

 

"this" refers to the JSObject, but how do I send the message "security.getHandler"?

How to extract path from a Widget Annotation action button?

$
0
0

Hi everyone,

 

I am new to Acrobat SDK and i am having a hard time trying to figure this out...

 

I am trying to extract the "UF" Value from "AA"(additional action) -> "D" -> "F" -> "UF" from a [Widget] type Annotation.

 

Below is how it is structured  in the PDF:

 

<</AA<</D<</F 26 0 R/S/Launch/Type/Action>>>>/AP<</D 25 0 R/N 24 0 R>>/BS<</S/S/Type/Border/W 0>>/DA(/98f44ab4-3234-4e0f-9f86-c21f94d45319 12 Tf 0.392157 0.584314 0.929412 rg\r\n)/F 4/FT/Btn/Ff 65536/MK<</BC[0.0 0.0 0.0]/BG[1.0 1.0 1.0]/CA(Link to workpaper attachment: My Document)>>/P 7 0 R/Q 0/Rect[60.0 650.489 525.0 688.093]/Subtype/Widget/T(submitButton)/TU(My Document)/Type/Annot>>

 

<</Type/Filespec/UF(./Q2 FY 2011/Activities/My Document.DOCM)>>

 

 

Here is my code(plugin)(If someone have a another way to get this done in VB or C# please let me know how too):

//Code Begin

ACCB1 void ACCB2 MyPluginCommand(void *clientData)

{

          // try to get front PDF document

          AVDoc avDoc = AVAppGetActiveDoc();

 

 

          if(avDoc==NULL) {

                    // if no doc is loaded, make a message.

                    strcat(str,"There is no PDF document loaded in Acrobat.");

          }

          else {

                    // if a PDF is open, get its number of pages

                    PDDoc mypdDoc = AVDocGetPDDoc (avDoc);

                    int numPages = PDDocGetNumPages (mypdDoc);

 

 

                     PDPage page;

                     PDAnnot annot;

                     char* showpath;

 

                     //Pdf only has one page with a widget annotation for testing   

                    page = PDDocAcquirePage(mypdDoc, 0);

                    ASInt32 i2;

 

                         //Get each annotation on the page

                    for (i2 = 0; i2 < PDPageGetNumAnnots(page); i2++){

                       //Get a specific annotation

                     annot = PDPageGetAnnot(page,i2);

                              if (PDAnnotIsValid(annot)){

 

                                         //Display subtype information about the annotation

                                        if(PDAnnotGetSubtype(annot) == ASAtomFromString("Widget")){

 

 

                                                       CosObj obj;

 

                                                             obj = PDAnnotGetCosObj(annot);

 

 

 

                                                   CosObj cosAction, winDictionary, fileSpecCosObj, fileName;

                                                  ASAtom aa, f;

                                                  PDFileSpec fileSpec;

                                                  if (!(ASAtomExistsForString("AA", &aa))) aa = ASAtomFromString("AA");

                                                  if (!(ASAtomExistsForString("UF", &f))) f = ASAtomFromString("UF");

                                                  PDAction thisaction = PDLinkAnnotGetAction(CastToPDLinkAnnot(annot));

                                                  cosAction = PDActionGetCosObj(thisaction);

                                                  winDictionary = CosDictGet(cosAction, aa);

 

 

                                                  fileSpecCosObj = CosDictGet(cosAction, f);

                                                  fileName = CosDictGet(fileSpecCosObj, f);

                                                  Int32 bytes;

                                                  showpath = CosStringValue(fileName, &bytes);

 

                                        }

 

 

 

                              }

 

                    }

                    sprintf(str,"%s", showpath);

          }

 

 

          // display message

AVAlertNote(str);

 

 

          return;

}

 

 

When i run this plug in i t gives me the error: There was a problem reading this document(14).

 

Anyone can tell me what i am doing wrong in my code please?

 

 

Thanks in advance.


Creating a Plugin that will save the PDF to a specific location when signed.

$
0
0

I have been working to create a system where when one signs a document, the file is automatically saved to a specific location and the file name is determined by certain fields entered within the document.  At first I believed that this could be done using javascript within the pdf, but am finding that I would instead need to make a plugin for Acrobat and Reader.  Below is a link to where I had posted on the Javascript forum about this and their suggestions:

 

http://forums.adobe.com/message/5652259#5652259

 

I have currently used their suggestions to create the following Action in Acrobat:

 

 

//Create the file name from text fields in the form

     //Credit to Gilad D for the first part of this script.

     var myFileName = this.getField("PATIENT_ID").valueAsString + "#" + this.getField("PATIENT_DOB_3").valueAsString + "#C#" + this.getField("PROCEDURE_NAME").valueAsString;

 

     //Save the file

     this.saveAs("/C/Users/ahill.CNC/Desktop/PDF test save/" + myFileName + ".pdf");

 

The above action works, but it currently isn't activated when the form is signed, nor would it work with Reader, which is something I would need.  If anyone has any sort of guidance on how to do this, it would be greatly appreciated.

Which signature handler to use when timestamping data

$
0
0

Hi,

 

I am struggling to validate my timestamped data with my signature handler. I how also need to be able to validate the signatures using Adobe default security handler. I currently have my handler set for PROP_PSENG_SignFormatPKCS7DetachedDigest. I see that there is also a handler property PROP_PSENG_SignFormatETSIRFC3161Digest.

 

If I want to include a timestamp from a TSA so that Adobe reports that the signature has been timestamped should I change the handler to PROP_PSENG_SignFormatETSIRFC3161Digest?

 

I see that Adobe default security's subfilter is adbe.pkcs7.detached, so I should be able to accomplish timestamping with PROP_PSENG_SignFormatPKCS7DetachedDigest?

 

Regards,

Magda

How to make "Copy to TextBox in Internet Explorer" button

$
0
0

I'd like to be able to select some text in Acrobat, and then right click, and then, in the context menu (right click menu), click a button called "Copy text to IE."

 

Then, when I click that, I'd like it to copy the selected text into a textbox in an already open Internet Explorer window.

 

How could I make this happen? Visual Studio?

How to implement text selection tool

$
0
0

Hello,

 

 

    I need to develop one plug-in. On click of menu, the cursor should change to text selection tool.

   

   On selection of text, I need to get coordinates of text.

 

  How to do this. Please help me to solve this issue.

 

 

Thanks,

 

Shilp

Enabling Acrobat Toolbars in C#

$
0
0

I am using WPF to display PDF documents in my application.  I load my documents using the following code:

 

    public partial class AdobePDFViewer : UserControl

    {

        public AdobePDFViewer(string path)

        {

            InitializeComponent();

 

 

            this.axAcroPDF1.LoadFile(path);

            this.axAcroPDF1.setShowToolbar(true);

        }

    }

 

 

Problem is, that only displays the top toolbar and not the thumbnails on the side.  I don't themt to be fully visible, but I would like to have a collapsed version of them on th left side.  If I don't set this.axAcroPDF1.setShowToolbar(true), then my documents load in Read Mode.  If I set this.axAcroPDF1.setShowToolbar(true), then they're display in read mode with the toolbar on top.  So, now I have toolbar on top and toolbar on bottom.

 

What I want, is simply to view documents in Toolbar mode to begin with, and if the user chooses to go into Read Mode, they can do so from the toolbar.

 

How can I accomplish this?

Viewing all 2571 articles
Browse latest View live


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