jhim's avatar
Level 1

pdf

hi, i can upload pdf to my website is there a way for me to access and view them? specifically display the individual pages? im currently working on website that stores or compiles books by uploading images of their pages and i can only do upload image one by one. is there a way?

0 likes
4 replies
programators's avatar

Hello, Yes you can. check your server configuration if it comes MAX_FILE_SIZE and send right header information .

check readfile function in terms of pdf viewer.

<?php
// We'll be outputting a PDF
header('Content-Type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>
1 like
jhim's avatar
Level 1

hi, i appreciated your help. but i think i didnt explain well. i have this program that displays images like a book and it works just by loop and calling the images one by one im wondering if instead of images, i can upload a pdf(that has many pages, so i can avoid uploading images one by one)

Then the each of the pages will serve as images that will be called in each page of the book thingy. again, thank you.

Sinnbeck's avatar

@jhim that would require you to write a tool that can extract the images from the pdf. Or wrote your own custom pdf reader.

Stick to images and use something like turn js to make it look good http://www.turnjs.com/#

Please or to participate in this conversation.