Print Page | Close Window

EmbeddedFileCount and RemoveEmbeddedFile

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1899
Printed Date: 24 Apr 24 at 10:21PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: EmbeddedFileCount and RemoveEmbeddedFile
Posted By: Nate
Subject: EmbeddedFileCount and RemoveEmbeddedFile
Date Posted: 26 Jul 11 at 3:26PM
In VB6, I am trying to remove file attachments from a pdf with existing attachments.  When I call EmbeddedFileCount, it will always return a 0 result.  Thus, I can't use RemoveEmbeddedFile for the range of attached files.  Is this a known issue, or is there something that needs to be called/initialized before attempting to get the filecount besides opening the file?  I have pasted just a simple portion of the project below:

Dim QP
Set QP = CreateObject(ClassName)
QP.LoadFromFile (InFileName)

ret = QP.EmbeddedFileCount() ' Returns 0 currently
ret = QP.RemoveEmbeddedFile(0) ' Returns 0 because it sees no attachment in FileCount







Replies:
Posted By: AndrewC
Date Posted: 28 Jul 11 at 1:25PM
The customer has reported back that this is now working.

It could be that the call to QP.UnlockKey() is missing.

Andrew.


Posted By: juan
Date Posted: 13 Sep 18 at 3:09PM
The problem still persists, EmbeddedFileCount does not work correctly, it is always 0.


Posted By: juan
Date Posted: 25 Sep 18 at 3:20PM
this problem still persists, i have no idea how to solve!


Posted By: Ingo
Date Posted: 25 Sep 18 at 9:38PM
Hi Juan,

please post a link to a sample-pdf with embedded files.
Then we can try and check the functionality.
Perhaps we can detect some probs if you post your relevant code here, too.

Cheers and welcome here,
Ingo


-------------
Cheers,
Ingo



Posted By: juan
Date Posted: 26 Sep 18 at 12:00PM
thank you Ingo. Mi code in Delphi is :

PDFLibrary.LoadFromFile('C:\Users\USUARIO\formulario_25_9_o.pdf');
      Label1.Caption := PDFLibrary.EmbeddedFileCount().ToString; // It's allweys  = 0
      hash1.Caption := PDFLibrary.GetEmbeddedFileContentToString(1);

//.EmbeddedFileCount() in Adobe Reader is alweys = 0. But when I attach a file in Adobe Pro DC by the attached panel, ir works. 

In Adobe Reader I implement a custom button like this, and the document are in the panel, but the method cannot EmbeddedFileCount see them:

try { 
    var annot = this.addAnnot({ 
        page: event.target.page,    
        type: "FileAttachment", 
        author: "Form cpce",
        name: "File Attachment",  
        point: [500, 500],  
        contents: "Fecha adjuntado: " + util.printd("yyyy/mm/dd HH:MM:ss", new Date())
    }); 
    annot.cAttachmentPath; 

    var attachmentObj = annot.attachment; 
    if (attachmentObj !== null) { 


attachmentObj.embedDocAsDataObject( attachmentObj.name, this);


thank you so much!!







Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk