Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
EmbeddedFileCount and RemoveEmbeddedFile |
Post Reply ![]() |
Author | |
Nate ![]() Beginner ![]() Joined: 26 Jul 11 Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
The customer has reported back that this is now working.
It could be that the call to QP.UnlockKey() is missing. Andrew.
|
|
![]() |
|
juan ![]() Beginner ![]() ![]() Joined: 13 Sep 18 Location: santa fe Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
The problem still persists, EmbeddedFileCount does not work correctly, it is always 0.
|
|
![]() |
|
juan ![]() Beginner ![]() ![]() Joined: 13 Sep 18 Location: santa fe Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
this problem still persists, i have no idea how to solve!
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3524 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
juan ![]() Beginner ![]() ![]() Joined: 13 Sep 18 Location: santa fe Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
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!! |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store