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

How can I split a PDF file by megabytes using VBA?

$
0
0

I wrote a routine to split .PDF files by page count and I notice that even if you use the Save method with PDSaveCollectGarbage parameter, the file size of the original file which I copied & deleted pages out of stays the same.

 

So now my task is to split the file by filesize using VBA. Everything I've thought of seems fraught with pitfalls. If I take the filesize of the original file and divide it by the number of pages it contains, what happens if the PDF is image-heavy in the first part of the file? If I go over the MB limitation by even 1 page, I'd have to start over, since cutting out a page won't decrease the file size.

 

Any ideas on this? I can't split in the middle of a page and I must end up with files that are readable in Acrobat.


The AcroPDF.PDF Class is no longer accessible from VisualBasic6 after update 11.0.0.7.

$
0
0

After upgrading to 11.0.0.7 of Acrobat Reader it is no longer possible to get an instance of the AcroPDF.PDF Control in Visual Basic 6

 

Private PDFExt As VBControlExtender

Set PDFExt = Me.Controls.Add("AcroPDF.PDF", "PDF")

 

This worked fine with the 11.0.0.6 Version of the Reader!

 

Is there any solution available?

 

Thanks in advance

Stefan

How to get pdf document file path that is running upon AcroRD32.exe(Adobe 10)

$
0
0

How to get pdf document file path that is running upon AcroRD32.exe(Adobe 10) process,

as win7 opens 2 processes of AcroRD32.exe for all pdf documents so im unable to know

how many pdf documents are running and i want to get the paths of pdf documents that

are running.

VB.net: How to get pdf document file path that is running upon AcroRD32.exe(Adobe 10)

$
0
0

How to get pdf document file path that is running upon AcroRD32.exe(Adobe 10) process,

as win7 opens 2 processes of AcroRD32.exe for all pdf documents so im unable to know

how many pdf documents are running and i want to get the paths of pdf documents that

are running.

I am new to acrobat sdk

$
0
0

.  I have a pdf file. I open it. then I select some lines. how to automatically copy them to a text box.

PDDocSaveWithParams saving files of little to no size

$
0
0

Hi there,

 

From my Reader-Enabled Plugin, I am trying to save a copy of a document to the user's temporary directory using PDDocSaveWithParams

This works fine, about 90% of the time. The other 10% I get either a 0byte file or a file of very small size  (i.e. 275 bytes instead of 81.4kB)

 

This occurs in Reader with Protected mode either on or off. Using PDDocSave returns "An Unimplemented or Obsolete function was called".

 

I am at a loss as to why this happens only every now and then, I have tested on multiple machines with the same result.

 

Code below, saveFilePath points to the users temp directory.

 

ASFile asFile = PDDocGetFile(doc);
ASFileSys fileSys = ASGetDefaultFileSysForPath(ASAtomFromString("Cstring"), saveFilePath);
ASPathName pathName = ASFileSysCreatePathName(fileSys, ASAtomFromString("Cstring"), saveFilePath, NULL);


PDDocVersion* majorP = new PDDocVersion();
PDDocVersion* minorP = new PDDocVersion();
PDDocGetVersion(doc, majorP, minorP);

PDDocSaveParams saveParams = (PDDocSaveParams)malloc(sizeof(PDDocSaveParamsRec));
saveParams->size = sizeof(PDDocSaveParamsRec);
saveParams->major = *majorP;
saveParams->minor = *minorP;
saveParams->mon = NULL;
saveParams->monClientData = NULL;
saveParams->cancelProc = NULL;
saveParams->cancelProcClientData = NULL;
saveParams->preSaveProc = NULL;
saveParams->preSaveProcClientData = NULL;
saveParams->offsetProc = NULL;
saveParams->offsetProcClientData = NULL;
saveParams->preWriteProc = NULL;
saveParams->preWriteProcClientData = NULL;
saveParams->saveFlags = PDSaveFull | PDSaveCopy | PDSaveCollectGarbage;
saveParams->fileSys = fileSys;
saveParams->newPath = pathName;

PDDocSaveWithParams(doc, saveParams);


ASTFilePos newFileSize;
newFileSize = GetFileSize(saveFilePath);
ASFileSysReleasePath(fileSys, pathName);
free(saveParams);
free(majorP);
free(minorP);

VB.net: how to get an event whenever a pdf document is opened

$
0
0

I have to write a service and that service requires an event and that event must trigger when user runs a pdf document. I've no idea how to get those events.

Can not change the overprint preview settings.

$
0
0

I'm developing a plug-in for Adobe Acrobat Pro.

I want to change the overprint-preview setting by the Acrobat plug-in.

 

The trouble is that the plug-in can not change the overprint-preview setting of Acrobat.

acrobat_preference_dlg_eng.png

I tried the following code, the overprint-preview setting was not changed of Acrobat.

 

 AVAppSetPreference(avpShowOverprint, (void *)true);

 

What is not enough for changing the overprint-preview setting?

Please tell me know if there are any necessary processing.

 

【Development environment】

 Software:Adobe Acrobat Pro X

 SDK:Adobe Acrobat X SDK

 OS:Windows 7


Problem compiling sample plugin with Xcode

$
0
0

Hello all,

 

I'm having a problem compiling a sample plugin from the SDK ("BasicPlugin") using Xcode on Mac OS. Xcode's build error is "Unknown type name 'CursHandle'". The error occurs in two source files: AVExpT.h and SafeResources.h. I can't find any header supplied with the Acrobat SDK that defines the CursHandle type.

 

I'm running Mac OS 10.8.4 and Xcode 4.6.3.

 

The SDK documentation said that the SDK was compatible only with Xcode 2.x; elsewhere in the documentation it said it was compatible with Xcode 3.2 or 3.3. Is this the reason for the above error? It's not possible for me to install the older version of Xcode though, because I'm running OX 10.8, and older versions aren't compatible.

 

I'd be very grateful for any help.

 

Paul

convert PDF to XPS

$
0
0

I need to convert a large number of documents from PDF format to XPS format.  I can do this with a vb 2013 program which uses  axAcroPDF.LoadFile and axAcroPDF.printAll, printing to an XPS Document Writer printer.  However, this requires the interactive entry of a file name for each document.

 

Is there a way to automate this, grabbing the name of the PDF document and using it, appending .xps instead of .pdf, for the output document?  If not, do you have a free or inexpensive conversion tool you can suggest, or another approach?

Snippet Runner working in Acrobat, not so much in Reader

$
0
0

Using SDK 11, Snippet Runner sample, Snippet Runner Common Interface Version 3.0, Acrobat X Pro, and Reader XI.

 

Compiled sample code with VS 2010 and can run snippets to my heart's content in Acrobat X Pro.

 

However, when I try to do the same thing with In Reader XI the Snippet Collection panel is empty. There are no error messages, and the SnippetRunnerCookbook.htm panel is loaded.

 

Specifics:

1. The compiled SnippetRunnerServer.api has been copied to C:\Program Files (x86)\Adobe\Reader 11.0\Reader\plug_ins

2. Reader is started prior to launching CommonInterfaceAIR

2. The SnippetRunner path is set to "C:\Program Files (x86)\Adobe\Acrobat XI SDK\Version 1\PluginSupport\Samples\SnippetRunner\"

3. "Enable Protected Mode at startup" and "Enable Enhanced Security" are disabled in the Reader preferences.

 

What am I missing here?

Abort document opening

$
0
0

Hi

 

How to abort (close it or else) the opening of a document in the PDDocDidOpen callback?

 

 

Thaks

Import Data help

$
0
0

I'm working on a document that I need to import data from a spreadsheet. I'm getting hung up on something that seems so simple and I can't find any information on the subject. I'm creating a .pdf that someone will need to import data into from excel. I'm testing this out and the .txt file has multiple rows that need to be input. With the import you can only import one row at a time. I'm fine with that but how do I tell my form fields to accept different rows?

 

Example: I have column A, B and C. Each column has 15 rows. So my document needs these rows to populate as well. I can only imagine I'm doing something wrong here but I've named the form fields A 1, A 2, A 3 and so on and so forth. They are different values so I can't name them the same.

 

Any advice or direction to a solution would be grateful. Thanks you.

AVAnnotHandlerDrawExProc providing the wrong coordinates for Annotations when on a Retina Display

$
0
0

We have an application plugin which generates custom Annotations.  When using a version of Acrobat 11.0.04 to current (11.0.07) our plugin, when run on a Mac with a Retina Display, draws the annotations in the wrong place and with the wrong size.  When using 11.0.0 to 11.0.03 this is not an issue.  I have an example that demonstrates this bug.  I basically modified the Stamper example provided with the AcrobatXi SDK.

 

You can find the example here:

 

Dropbox - Stamper.zip

 

If you run with the plugin and try to stamp you will get white boxes.  So you need to have a non-white background to see the actual boxes.

Can I use the default "signature properties dialog" in DigSig layer?

$
0
0

Hello

I am writing a plug-in about digital signature with the DigSig Layer. I need a  "signature properties dialog" to display info after I verified the signature.

Now my questions :

  1. Can I use the default "signature properties dialog" in DigSig layer, just like PubSec's default "signature properties dialog" ?
  2. If I want to implement my  own "signature properties dialog", what should I do ?


thanks.


Converting pdf to tiff

$
0
0

How can I convert a multiple pages pdf file to a single multiple pages tiff file using Acrobat XI?

Convert PDF to Images

$
0
0

Is it possible to convert a multipage PDF file to multiple images with the option to convert to Colored Image (.png) or Grayscale Image (.tif) using Adobe Acrobat XI SDK in C#.

exception while using acroPDF.PDF Control

$
0
0

Hi,

 

In my solution I use the acroPDF.PDF Control in a windows forms control. My windows forms control is used inside the windows-explorer and inside outlook as a HTML-page.

I distributed the solution on five computer. On three computer it works fine. On two computer I get the following exception.

 

The called method System.Windows.Forms.AxHost.EndInit() throws an System.Runtime.InteropService.COMException (0x80004005) generated by Systems.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(GUID& clsid, Object punkOuter, Int32 context, Guid& iid).

 

What parameters are possible causes for these different behavior an how can I fix the problem.

 

OS: Windows 7 32-bit

Version: Adobe Acrobat Professional X

Browser: IE 11

Outlook 2010

IDE: DOTNET

 

Thanks.

How to Compare 2 PDF's

$
0
0

Hi forum,

 

I am new to Acrobat SDK,

 

I just wanted to know, Is there a way to compare 2 PDF's through SDK scripting,

 

Please guide me,

 

Thanks & Regards

Sathish V.

Extracting bookmark title which includes special characters

$
0
0

Hello,


   I want to get bookmark title which includes special characters like ≠, ≥, ≤, β
   I am not getting correct bookmark title by using PDBookmarkGetTitle();

  I tried to extract using Cosobj method. The code as follows:

  CosObj cosBM =  PDBookmarkGetCosObj(pdBookmark);
CString csNameValue;
CosType cosType = CosObjGetType( cosBM );
    if ( cosType == CosString )
{
  LPSTR objstring = CosStringValue( obj, &asiSize );
  objstring[asiSize] = '\0';
  csNameValue = objstring;
}

The cosType is either CosString or CosName.
  How can I extract bookmark title using cos method. Please help me to solve this issue.

Thanks,

Sow

Viewing all 2571 articles
Browse latest View live


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