SelectPDF ConvertHtmlString method truncates PDF - webforms

I'm trying to use SelectPDF library in my .NET Web Forms project to generate PDF from the HTML string and write everything to the Stream.
The problem is that when I'm trying to generate that PDF I get the truncated file.
It works fine on the official demo when I put my HTML string there:
https://selectpdf.com
But it doesn't work in other demo:
https://selectpdf.com/html-to-pdf/demo/convert-html-code-to-pdf.aspx
My code:
Do someone has any ideas on how that would be fixed?

If you are using SelectPdf community edition, there is a limitation of 5 pages in the free version (SelectPdf community edition )
There are commercial versions of SelectPdf but they are not free.

Related

Spring Framework 5 Reference Documentation epub

For Spring versions 5.x I cannot find any epub or pdf version of the reference documentation. Former versions were available e.g. at https://docs.spring.io/spring/docs/4.3.9.RELEASE/spring-framework-reference/epub/. Are they available any more? epubs are perfect to be read with an ebook reader.
My guess is that it will get published in time.
Meanwhile - this is the 5.0.4.RELEASE docs in pdf:
https://docs.spring.io/spring/docs/current/spring-framework-reference/pdf/
which you can convert to epub if you wish to do so.
The only officially available and latest epub is the 5.0.0.M5: https://docs.spring.io/autorepo/docs/spring-framework/5.0.0.M5/spring-framework-reference/epub/
The epub for the latest version is not available.
but, I would recommend you to try to convert the html documentation directly to epub.
as converting pdf to epub does not result in very good result [as tools like calibre convert the pdf to html and then epub]
I tried a online converter to convert the https://docs.spring.io/spring/docs/current/spring-framework-reference/
and works pretty good.. [especially the code blocks seem better than the official epub]
hope you find this helpful.

how to use CKEditor 4.5.7 in a ASP.net project

i am highly confused why i cannot intergrate the latest version of CKEditor in a ASP.net website. Which coding technologies is the 4.5.7 version comapible with (ie: php/jsp/ect)?
Isnt CKEditor for any HTML page?
Currently the latest ASP.net version is 3.6 which lacks support from many new plugins.
I made a quick test:
download and decompress the .Net package from CKEdit site (3.6);
download the latest version of the javascript files (4.5.7);
check that the samples provided with the .Net package work fine;
rename the ckeditor folder in the solution and copy the new one downloaded from the site;
clean the solution and rebuild the projet, and check if it works fine;
replace the occurrences of the "kama" skin to the newer "moono" as the former one is replaced by the other in the 4.x version;
like this, it seems to be working just fine
Do you have specific issues I can look into?
HTH
You add CKeditor.js javascript to your pages and call CKEDITOR.replace('id-of-textarea-here');
You don't need any ASP.NET specific packages.

Code Documentation for ASP.NET + VB.NET application

We have a very old application dating back to ASP era which we are gradually refactoring to ASP.NET + VB.NET codebase.
It contains a lots of files with the below types:
aspx, asmx, ascx, vb, js (JavaScript), html, vbs (VBScript).
The backend database is SQL Server 2005 with lots of sprocs.
We would like to create a code documentation automatically generated from the comments in the code files. I liked Doxygen very much but seems like it does not support the above technologies. Can you please suggest some document generator tools, preferably a single tool or a group of tools?
Thanks a lot.
Ajit.
You can take a look at Microsoft's Sandcastle tool. I've used it many times, and it generates documentation based on the comments provided in your .NET code. If I remember correctly, it can also generate documentation for JavaScript libraries.
There are some out there:
SandCastle
NDOC
i've used SandCastle and it works too good if you have xml comments in your code.
You first enable xml documentation in your project by setting it in Project Properties -> Compile -> Generate XML Documentation.
Once done you may have to set treat warnings as errors, so that the studio can point out to you where and all the XML comments are missing.
To add an XML Comment, you place your cursor before a class definition or a function definition and type
///
This will automatically generate xml tags for documentation and then once you are done, you can import the project and start to build the documentation.
The good part is, if you have documented your classes well, when you use those functions in your application upon mouse over you can find the description which you wrote, much like how intellisense documentation works.
Let me know if you run into any other issues.
My last suggestion, make a hello world project and xml document it and get used to sandcastle with it.

Author in wiki, generate PDF documents, CHM files or embedded help

Anyone know of a wiki or wiki plugin that generates a PDF file or CHM file that spans the entire wiki?
I would like to have control of the table of contents.
I would like the internal and external links to work.
Ideally allow for tweaking the output template, but that is not a deal-breaker.
I want to generate content using WIKI syntax and mindset (lots of cross-links etc), but ship the content in PDF, CHM or an embedded application form. Something friendlier than installing the wiki software on the enduser machine...
XWiki does this out of the box.
The MediaWiki PDF Export extension allows you to select a group of PDF pages. I've not installed it yet, so unsure if it's easy to use that feature to select all the pages.
Confluence lets you choose pages when you export to PDF a space
But you can't customise a lot the PDF
You can customise it slightly through a theme (based on velocity)
Sphinx (https://www.sphinx-doc.org) is a fairly nice tool for generating HTML (or CHM) and PDF documentation, with wiki-like syntax. It is not a wiki; you can't edit through the web and generating HTML requires a build process. Still, it is pretty nice, with cross-references, fairly simple markup, and (in the HTML output) a search engine implemented in JavaScript with no server-side dependencies beyond static file hosting. Sphinx was developed for the new version of the Python documentation and is pretty themable; for example, the GeoServer project (which I work on, excuse the shameless plug) is using Sphinx with a custom theme for the new version of their user and developer manuals.
JIRA (http://www.atlassian.com/software/jira/default.jsp) is your geeky wet dream in terms of control; it exports to PDF (amongst other) and you can have complete control of pages, TOC and other aspects, although expect some complexity to set it up.
Microsoft has an HtmlHelp Authoring tool that can create chm files from html files.
If you need the help files both on the web and within deployed applications, generating the help from the same files used on the web could be a great solution. If the help site was created using asp.net (ie database driven) it might be worth using basic styles and creating a tool to generate html files by reading in the served out pages?
Have a look at: http://msdn.microsoft.com/en-us/library/ms524239(VS.85).aspx
I guess one could also additionally then create a PDF from the Html pages?

Code syntax formatter for posting code on webpages

Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website?
I have seen several websites with very nicely formatted code and I dont believe they do this manually.
Google prettify -
http://code.google.com/p/google-code-prettify/
I prefer Syntax Highlighter implementations (I'm using Wordpress plugin implementation for my blog).
Advantages
It is based on JavaScript and does
not care about what you have on the
server.
Posts with this formatting display
properly on different RSS feeds and
can be copied to clipboard.
It is trivial to extend syntax
rules. I'm using that to highlight
custom operators in Boo-based DSL (see sample post)
Multiple languages are supported
out-of-the-box
(source: googlecode.com)
You can get JavaScript syntax-highlighting scripts, such as this one by Dean Edwards.
This is also a jQuery version apparently based on it which looks good.
CopySourceAsHtml is an add-in for Microsoft Visual Studio 2005 that allows you to copy source code, syntax highlighting, and line numbers as HTML.
http://copysourceashtml.codeplex.com
It's highly configurable, and works much better than the download page would make you expect! Don't know if there is something similar for VS 2008
If you don't have the ability to add the google prettifier CSS reference, this would be a better way to go, as what you get is a complete HTML with the required style. I use it all the time on our developers wiki, and loving it.
An even better solution, if you don't want to bother installing anything, is to just use the little web app I wrote called BlogTrog CodeWindow:
http://www.blogtrog.com
It's easy to use. Just paste your code and embed the results.

Resources