Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question of download attachment #2110

Open
zsmatrix62 opened this issue Mar 27, 2024 · 3 comments
Open

question of download attachment #2110

zsmatrix62 opened this issue Mar 27, 2024 · 3 comments

Comments

@zsmatrix62
Copy link

Hi,

Im able to embed the attachments using link tags like:

<link href="att.txt" rel="attachment" title="source" />
<link href="att.zip" rel="attachment" title="source" />

how can i make a link in my html template and then download it from generated pdf? currently when i use a tag with href="att.txt" it always links to local file path not embeded one.

Thanks.

@liZe
Copy link
Member

liZe commented Mar 27, 2024

Hi!

You can do this with <a href="att.txt" rel="attachment">test</a>. It will only work if your PDF reader supports the feature.

@zsmatrix62
Copy link
Author

Im using adobe acrobat reader but below codes does not work, the Download att.txt in my converted pdf is not clicable. ಥ_ಥ

do you have any exmaples of a full script? Thank you very much in advance!

<html>
  <head>
    <link rel="stylesheet" href="styles/sop-doc.css" />
    <link href="att.txt" rel="attachment" title="source" />
    <link href="att.zip" rel="attachment" title="source" />
  </head>
  <body>
    <a href="att.txt" rel="attachment" download="att.txt">Donwload att.txt</a>
</body>
</html>

@liZe
Copy link
Member

liZe commented Apr 25, 2024

Im using adobe acrobat reader but below codes does not work, the Download att.txt in my converted pdf is not clicable. ಥ_ಥ

I don’t have Acrobat Reader, but it works with my PDF reader. Maybe it’s not supported by Adobe Reader. Do you have another PDF that works with Adobe Reader?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants