function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rpatacarpataca 

PHP to display a PDF attachment

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.
Tran ManTran Man
Can you clarify your question?  I don't think that displaying PDFs inline in a browser has anything to do with the API.  The API is used to retrieve the attachment.
rpatacarpataca
Sorry if my question wasn't very clear. No I'm not looking for a way to display a PDF inline. I know there are tools for doing that, but that's not what I'm looking for. What I would like to find is a working PHP code snippet that retrieves a PDF attachment. I understand there's an API call, and I want to save myself some development/testing time in case somebody has already done it. Here's an example. We have a Movie record with several PDF attachments that contain reviews from different newspapers. I want the user to click on a link and read one of the reviews. Again, I don't care how the browser treats the PDF document, as long as the user can either read or download it. Thanks.