Trying to get replacement copies of a couple of PDF file on disk 1

Trying to get replacement copies of a couple of PDF file on disk 1

Post by Adrian 'Spotty' Bowle » Sat, 02 Nov 2002 11:37:37



CD Disk 1 was corrupted and a couple of PDF files it can't read for a
reinstall.

MOREFS.PDF
QRC.PDF

Both located in Disk1 \Data\Help folder.

Anyone that can send me these two file - help would be greatly appreciated.

 
 
 

1. Copy and object from a pdf file into another pdf file

I'm writing a plugin copying into an open pdf files (doc1) all the objects
(images, etc.) from another pdf files (doc2).
So far, this is the main procedure (no error checkings to have a more
readable code):

/////////////////////////////////////////////////////////////////////////
//
 char* IMG_PATH = "c:\\Logo1.pdf"; // Logo1.pdf is the doc2 containing the
objects (an image for example)

 ASInt32 numElem; // Number of PDEElents objects into doc2

 //The file into which objects must be copied
 AVDoc avDoc1;
 PDDoc pdDoc1;
 PDPage pdPage1;
 AVPageView avPageView1;
 PDEContent pdeContent1;
 PDEElement pdeElem1[200]; // Just to simplify for the moment I use a fixed
length array of objects

 //The file from which objects must be copied
 ASPathName path2;
 AVDoc avDoc2;
 PDDoc pdDoc2;
 PDPage pdPage2;
 PDEContent pdeContent2;

 // Get doc1 data
 avDoc1 = AVAppGetActiveDoc(); // Get AVDoc of current open file
 pdDoc1 = AVDocGetPDDoc(avDoc1); // Get PDDoc from AVDoc
 pdPage1 = PDDocAcquirePage (pdDoc1, 1); // Get first page
 pdeContent1 = PDPageAcquirePDEContent (pdPage1, gExtensionID); // Get page
content, gExtensionID defined elsewhere

 // Open doc2 and get its data
 path2 = ASFileSysCreatePathName (NULL, ASAtomFromString("Cstring"),
IMG_PATH, 0); // Create a path to load doc2
 avDoc2 = AVDocOpenFromFile(path2, ASGetDefaultFileSys(), NULL); // Open
doc2
 pdDoc2 = AVDocGetPDDoc(avDoc2); // Get PDDOc
 pdPage2 = PDDocAcquirePage (pdDoc2, 0); // Get first page
 pdeContent2 = PDPageAcquirePDEContent (pdPage2, gExtensionID); // Get page
content

 numElem = PDEContentGetNumElems(pdeContent2); // Get num of elems from
doc2's PDEContent

 // Store doc2's elements into an array
 for (int i=0; i<=numElem; i++)
 {
  pdeElem1[i] = PDEContentGetElem(pdeContent2, i);
 }

 // IF I COMPILE AND RUN, TILL HERE EVERYTHING IS OK AND NO ERROR MESSAGES
OR EXCEPTIONS ARISE

 // Add to doc1's PDEContent all the stored elements/objects from the array
 for (int j=0; j<=numElem; j++)
 {
  PDEContentAddElem (pdeContent1, kPDEAfterLast, pdeElem1[i]);
 }

 // AT THIS POINT, IF I COMPILE AND RUN THE EXCEPTION
"peErrWrongPDEObjectType" ARISE and the error message "Incorrect PDEObject
type" is displayed

 // Save changes to the doc1's PDEContent
 PDPageSetPDEContent(pdPage1, gExtensionID);
 PDPageNotifyContentsDidChange (pdPage1);

 // Release all objects
 ...
//
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////

I hope the above makes sense. Could someone help me?
Many thanks.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

2. 3Com C900-Combo and OSR2 : NO GO !

3. Getting a readonly PDF file from a FDF and a PDF file?

4. Astra 1220s: comments/recommendations??

5. How to copy several pdf-files in one pdf-file?

6. HELP!!!!Can't access database.

7. second question: getting downloaded .pdf file saved to hard disk

8. SEND/RECV Problem

9. A PLUGIN to copy an object from a pdf file into another pdf file

10. Getting replacement drivers from floppy disk backup

11. Copy files from disc to disc!

12. Protect disk from getting copied ??

13. Has anyone try to output an AutoCAD *.DWG file to a *.PDF files