Hyperlink in latex - pdf

How can I shorten a URL in hypertext in latex
for example
that's my URL https://www.linkedin.com/in/hassan-bosha-8178611b9/
and I want to shorten it into Hassan Bosha
I'm using
\linkedin{Hassan Bosha}
to make a hypertext with the LinkedIn logo
How can I shorten it?

Related

Downloading PDFs without the link or .pdf extension specified in the href tag

I want to download PDFs from a website https://www.mca.gov.in/content/mca/global/en/data-and-reports/reports/monthly-information-bulletin.html which does not show the link or .pdf extension in the href tag clearly. I have loacted the tag which has the link but i am unalbe to figure out the code
for link in soup.select("a[href$='.pdf']"):
#try printing all pdf urls from the page
print (link)
How can I download these PDFs by changing these codes? Please suggest different codes if any. Thank you
I tried using the # which is mentioned in the href tag in this code
for link in soup.select("a[href$='.pdf']"):
#try printing all pdf urls from the page
print (link)
But the PDFs were not downloaded

how I can get full URL of images when using getPageHTML of dokuwiki xmlrpc api

I want to embed the HTML content of a dokuWiki page inside another web application. The content should be shown as a tooltip popup. But when I use the 'wiki.getPageHTML' api method to get the content, embedded images dont have the full path in their tag.
Like: <img src="/mywiki/lib/exe/fetch.....">
Is it possible to get the full image path in HTML code?
E.g.: <img src="https://testwiki.com/mywiki/lib/exe/fetch....">
This option do the job: https://www.dokuwiki.org/config:canonical
thx for andi who answered my question here.

Salesforce - PDF generation with Arabic and English text

I am trying to generate a PDF with both English and Arabic text. Please let me know if it can be done using salesforce and what should be the approach.
Visualforce page or email template has <apex:page renderAs="pdf"> attribute. Your safest choice of font will be "Arial Unicode MS", it's the only font with full unicode support. BUT it doesn't have bold variant so all your <b>, <th> etc will print with normal font weight.
If you need a different font / want to experiment - use this as base: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_supported_fonts.htm
Apex has similar method to pull another page (standard SF page or Visualforce) as PDF. But it'll be server-side generation, JavaScript on that page will not run so forget about some pretty printing of say aura components. Back to basics, raw HTML / Visualforce. PageReference.getContentAsPDF()
If it's not acceptable to you - there are some JavaScript PDF generators, for example jspdf (Git, demos) describes in Git readme how to integrate a custom font into it. These tend to be hit and miss, you'll have to experiment. And well, it'd be a JavaScript solution so then you'd need extra steps to save it to a file maybe or prompt download... And forget about making a VF email template with it, it'd have to be somehow saved to files/attachments first

How do I render a PDF from HTML with working named anchors?

Is there a way for a bunch of named anchors in a large html to be clickable within a PhantomJs generated PDF file?
I.e. say I have a table of contents or a list of FAQ questions. When clicking on the question/title - I'm taken to its answer/content within the same HTML file which is great but when the same HTML is rendered into a PDF each named anchor becomes an absolute URL (i.e. http://example.com/render.html#anchor_1) so clicking on it opens a browser with that URL instead of jumping to its content within the PDF file.
So, basically, is it possible (and how?) for a markup like this - https://fiddle.jshell.net/jyjuaaog/ to work within the generated PDF?
BTW, this works great when "printing as a PDF file" in Google Chrome but links end up broken when rendered in PhantomJs so there must be something I'm missing that I can't seem to find in the docs.
Any ideas?
Thanks!
Apparently there's a bug in PhantomJs preventing this. As suggested by PhantomJsCloud a quick-and-dirty workaround would be to replace the links with page links.

Changing the behavior of YouTube API generated links

My goal is to display YouTube search results in my website based on a keywords search (e.g through YouTube API or GoogleCustomSearch using youtube.com), but change it so when you click on the link - instead of redirecting you to the youtube video page, it will get the link's URL and transfer it to a PHP file as a variable.
You can read the result page with a CURL command, and use regular expressions to change the link urls to a link to your own link, wrapping the target url.
Something like this :
http://www.youtube.com/watch?v=XJ87Lsx40PI
turn it into :
http://yoursite.com/youtube.php?XJ87Lsx40PI