I was wondering if the following is possible. I want to write an report writing tool. So the idea is that some one fills the blanks, adds the information in some sort of simple text editor, they press a button and presto! A report with proper headings and a uniform standard is generated. However there is one problem that I need to solve before I dive into this. The tool must allow the inclusion of other pdf files, and from what I've been reading this is not possible. Here is an Example of what I want:
Some rich text.
Annex I
datasheet.pdf
Some more reach text.
What I want is for the datasheet.pdf to be inserted as is a that approximately that point in the final pdf file (so page numbering and so on can be consistent). Is this possible? If so any idea how?
Thanks for any answers!
As ddriver mentioned, Qt doesn't directly support opening PDF files for editing purposes. Here is a useful link which discusses various available options for working with PDFs in Qt.
Related
I am new to the PDF generation but have a project to do. In my project the user should be able to create PDF documents. I have searched a lot a found sites/tutorials on creating PDF documents using itextsharp. But they have shown examples of creating simple PDF documents i.e. hello world.
What I want is blank editor(for that am using ckeditor) and user write data into that blank editor and when user clicks on save button file should get saved in PDf format. How can I do so?
This can help you as PDFSharp provides more function for PDF
PDF samples
This could get tricky if you want to preserve all the formatting that was entered into CKEditor.
From my experience the two best PDF generation libraries are iTextSharp and syncfusion. Of the two I feel syncfusion can be easier to work with.
Basically what you'll want to do is parse your HTML and generate a similar PDF structure. Both iText and syncfusion can go straight from HTML to PDF, but if your html has an odd layout you might have to form up the PDF by hand (Using PdpPTables, Paragraph objects ect).
I need to collect data from a visitor in an HTML form and then have them print a document with the appropriate fields pre-populated. They'll need to have a couple of signatures on the document, so it has to be printed.
The paper form already exists, so one idea was to scan it in, with nothing filled out, as an image. I would then have the HTML form data print out using CSS for positioning and using the blank scanned form as a background image.
A better option, I would think, would be to automatically generate the PDF with this data, but I'm not sure how to accomplish either.
Suggestions and ideas would be greatly appreciated! =)
I would have to respectfully disagree with Osvaldo. Using CSS to align on a printed document would take ages to do efficiently in the aspect of cross-browser integration. Plus, if Microsoft comes out with a new browser, you're going to have to constantly update for the new use in browsers.
If you know any PHP (Which, if you know JavaScript and HTML, basic PHP is very simple), here's a good library you can use, FDPF:
Thankfully, PHP doesn't deprecate a whole lot of methods and the total code is less than 10 lines if you have to go in and change things around.
You can control printed documents acceptably well with CSS, so I would suggest you to try that option first. Because it's easier.
This is actually a great php library for converting HTML to PDF documents http://code.google.com/p/dompdf/ there are many demo's available on the site
XSL-FO is what I would recommend. XSL-FO (along with XSLT and XPath) is a sub-standard of XSL that was designed to be an abstract representation of a formatted document (that contains, text, graphic elements, fonts, styles, etc).
XSL-FO documents are valid xml documents, and there exist tools and apis that allow you to convert an XSL-FO documet to MS Word, PDF, RTF, etc. Depending on the technology you use, a quick google search will tell you what is available.
Here are a few links to help you get started with XSL-FO:
http://en.wikipedia.org/wiki/XSL_Formatting_Objects
http://www.w3schools.com/xslfo/xslfo_intro.asp
http://www.w3.org/TR/xsl11/
We need to compile to QtHelp (.qch and .qhc). I'm wondering what tool/toolchain would be easiest for this? We'd like a WYSIWYG help authoring tool as our starting point, then run the output from that through whatever we have to to get QtHelp.
We have used Help & Manual in the past, and that's the kind of WYSIWYG interface we're looking for in a help authoring tool. But we need the toolchain to produce simple html pages (one per help topic) that we can use with qhelpgenerator or qcollectiongenerator, as well as create the .qhp's (at least the table of contents and the keywords sections) and .qhcp to generate the .qch's and .qhc. I'm not seeing how Help & Manual can fit into this.
We've looked briefly at Sphynx, but it seems it has extremely limited options for text formatting. For example, it doesn't look like there's any way to change the font, font size, font color, etc. for a section of text. It appears to be actually impossible to have text that is both bold and italic. Looks great for developer documentation, but seems to be missing basic stuff for authoring a user help file. Please correct me if I somehow missed the basic text formatting features!
So, what WYSIWYG help authoring tool do you recommend, and what is the path from that tool to .qch's and a .qhc?
Looks like Help and Manual will work after all! Here's the sequence we're looking at now. If please comment if you see any problems or improvements that can be made.
In Help & Manual (tested with version 5.5.1 Build 1296 professional license), in the Project Explorer, in the Configuration section:
Go HTML Page Templates\Default. In the HTML Source Code tab, comment out the section.
Go to Publishing Options\Web Help.
In Layout, select No frames, no scripts.
In Navigation, we don't need anything checked - although if there is a way to control the format of the value of KEYWORD_INDEX so we could copy and paste directly into our .qhp, that would be great! I haven't found a way to do that, so we plan to maintain keywords directly in the .qhp.
Similarly, Table of Contents is also irrelevant, unless we can control the format we'll have to maintain the toc directly in the .qhp.
In Popup Topics, we are set to HTML encoded topics. Not sure if this is necessary.
That's all the settings we have to change. Create help content in H&M as normal, then to publish Webhelp. This creates a separate .htm file for each topic.
In the same folder as the .htm's, we create our .qhp and .qhcp files, and run qcollectiongenerator to produce our .qhc, which we then display with Qt Assistant. See http://doc.qt.nokia.com/4.7/qthelp-framework.html for help with the Qt side of this toolchain.
Again, it would be great if we could find a way to set up H&M to create the toc and the keywords in the format required for the .qhp and we could just paste them into the .qhp (or for that matter, maintain the .qhp in that template also). Another option would be to write a script to convert from what H&M creates for toc and keywords to what the .qhp requires. If you do that and don't mind sharing, please post the code!
Some benefits we find using H&M to solve this problem:
multiple documenters can work simultaneously, and source is stored as text files in Subversion, so it is versionable and you can compare changes.
easy WYSIWYG creation of help topics
can handle all kinds of text formatting and links. For example, in an end-to-end test of features to see what features of H&M would work in our end product (.qhc viewed in Qt Assistant), I was surprised to see Qt Assistant even handling hotspots in an image linking to other topics/anchors.
the .qhc is integrated into Qt so you have good control of your help from within your Qt app.
Again, if anyone has a better solution or improvements to this one, please post!
use Helpinator 3 Professional it's generat chm qt javahelp word pdf files easly ..
You might consider the HelpNDoc help authoring tool which has a WYSIWYG editor and can generate Qt Help files out of the box. Generated source files can optionally be kept for manual editing and manual compilation.
I am using asp.net 2.0 with c#.
I have to convert my label text into pdf. For this I have used this tutorial
http://www.codeproject.com/KB/aspnet/Creating_PDF_documents_in.aspx
now I am facing two problems:
Every time it is creating 1.pdf, what if there are so many user wants to see the the pdf format of any page
As my label text contains HTML content, it is showing a HTMl output. I don't want HTML to be display in the pdf.
please let me know if you have any other way to create a pdf.
Thanks in advance.
Creating a PDF with HTML-formatted content is not entirely trivial, and the CodeProject sample code isn't quite suitable for that. You'll most likely want to look into a (commercial) third-party solution for this: I myself use Siberix Report Writer: it's flexible, quite affordable, works in partial-trust scenarios (nice for shared web hosting environments) and most importantly doesn't require a per-server license, so you can embed it in your product without redistribution issues.
Item 1) You cache your pdf files to disk. When a request is made for a pdf check if the pdf has been created (i.e. there is a file on disk) and if not generate it. Then send the pdf using the response.writefile command
Item 2) If you are trying to print formatted html into pdf then you will need something that is capable of rendering html. There are a number of html to pdf converters however I have not found them to be all that good. If you are comfortable with php then there are some pretty good converters you can use. Joomla supports html to pdf, so whilst it may not be the exact solution it maybe a good starting point.
I would also suggest you take a look at Aspose PDF.
I would suggest using RDLC Report or Crystal Reports as suggested by #Jeroen
Cete Pdf Generator has HtmlTextArea element and supports some limited HTML
http://www.cete.com/support/net_help_library/html/ceTeDynamicPDFPageElementsHtmlTextArea.htm
ABCpdf is another commercial component which converts html to pdf.
http://www.websupergoo.com/abcpdf-5.htm
You could try the itextsharp library. I've not used it but it has been highly commended by other developers I know. http://sourceforge.net/projects/itextsharp/
In regards to the caching issue. I would check the file system for a pdf named via a convention. If the file is found then serve it. Otherwise, call another method which generates the pdf and saves it to the drive. This way only the first ever request will cause the generation of the pdf. Naming conventions will be key here. The basic implementation wont be thread safe. But it's a good start.
I use CrystalReports. It can create a PDF on the fly and output it to disk or http directly.
Some days ago I received a rather lengthy and somewhat elaborate MS Word document, which I was asked to convert to HTML for uploading to a 3rd party’s website. My first instinct was to save the Word document as HTML and use Dreamweaver’s "Clean Up Word HTML" Command. But not only did I have to leave it running all night for Dreamweaver to finish "cleaning", but the results were far from desirable in my opinion. There were still a lot of left over inline styles, etc. that Dreamweaver just plain missed.
I approached it differently this morning and just selected the entire document in Word, copied it, and then pasted it into Dreamweaver’s Design window. Not only was it much, much faster, but the output code was much, much cleaner! I didn’t have to run the "Clean Up Word HTML" Command afterwords either.
Now I don't ever convert a Word File straight to HTML for standards reasons. Instead I cut and paste content between Word and Dreamweaver. Happily I can do the following.
If a Word heading is in the Heading 1 Style, it will become an H1 in Dreamweaver (following the Dreamweaver stylesheet). Similarly Heading 2 becomes H2, Heading 3 becomes H3 and so forth.
If the Word author wasn't that organized, you can use a shortcut like Control+1 (or Command+1) on a Mac to convert any line to an H1. Can you guess the shortcut for H2? Yes it's Control+2 or Command+2 on a Mac.
Paragraphs now cut and paste as paragraphs (with the P tag). If you don't want an HTML paragraph right then, then use Control+0 (or Command+0 on a Mac) to remove it in Dreameaver.
A new one I discovered is that some embedded images in Word may be transferred to your Dreamweaver site as "clip" images when you copy and paste from Word. So, if you have a Word file with embedded images, you may be able to extract them fairly quickly via Dreamweaver.
I also found this free tool useful http://www.textfixer.com/html/convert-word-to-html.php it works same like design view of dreamweaver, useful for people who doesn't have Dreamweaver.
but what code we will get is depends on how much properly formatted MS word document is?
WORD 2007 has also style like html?
Headings, tables, ordered and unordered lists, bold, italic , hyperlinks etc?
How to use word 2007 semantically?
To get maximum possible semantic html
on save as html option
To get maximum possible clean code to
Copy in dreamweaver design view ?
To get maximum possible clean code to
place browser based WYSIWYG HTML
Editor which comes with every CMS
Does any knows any tips, tricks, tutorial , article or advice to format MS WORD documents semantically?
Or any other best way than mine?
HTML Tidy has options for this: word-2000, bare and clean.
FCKEditor and similar try to clean up code pasted from Word.
There's (rather old now) demoroniser.
However don't expect miracles. It's unlikely that Word document will have decent structure (it theoretically could, but no Word user bothers with this). These programs can't add semantic information if it's not there.
As for semantic editing in Word – use styles. It supports headers properly (sadly not much else). You can check that in outline view.
You don't need – and shouldn't use – spaces or line breaks for indentation or space adjustment. Word has ability to explicitly control paragraphs' padding.
I've found that the OpenOffice.org html generator (Open .doc in OO and save as HTML) works better than MS's in Office.
It's still not perfect, but gives MUCH cleaner HTML that's much more sane to look at.
There is no dependable way to clean up WORD docs and make them into nice HTML. If the document has any special characters, they are often encoded as Windows charset instead of UTF-8, so they just "break" when displayed online. The list goes on. You often end up with silliness like:
<strong>hello</strong><strong>th<strong>er</strong>e</strong><i></i>
The only depandable method is to paste it into Notepad and mark it up manually. You can write a few macros to do things like insert <p></p> at paragraph breaks, but that's about it.
If there is a huge volume of material that needs to go online from Word, you may be better off using a PDF.
have you tried this? Word Cleaner
Try our Doc To HTML Converter software. It was designed specially for the purpose of producing maximum possible clear (X)HTML code, and has many customizable options. It requires MS Word to be installed on your system. It is not free, but it has trial 30-day period.