Print Page | Close Window

How to enbed file not as attachment

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=1916
Printed Date: 06 May 25 at 9:36AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to enbed file not as attachment
Posted By: waynefulcher
Subject: How to enbed file not as attachment
Date 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?
 



Replies:
Posted By: Ingo
Date Posted: 09 Aug 11 at 7:49PM
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



Posted By: waynefulcher
Date Posted: 09 Aug 11 at 7:58PM
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.
 
 



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