Problems Converting to Evo PDF - asp.net-core

I am using version 8.0.0 of "EvoPdf.HtmlToPdf.NetCore" package in my project. When I try to get the radar canvas image as pdf output, I am not successful. The pdf output is blank. I don't think there is any problem in the code we created the canvas. I am using Chart.Js version 2.9.3 for radar canvas.
The same problem exists when I want to convert "https://www.chartjs.org/docs/latest/samples/area/radar.html" to pdf with "https://www.evopdf.com/demo/" help. Canvas is not drawn in pdf file.

You can read this official article:
https://www.evopdf.com/html-to-pdf-converter.aspx
You can download the code samples provided by him according to the asp.net core you use.
It currently only seems to support .net core2 and 3 versions.

Related

Is it possible to convert fabricjs svg output to pdf without rasterizing?

We are building a web app where the user can make a design by using fabric.js and at the end he should receive a pdf file with his work.
At first, we tried to use JSPDF because it was prefered to have a cliente-side solution. However by doing pdf.addImage(canvas.toDataURL(),...) we are rasterizing the design.
In second place, we tried server side solution using WKHTMLTOPDF, sending canvas.toSVG(), but there are some issues with fonts and shapes rendering.
The designs are complex as they can have text, shapes, images and svg.
We also tried INKSCAPE (inkscape --without-gui --export-pdf ...), MPDF and MUPDF without good results. IMAGEMAGICK is not a solution has it also rasterize the design.
The main goal is to get a vector pdf, where it's possible to increase size and where the elements of the design are selectable, and if possible that pdf should be ready to print (300 dpi and cmyk)
Yes its possible using TCPDF library.
Please check this ImageSVG api for more information for converting SVG to PDF.
https://tcpdf.org/examples/example_058/
Export the canvas to svg and use pdflib to make the pdf.
You can find an exemple here:https://www.pdflib.com/pdflib-cookbook/graphics/starter-svg/

Sphinx documentation: Include svg images in PDFs via latex

I'm doing an internship for an IT company which needs a document application for its firmware docs (md files).
The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs.
I've searched around and I found this solution from 2 years ago, which was essentially what I was looking for: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images. I tried to implement it but I'm not an expert with GNU makefiles and I don't know if the current version of Sphinx allows it or if it is out there an easy workaround, so the thing didn't succeed.
Does someone have a viable solution for this?
At this time, SVG is still not supported. I work around it in Pyramid docs by exporting the original file (OmniGraffle) to both SVG and PNG.
In docs/narr/router.rst:
.. image:: ../_static/pyramid_request_processing.*
And we place images in docs/_static.
The HTML uses SVG and the PDF uses PNG.
There is available the Sphinx SVG to PDF converter extension to automatically convert from SVG to PDF.

Why do ImageMagick-based thumbnail-images of PDF-files in Typo3 have black background?

Since version 6.7.5, ImageMagick has changed its colorspace from RGB to sRGB. Because of that I also had to change the setting [GFX][colorspace] = sRGB in the configuration of my Typo3 CMS software that makes use of ImageMagick. Everything is working fine again - except thumbnail-creation for PDF-files that now always have a black background (should be white).
It's possible to see all non-black elements of PDF-files (like images etc) on the thumbnails, but all the background that would usually be white is now black. This error only happens for PDF-files. All other image-thumbnails for JPG-, GIF- and PNG-files look as expected (even if they have transparent background).
Does anyone have an idea how I could solve this problem? Is this an ImageMagick-issue or a Typo3-Issue?
Based on Creating JPG thumbnails from PDF causes problems with new version of ImageMagick I was able to answer this question by myself. If your want to apply this solution to Typo3, the following file changes are needed:
Go to your Typo3 directory and open the file ./t3lib/class.t3lib_stdgraphic.php and replace all appearances of
$this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . '
with
$this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -flatten
Use the ImageMagick convert with the "-flatten" option for the background. The actual "PDF" thumbnail conversion is passed to GhostScript as a delegate which means both must be installed on the server correctly. If done correctly which happens in most cases, the path for GhostScript within your coding is not needed if using ImageMagick. The actual PDF encoding can also be a problem. There are shared hosting accounts running 7 year old versions of both ImageMagick and GhostScript with no problem on PDF conversion to thumbnail within the current stable TYPO3 CMS 6.1.1.
A free direct download PDF test file with detailed instructions to solve a "PDF Thumbnail Generation Problem" in TYPO3 CMS is available at Smargasy, Inc. "http://www.smargasy.com/fileadmin/media_data/community/Smargasy_PDF-Thumbnail-Compatibility-Test-File.pdf". The test file helps isolate the problem on systems that use ImageMagick and GhostScript as the image processing and conversion program in a shared hosting environment.
Best Regards

ABCPdf 8.1 webpage to PDF image compression issue

I've just recently upgraded from ABCPdf 6 to ABCPdf 8.1.
I've got this webpage that I need to convert into PDF format.
The whole reason for the upgrade is because ABCPdf 6 cannot read Chinese characters while version 8.1 could.
I did a test of the page on the ABCPdf demo site (http://www.abcpdfeditor.com/) and things looks fine. (1.2Mb pdf)
However, when I tried to either:
run my own backend codeor run the code provided in the examples (C:\Program Files\WebSupergoo\ABCpdf .NET 8.1 x64\ExampleSite) - Identical to www.abcpdfeditor.com
All PDF generated produces really pixelated/compressed images! (121Kb)
The page that I'm trying to convert is:
http://debug.webpromos.com.au/certificate.htm
As far as I can tell, there is no issue with the code, but I've attached it below anyway...
http://debug.webpromos.com.au/html2pdf.ashx.txt
I'm stuck and can't think of anything else that could make it generate a 1.2Mb PDF document with non-pixelated image as produced by www.abcpdfeditor.com!
I hope I have provided enough information!
Thanks!
Wilfrid
Solved, all I need to do is to select the html engine specificly.
theDoc.HtmlOptions.Engine = EngineType.Gecko;

Search and Highlight text in PDF for IPad

I am working on the PDF App for iPad and facing an issue: how to search a text in PDF and also how to highlight that text?
Yours is the same big problem I'm having. My understanding is that, currently on iOS 4.0, the main public API is CGPDF . It allows us to parse PDF, and with it we can search strings in it. See also this Quartz 2D document. It also allows us to render it on the screen using CGContextDrawPage. However, it's not yet possible to get the position of a text in the rendered image. (On OS X it's possible using PDFKit.)
So, I'm afraid that you need to implement the PDF spec yourself to get that info. I think GoodReader etc. is working very very hard to implement these.
I had the same trouble recently and then I found FastPDFKit. Have tested the package and it's working great.
http://mobfarm.eu/fastpdfkit