Advertisement

01.23.2008 at 04:12PM PST, ID: 23106338 | Points: 500
[x]
Attachment Details

PHP code to display a PDF attachment

Tags: Salesforce.com, Salesforce.com, API
We are using PDF attachments and I'm looking for a way to display an attachment using the APIs. Do you have a working code in PHP that displays a PDF attachment on a web page?

Thanks.
Start your free trial to view this solution
Question Stats
Zone: Database
Question Asked By: code4funX
Question Asked On: 01.23.2008
Participating Experts: 2
Points: 500
Views: 0
Translate:
Loading Advertisement...
01.24.2008 at 07:40AM PST, ID: 20733963

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2008 at 11:36AM PST, ID: 20736481

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.25.2008 at 07:27AM PST, ID: 20743209

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.28.2008 at 10:56PM PST, ID: 20765882

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.29.2008 at 07:08AM PST, ID: 20768300

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.29.2008 at 10:03AM PST, ID: 20770383

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.03.2008 at 11:42AM PST, ID: 21034912

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
01.24.2008 at 07:40AM PST, ID: 20733963

Rank: Guru

http://view.samurajdata.se/ may be your best bet.  
 
01.24.2008 at 11:36AM PST, ID: 20736481
To clarify, I'm looking for a PHP code snippet that retrieves a PDF attached of a Sales Force record and displays it in the user's browser.

 
01.25.2008 at 07:27AM PST, ID: 20743209

Rank: Guru

Hi code4funx...the link I provided was a php script that would be able to read a pdf into the page...however I haven't tested it.  I've also never pulled data from salesforce into a php application but there is an API that will enable you to interact with SF.  The link is:

http://wiki.apexdevnet.com/index.php/API

I'm sure a look through their documentation will enable you to retrieve the pdf from the record, and then present it either through the other scripts I provided, or a link to open it.  Remember, relying on a users browser may not be the right way to approach this as each user has preferences they can setup to either open the pdf in the acrobat reader window, inline in a browser or save.  Hope this helps.
 
01.28.2008 at 10:56PM PST, ID: 20765882
Hi ingwa.  Reading a PDF file into a page is not what I'm trying to do.  I understand it can be useful in some cases, but this is not what I asked.

Yes, there is an API call that retrieves an attachment.  I asked for a working code snippet to save me the time that I would need for researching and testing my own code.  I thought that somebody must have used it at some point.  Well, it looks like I'll be the first :)
 
01.29.2008 at 07:08AM PST, ID: 20768300

Rank: Guru

Hi Code4fun, unfortunately I wouldn't have the code example as this was the first time I found out that there was an api for SF.  In the mean time Good luck with your project and sorry I wasn't able to assist.  Perhaps there may be other experts available out there that may have done this so leave the q open for a week or so.  You may also want to contact one of the advisors (http://www.experts-exchange.com/contactZoneAdvisor.jsp) and see whether they can notify any of their contacts to review this question.
 
01.29.2008 at 10:03AM PST, ID: 20770383
Hi ingwa, thanks for trying to help me.  I guess the question was too obscure, or there just aren't too many salesforce coders here.
 
03.03.2008 at 11:42AM PST, ID: 21034912
PHP is really not my cup of tea but I prob. can give you some direction to think about:

-Have you get your PHP Toolkit for Salesforce installed and running?  that'd be the first step to get this work.

-Once you have that ready, try doing something like
$conn = new SforceEnterpriseClient();
$conn->createConnection(BASEDIR.'/enterprise.wsdl.xml');
$mylogin = $conn->login(username@domain.com", "changeme");
$query = 'SELECT Name from Account limit 5';
$response = $conn->query(($query));

-Next step is to look at what specific API call is needed to access attachment.  I expect it to be something returning an object or base64 binary string of some sort.  I have no idea on the details as I never looked.  But you should be able to find it in the force.com API docs.

Hope this helps.
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628