Dynamic web page convertible to PDF - pdf

I'm thinking about writing a professional CV page that would be easy to update, using a simple backend to add informations and blocks of optional details, and... (feature creap coming)
Anyway, I was thinking of a "simple" web page grpahically, that would easily be convertible to PDF file, using browser functionallity or not.
Assuming that the page have blocks of text that you must ckick a button to see (those are optional details), what should I know or what tools should I use to write this web page?
I'm totally rusted on web code, I used php without ajax a lot before but I understand the idea. I was thinking maybe it would be a good opportunity to try a framework to make a "webapp", like Ruby+ROR or Python+Django? Is that a good idea? I'm ready to learn about those, I'm just not sure if it's worth for such project.
Should I know some things about html code or javascript behaviour that I shouldn't use because it would break any PDF generation tool or something like that?
Any advice on the way to proceed would be helpful.

You'll want to read up on how to create a print stylesheet. This way when you go to print the CV you can choose something like CutePDF Writer and your print stylesheet will automatically be used. You will make your stylesheet show all hidden text blocks and hide things like navigation, buttons, etc.
I can't tell you whether or not it's worth it for you to try a new framework for this project, that's up to you. It's not bad to learn new things. Since I don't know all the details of your project it's hard to answer if it's worth it for this particular project. From your description is sounds like you're just making an HTML resume/CV which sound, to me, like one flat HTML page with some JavaScript. If that's the case you could probably just use a text editor.
If you want my personal opinion, ASP.Net 4 is the way to go if you want to learn something new (or if you just want to use a great framework).
As far as breaking the PDF generation, your print stylesheet will be responsible for showing/hiding things but any JavaScripts should be aware of this as well. Check the link I gave you above for more information.

Related

Tool or library to format any code to be displayed in HTML

As the title says. I need some tool, library or workaround which can take a code file i.e., JS, Python, C# etc and make that code displayable in HTML page.
Kind of like what GitHub do when someone tries to open a code in project.
It would be nice if there is some Python implementation for this. But others like nodejs, php, or plain js will do as well.
Any kind of help would be appreciated. Thanks!
EDIT:
Since, it's not allowed to get recommendation regarding libraries, I will add what I have attempted. So far I have been thinking only vital part while displaying the code will be to retain white spaces. So probably replace these with probably. But I'm sure there are better solutions out there. And that's exactly what I am here for.

How to generate and scan barcodes with aurelia?

I have a webpage that needs to be able to generate and later read barcodes. But i cannot seem to find any small scale addon to aurelia that does even one of these. Is there any libary that does this or do i have to write my own somehow? Or can i somehow use some preexisting barcode stuff that is not directly designed for aurelia?
looks like you have to find a suitable library for the task on npm.
For barcode generation, you can use this test app:
https://codesandbox.io/embed/barcodes-bxgf1
Be sure to adapt to your own bundling choice.
I used quaggaJS in my aurelia app for reading existing bar codes.
(it's actually just a regular JS package - not specially for aurelia)
the API is kind of old (callbacks instead of promises), and overall it's a little weird (the Initialization process), but in the end it works great with little effort.
you can use https://www.npmjs.com/package/qr-scanner only draw back is that your website need to be https.

How does Safari's reader feature work?

I want to add a similar feature to a tool I'm making. I'm interested in how it works code-wise. I want to be able get an html page and exclude all but the article.
The Readability project does something similar for chrome and iOS. I'm not sure how it detects the content automatically but I know that Readability has an API for people who want to integrate it's features. You might want to check that out.
http://www.readability.com/learn-more
If you're working with Ruby, you could use Pismo. It extracts an article from a given document.

What Rich text editor should I use for a custom CMS

I want to build a custom CMS where users a Rich text editor is the main way to create content rather than wiki markup.
Besides stability and performance, I want the RTE to be easily extensible. The latter point is very important because I intend to extend it to my needs.
For example I want the users to be able to embed OpenSocial gadgets and whiteboard (based on canvas) into the page. I also the want the users to embed media source like (youtube, slideshare etc).
My preliminary investigation shows that Dojo's (dijit) RTE and TinyMCE are pretty good. How would you compare the two in terms of stability, performance and extensibility. Any other RTE's I should be looking at that fit the bill?
PS: I am using dojo as the main js library.
Hava a look here (blog post with some very helpfull informations).
My own opinion is that there are two free available rtes that are close to each other in comparison. Those are CKEditor and Tinymce. My experience lies on the tinymce side and i can say that the extensibility using own plugins is great with it. Some independent tests have shown that tinymce seems to be more adavanced than CKEditor, others claim CKEditor is better. You will have to decide on your own (development is advancing further each day and new functionality has been developed since those tests).
You may also have a look here for comparisons and discussions:
http://verens.com/2007/09/27/fckeditor-vs-tinymce-vs-everything-else/
http://verens.com/2007/09/27/fckeditor-vs-tinymce-vs-everything-else/
http://www.mediacurrent.com/blog/wysiwyg-shootout-and-winner

dynamic content - where do i start?

I have a rather simple question. I want to dynamically change the content of a based on the selection of a drop down menu. The drop down menu is populated by a php loop that gets data from a mysql database. So far, I'm only familiar with php and html/css.
I don't really know where to start, or more specifically, what technologies I should be researching. So far, I've heard AJAX, JQuery, JavaScript, NOLOH, HTML iframes, pure CSS, etc. I really just want to know where to look!
Start off with the basics: HTML (if you're feeling adventurous, you could try HTML5) and CSS.
After your comfortable with that, you can start getting a little more complex and pick up JavaScript. This is how the majority of the 'dynamic' bits of web pages are accomplished so learn it well.
Once you've got the JavaScript basics down, you can learn how to use JavaScript to manipulate the DOM (Document Object Model) and make AJAX requests back to the server to get new content to insert.