Jump to content

Recommended Posts

I am kind of new to PHP, and have come upon a task. We have a large (400 page+) PDF manual with product information listed. We have an ecom website, that offers descriptions, but we would like to link to the very detailed info if they want it. If i was using HTML i would anchor and call the anchor so they can just see the part they need. But 400 pages seems like too many. I would rather have them click the link and only be presented the information that is relevant. Is there a way to put in some sort of anchor in PHP, that will, on call of the page, only display the part that is needed.

Here is my example (very very rough and wrong syntax and wrong code):

sku 7145

page.php:
(anchor 7144)Item 7144
INFO INFO INFO

(end anchor of some sort)

(anchor 7145)Item 7145
This is the information that i need
(end anchor)

Now onc all of page.php?7145 (this is just an example) it would only display:
Item 7145
This is the information that i need.

I know im probably really far off base, but that is what i was looking for. I can comvert the pdf to text then make it php.

Any insight would be greatly appretiated.
Thanks,
Kruz
Link to comment
https://forums.phpfreaks.com/topic/8584-how-to-anchor/
Share on other sites

I do not know the answer but....

Pdf's created from a word processor that allows internal hyperlinks may be able to do what you are asking. If you use word to generate the table of contents automatically from header tags then any pdf created is capable of mimicing these hyperlinks. This is similar to the document tree that you can view in word.

Now I haven't tried it but it may be worth you looking into...

Alternatively you could use php to extract all the info from teh pdf and create html or even a database to serve the info from...

For you information - since php can create pdf's it may be desirable to have the catalouge in a database, serve up generated html through php and then get php to create the full pdf document should you need it (image it woudl be a damn site cheaper than your printing company!!! ;) )
Link to comment
https://forums.phpfreaks.com/topic/8584-how-to-anchor/#findComment-31472
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.