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!
![]() |
How to enbed file not as attachment |
Post Reply ![]() |
Author | |
waynefulcher ![]() Senior Member ![]() ![]() Joined: 23 Jun 08 Location: United States Status: Offline Points: 99 |
![]() ![]() ![]() ![]() ![]() Posted: 09 Aug 11 at 4:53PM |
I want to embed 1 or more files to a PDF. But for all intentional purposes I dont want any access to these files from any viewer of the PDF. I tried using the AddEmbeddedFile() method since that does not create a link or make it available as an attachment. However once I save the file and reopen it I don't know how to get to the file I embedded. I had planned to use GetEmbeddedFileContentToFile() method but it appears it and all other methods will only work for files that are listed as file attachments.
Can someone tell me what method I can use to get back to the embedded file when not linked or listed as an attachment?
As a secondary question (assuming this is possible in the first place) if I can add an embedded file and I want to zip the file to be embedded before embedding it then what MIME Type would I need to use?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Wayne!
Why not use EmbeddedFileCount ... then do the loop ... then using GetEmbeddedFileContentToFile ... or something similar? Here are all Add.../Embed.../Remove...functionalities: http://www.quickpdflibrary.com/help/quickpdf/DocumentProperties.php Cheers, Ingo |
|
![]() |
|
waynefulcher ![]() Senior Member ![]() ![]() Joined: 23 Jun 08 Location: United States Status: Offline Points: 99 |
![]() ![]() ![]() ![]() ![]() |
Well if I add a file using the AddEmbeddedFile() method then EmbeddedFileCount will always return zero (0). This would be the correct return value according to the QPL documentation as it states:
" Returns the number of embedded files in the document. This total only includes embedded files that are listed as file attachments... "
So as far as I can tell if you ever call AddEmbeddedFile() and NOT call AddFileAttachment() then the file that was embedded can never be retrieved unless there is a method to get an embedded file passing an Index which refers to "all" embeded files whether listed as an attachment or not. Right now I dont see any method for this which really is starting to sound like a short coming of the QPL. I am thinking this may need to be requested as a new feature to be added. Else as I said, the whole AddEmbeddedFile method is pretty much useless.
|
|
![]() |
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