Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

One dynamic PDF for multiple websites

New Here ,
Oct 17, 2018 Oct 17, 2018

Hi,

I am wondering if it is possible to have one pdf file that can be linked from multiple websites but the urls and some data inside the pdf would be automatically changed to the domain it is on.

So I would like to manage only 1 pdf file and this one file would be linked on different websites.

When a user opens the document, the pdf checks the domain that the user is on and the website specific information (name, logo, address, etc) get dynamically inserted into this pdf,

I do not want to maintain multiple pdf files or have to have multiple pdf's.

Ive tried searching for tutorials or scripts but cannot seem to find a solution like this.

Thanks in advance for any help you can provide, it is truly appreciated.

Terry

644
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 17, 2018 Oct 17, 2018

I don't believe PDF was never designed to do that. PDF doesn't "do dynamic" without JavaScript. It certainly can't be done in InDesign. You could ask in the Javascript forum in Acrobat whether it's scriptable:

JavaScript

You may need to do it a different way. I'm not a programmer but it probably should be done with HTML and JavaScript, I'm guessing.

Translate
Community Expert ,
Oct 17, 2018 Oct 17, 2018

I don't believe PDF was never designed to do that. PDF doesn't "do dynamic" without JavaScript. It certainly can't be done in InDesign. You could ask in the Javascript forum in Acrobat whether it's scriptable:

JavaScript

You may need to do it a different way. I'm not a programmer but it probably should be done with HTML and JavaScript, I'm guessing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2018 Oct 17, 2018

Thanks Steve. I'll look into that. Appreciate your feedback.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2018 Oct 17, 2018

terryhelliker  wrote

I am wondering if it is possible to have one pdf file that can be linked from multiple websites but the urls and some data inside the pdf would be automatically changed to the domain it is on.

[…]

Ive tried searching for tutorials or scripts but cannot seem to find a solution like this.

Because that is not how a PDF works.

It's no different from an image -- or, even more so, actually any random file on a web server. There are only very few file "types" that do what you imagine could be done with a tutorial; and they involve running a program on the web server, or a JavaScript at the user's end. In both cases the file itself does not "know" where it is stored -- files just don't do that.

(This suggests that it could be done. I imagine theoretically it can be, but the problems to solve outweigh the possible gains by far. Feel free to borrow my idea and be the first to create such a service.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2018 Oct 17, 2018

Thanks Jongware.

i will definately look into it. I really do not have the time to manage all these pdf files across multiple domains, so finding a solution for this is on my priority list.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 22, 2018 Oct 22, 2018
LATEST

HI,

Just to add my 2 cents.

Using a single PDF could be done, and the easiest way would probably to use Optional Content Groups (OCG), however, it would require JavaScript in the PDF and someway to work out which website it was downloaded from. This could probably be done on the server when the file is requested, by changing the metadata of the PDF file, this probably doesn't require any major library on the server, as depending on how the PDF was created, the metadata should be plan text somewhere in the file.

Then on open of the document a JavaScript is run which checks the metadata for which website downloaded it, then this shows the correct layer.

We could control other items other than OCG's, that just seems the easiest to me, but then I haven't seen the PDF file.

Hope this helps.

Malcolm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines