How can I implement pdfmyurl as a service?
It’s easy if you know html. The following snippet of html shows how you can make a link of the url you want to pdf:
<a href="http://pdfmyurl.com?url=google.com">A pdf to download</a>
If you copy paste that into your website html editor, then you get (go ahead, try and click it!):
The next example demonstrates the png feature. Pdfmyurl can also make png’s (too cool!):
<a href="http://pdfmyurl.com?url=google.com&--png">A png to download</a>
If you copy paste that into your website html editor, then you get (go ahead, try and click it!):
If your into presenting thumbnails, then this example is for you:
<a href="http://pdfmyurl.com?url=google.com&--thumb">A thumb to download</a>
If you copy paste that into your website html editor, then you get (go ahead, try and click it!):
You can also create the image:
The code for generating the image looks like this:
<img src=”http://pdfmyurl.com?url=google.com&–thumb”>
If you want to set the size of the thumbnail height (the default is 100 pixels, the ratio is preserved) then you can pass the height as a parameter.
<a href=”http://pdfmyurl.com?url=google.com&–thumb=250″>A thumb to download (at 250 pixels height) </a>
If you copy paste that into your website html editor, then you get (go ahead, try and click it!):
More complicated urls (containing ampersands (&) and question marks (?)) need to beĀ url encoded:
<a href="http://pdfmyurl.com?url=http%3A%2F%2Fwww.google.com%2Fsearch%3Frls%3Den%26q%3Dampersand%2Bin%2Burl%26ie%3DUTF-8%26oe%3DUTF-8&--filename=testencode.pdf"> An encoded url download</a>
The actual url (http://www.google.com/search?rls=en&q=url+encoding&ie=UTF-8&oe=UTF-8) was encoded at thisĀ site. Notice that a file name has been defined (see advanced options) with the &–filename=testencode.pdf option set. We added that to get the message across that you can still use all the advanced options. But the ampersands in the actual url needed to be pdf’d are encoded (%26). If you copy paste that into your website html editor, then you get (go ahead, try and click it!):