u-fischer / newpax

12 stars 3 forks source link

MS Word-generated PDF files handling #24

Closed lelaus closed 11 months ago

lelaus commented 1 year ago

An issue seems to arise when dealing with PDF files generated with MS-Word (Microsoft 365 Suite). The hyperlink within the original PDF document seems not handled in the right way: after including the MS-Word-originated PDF file by means of includepdf command within LaTeX, the original links are present, but they link to the top of the specific page and not to the correct element. Any solution and/or workaround?

u-fischer commented 1 year ago

Always provide a small but complete example that can be used for a test. Be aware that I don't have MS-word and can't create suitable test documents even if I wanted to spent my time to do that.

lelaus commented 1 year ago

Yes, you are right! Here you can find attached the "test.zip" file containing the following files:

  1. "test.docx" ==> the original MS-Word file, where a link to a figure is inserted
  2. "test.pdf" ==> the corresponding PDF file, where the same link is working correctly
  3. "newpax_generator.tex" ==> the newpax file handling the link of the previous PDF file
  4. "final.tex" ==> tex file where the "test.pdf" file is included;
  5. "final.pdf" ==> the final PDF file, obtained by running pdflatex on final.tex: here the "Figure 1" does not link to the image, but to the top of the page. Thanks for your help!

test.zip

u-fischer commented 11 months ago

I have uploaded a new version that should fix this (/Dest wasn't handled at all yet).

lelaus commented 11 months ago

Issue solved! MS-Word-originated PDF files are now managed correctly! Thanks a lot!