I want to generate a pdf of a form that a user fills and download it to the users computer.
I tried using the Dompdf package from laravel to do this and everything works fine except the design. The generated pdf does not look exactly like the web page, after doing some searching about this issue, I found out that dompdf does not support a few of the css option.
I was wondering whether there are any other free packages like dompdf that I could use which can have rich styling and convert the web page to pdf with the exact design.
Related
I am trying to develop a pdf generator. The pdf generator has multiple page. First page has some specific value with is working fine. But the second page has invoice which user uploads, In this case the user can upload a image file or pdf file.
For this I am using maroto library which works great when it comes to image or content generation but there is no support for import another pdf and merge with current one.
Now i know maroto uses gofpdf library and gofpdf has pdi importer so in my mind it should be possible to implement such feature. I didn't get any reply from their git issue board so asking it here.
Can anyone help me with this?? or my only choice is to change the library and do the coding again?
I could not find a solution for this. So i had to improvise the system
the way I solved the problem is:
generate a pdf using marotopdf library
load the second pdf
use unidoc library and merge 2 pdfs (its just merging 2 pdfs 1 after another)
This is not solving my problem 100% as i would like to have the ability to add company logo on the second pdf which is not editable atm. But its dining the main work (merge 2 pdf).
I've created a simple library to help you with this. It adds two methods to the gofpdf Fpdf class:
importPdf imports a PDF into the current PDF document
linkPdf creates a hyperlink to a PDF document
It uses cgo to use the pdsys, pdflib and pdflib_pllibraries.
You can find it here: https://github.com/jung-kurt/gofpdf
First time using aimeos and I'm having difficulty locating the file with the html code.How do I access the files? e.g, using this demo link https://laravel.demo.aimeos.org/default/en/EUR where do I find the html code responsiveble for displaying the navbar?
You can do this through the settings provided by laravel aimeos: https://aimeos.org/docs/latest/laravel/customize/
You can also create a theme extension (this is the recommended option) and make changes according to your needs.
You can find the documentation at this link: https://aimeos.org/docs/latest/laravel/themes/
Also, you can use the following tool to generate a theme extension: https://aimeos.org/extensions
This way you will be able to customize all the html, css, javascript, php without losing changes when you upgrade the laravel aimeos package.
Regards,
Images embedded in Articles not being displayed in migrated Joomla website
I have migrated a Joomla 3.7.2 website from an old server to a new server using a particularly messy technique. Basically, I exported the database and then copied the important folders and it all worked remarkably well barring one very specific feature. Articles with images in them no longer display the images in the new site.
I have System - SEF enabled in both sites (and switching it off makes no difference)
I use JCE and in code view the typical line displaying the image looks like this:
<p><img src="images/players/shirt.jpg" alt="" /></p>
In both sites.
JCE is configured to use Relative URLs in both sites. If I turn that OFF then I get the image displayed in the new site. Of course that's just a hack around the problem not a solution to it.
Path to Files Folder, and Path to Images Folder is set to images in both sites.
HTML inspector on the old site shows the
<img src="/images/players/shirt.jpg" alt="Shirt">
And on the new site
<img src="images/players/shirt.jpg" alt="Shirt">
And if you hover over the url it says "could not load the image". The missing first '/' is clearly the problem but what is it that puts it there after the article is saved by the editor and before the html is displayed in the browser?
Slightly embarrassed to pretend this is an answer but today I got the prompt to update Joomla to 3.7.3 and of course immediately afterwards the problem has gone away.
I have a project requirement to produce PDF files as well as HTML on a solution deployed on MS Windows Azure. The PDF files are often printed and delivered to clients as part of a presentation as and also made available through a client portal. Users of the client portal should also be able to interact with the information in a more interactive way via html. So here’s my question, are there ASPx controls that allow the information to be rendered in html or pdf that run on an Azure server?
You could just create an HTML solution and convert each page to PDF when needed. There are several tools that can help you with this:
wkhtmltopdf (LGPL, command
line applicacion)
Amyuni WebkitPDF, a HTML to PDF/XAML conversion library (free
for commercial and non-commercial use, Windows library with C#
bindings)
Has anyone been able to find a way to test pdf's with ruby within the browser? I have tried a few different ways and the only way I have been able to get any pdf testing to work is to save off the pdf and use the pdf_reader gem. This only seems to work on pdf's that, when the link is clicked, opens up a dialog box with the options to open or save the pdf. Unfortunately I have not been able to find a way to do anything like this with pdf's that are opened in browser, with no dialog box options to save it. Any ideas?
Maybe testing it in the browser isnt the best way. When you say test the pdf what are you trying to do? I wouldnt test the pdf in the browser if I was you.
Try docsplit, if you want to verify its contents.
Docsplit is a command-line utility and Ruby library for splitting apart documents into their component parts: searchable UTF-8 plain text via OCR if necessary, page images or thumbnails in any format, PDFs, single pages, and document metadata (title, author, number of pages...)
You are not inventing a browser, or a PDF generator.
Use unit tests to check your back-end modules can take data in, and write PDF out, then serve the PDF in a website and let the browser do its thing. Test (as what Rails calls a "functional test") that the MVC will produce a web page containing a link to the PDF, and you are done.
You can use gem 'mechanize' to download an online PDF (the PDF with in a browser) on your computer and then read it via gem PDF reader.