danfickle / danfickle/openhtmltopdf
Issue with embedded file attachments
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 423
- PR merge metrics
- No merged PRs in 30d
Description
I have implemented a "custom resource access controller" as described on https://github.com/danfickle/openhtmltopdf/wiki/Embedding-downloadable-files#java
My HTML looks like this:
```html
Some attachment link
```
The resulting PDF contains
```
65 0 obj
<<
/Type /Filespec
/EF 109 0 R
/F (Some_attachment.docx)
/UF (Some_attachment.docx)
/AFRelationship /Source
/Desc (Some attachment.docx)
>>
endobj
```
The attachment link in the document works, but my PDF viewer (Xreader 3.6.6) does not show the proper filename in the "annotations" panel. It only shows "(null)". The "attachments" panel is empty.

I have tried different values for the `download`, `data-content-type` and `relationship`, but did not succeed.
I have read through the code at https://github.com/danfickle/openhtmltopdf/blob/780ba564839f1ad5abfa5df12e4aebb9dd6782d2/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxFastLinkManager.java#L301-L381 but didn't find anything.
Any ideas about what I am doing wrong?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.