Is there any way to access metadata of PDF file I embedded using pdfobject.js? I would like to replace/change its title because it's not corresponding to its filename. example is the snip below. filename of that is 'D1000SPN.pdf' which is different from the title displaying.
I tried to search but found none. However, since I can't find a solution to that. I decided to just not display the PDF title on its toolbar anymore or hide it.
I'm a newbie so please bare with me.
sample image
Check the section https://pdfobject.com/#the-why
Specifically, where it says "What PDFObject doesn't do".
In a nutshell:
"PDFObject does not provide the ability to customize the look and feel of the PDF toolbar."
Why?
"PDFObject is not a rendering engine. PDFObject just writes an element to the page, and relies on the browser or browser plugins to render the PDF."
It continues elaborating...
"If you really need to customize the toolbar, try forking Mozilla's PDF.js and customizing it to suit your needs."
But maybe there is hope...
"Some of these browsers provide the ability to show or hide the toolbar, or a feature such as the search field, via PDF Open Parmeters".
See the image below:
I tried it on Chrome and worked for me.
Good luck.
Related
I am trying to add an image on my canvas using pdfJS, but i am getting an error
"Invalid PDF structure"
Can pdfJS add images like pdfs?
My code:
https://gist.github.com/kamil161g/0a4c5b6eec3f42a3c13877110b6268b4
Welcome to StackOverflow, Kamil Gąsior.
In future questions, please add example source codes directly to your question, and don't link to it.
Assuming you are refering to this pdf.js: https://mozilla.github.io/pdf.js/
The page clearly states "A general-purpose, web standards-based platform for parsing and rendering PDFs.". This would imply: "no". This is also consistent with the error message you're getting.
I want to embed a PDF on my webpage that has text I would like to be searchable. Using iframe method does not seem to work (when I click inside the window, ctrl F does not let me search for it.) What is the best way for me to embed the PDF (multiple pages) so that I can search text within the PDF? Can it be done with HTMl5? Or is there some library?
I've tried the techniques on this page:
https://pdfobject.com/static.html
I an unable to find and match the text with Ctrl+F when I open up the website in any webbrowser on any of the PDFs. The Ctrl+F appears to only work with HTML text. Please help!
is find() what you're looking for? Please read: this SO question
Edit
Mousetrap is a library that allow you to assign shortcuts, May be it's possible to search documents using Mousetrap you might want to try Mousetrap.js project site, github and this site has some examples and maybe it's possible to find text in documents or search documents for text. Please try and read their information..
End edit
You can't do a search in PDF files with html only, you will need other technologies however you can embed a lot of file types with <embed> and display them on your pages using object, embed or frames.. if you want to search text in PDF documents, it would be better to use a php extension that is able to help you out
I hope it's helpful to you
I need a super-simple file manager (preferably in classic asp but not a deal breaker) that I can add to Tiny MCE v3.
It doesn't need to upload, show images or other media, just documents such as .pdf, .doc, etc.
I just need to allow the user to click a browse button beside a the link input box which will open the file browser window to the specified folder (always the same one), click the required file, the details of which will populate the input box.
I've seen a few as recommended elsewhere on Stack but these are either image/media only or I'm not bright enough to make them work properly.
Thanks in advance.
I forgot to update this question.
I found a TinyMCE/CKEditor plugin that really did the trick. It's called (surprisingly) PDW File Browser for TinyMCE and CKEditor and can be found at http://sourceforge.net/projects/pdwfilebrowser/.
It has a good range of different features and is really easy to modify (it has to be because it's me doing the modifications).
Definitely worth checking out.
I'm a member in a website and there's a huge (automatically generated) HTML table on this PHP page that is only available to me and I wanted the table source code because I want to copy it to a HTML page on my computer to then process it with a program.
The problem is that when I right-click to display the page source code it works. However, I'm tired of looking at the source code and inside all the linked JavaScript files. I can't seem to find the table or any data of it on the scripts/page source codes.
I can select the table data and copy it, but it is just the data. It doesn't say anything about flash, so I'm assuming it's not flash. The data of the scripts/pages isn't obfuscated, it's easily human-readable.
I used Google Chrome's 'inspect element' and it worked.
I was thinking on doing a PHP script that would import data from a similar table, but I will have to know more about a lot of stuff mentioned here.
What can I be doing wrong or what can cause this kind of behavior?
Two possible reasons could be that the table may be returned from an AJAX call to another page that returns the HTML for the table, or they could be generating the table's html code and contents on the fly from a list of values coming from javascript or some other source rather than serving the HTML output to you from the server side.
Something you can do to figure it out is see if there are any empty div or other html elements where the table appears to be inserted, and search their javascript files for references to those elements. That may shed some light on how they populate it.
Feel free to update your question with the raw html (where you don't see the table) and maybe some javascript and we can look. Use pastebin if it is a lot of content.
Would it help to use the Firefox plugin called Firebug?
Using this plugin you can click on an area of a page to see the code displayed in the Firebug section at the bottom of your window.
Here are the details: https://getfirebug.com/whatisfirebug
Maybe the table is generated with a JS script, if that's the case, doing right click and "View source" would not show you the html. You need to use something like Chrome's devtools. Open google chrome and visit that page, once there, right click the table and select "Inspect element", the devtools will open and then you'll see the table's code, right click it's opening tag and select "Copy as html".
Let me know if that works :)
Try a developer extension like http://getfirebug.com/ The underlying source code may not reflect output due to how much the DOM can be modified by javascript with extensive use of ajax. This plugin will permit you to view elements as they're interacting with the browser.
its probably that the table is dynamically generated on the fly so looking at the source code won't actually give you much. try looking at the "GENERATED" source code or inspecting the DOM using Firebug, or the Developer tools of chrome/safari.
Or better yet, try your hand at web scraping:
http://vancouverdata.blogspot.com/2011/02/how-to-web-scraping-xpath-html-google.html
Although I'm not sure if it'll work for pages that need a login. But hey, at least you learned something new :p
My webapp uses both Rails and JS and I would like users to be able to embed the images they upload to any blog/site.
What do I need to know, from a development point-of-view to allow me to create the functionality that generates an 'embed' link. It can be either a link like YouTube does, or a JS snippet or anything.
Just want to get a high-level overview of what I need to be able to do and how to proceed.
Thanks.
I would try using iframe. I created a widget which used javascript and I put it all into a single html file hosted on my website. Then I gave away an iframe snippet like this for example...
<iframe src="http://mywesbite.com/myWidget.html"></iframe>
The user can simply place the iframe snippet into their website and that's it!
I'm a little bit late to the party here, but I just wanted to add to Jacob's answer.
You can easily allow the user to customize the embedded content (perhaps choose light on dark vs. dark on light text to more closely match the page's environment/design) by using query params within the iframe src:
<iframe src="http://___.com/widget?theme=light&size=large"></iframe>
of course you'd probably want to build a UI to allow the user to make these distinct changes... you can't expect average user's to do that by hand:)
Vimeo's UI for customizing embedded videos is pretty nice if you want a best case scenario.