Functional PDF Testing (Automate Testing of PDF Content) - pdf

I am working on an application where I am writing some automation framework for testing a web application. I am using Watij / Watin for the framework, but have run into a problem with verifying the PDFs generated have the correct content.
I know I can use IText or a native PDF library to load up the PDF, but I am wondering if there is already an existing framework dedicated to testing PDF file content?

it's an interesting problem, but thankfully like most out there, there's someone who has done it before you.
Take a look at http://jpdfunit.sourceforge.net/references/jpdfunit_aShortIntroduction.pdf for information on a PDF testing framework called JPdfUnit.
The program homepage is at http://jpdfunit.sourceforge.net/.
Hope that helps!

Simple PDF Automation to read text from PDF document.

Related

Linearize the generated pdf from BIRT

I have a problem in generating the pdf report in BIRT.
When I generate the pdf report, it is downloaded in browser. When i checked the properties of the generated pdf(File -> Properties) . Fast Web View is assigned to No. It should be Yes. It creates some problem.
Is there any workaround for this fast web view (linearize) in BIRT.
can anyone faced this type of issue?
Kindly check the screenshot
BIRT doesn't support this, and I think iText doesn't support this.
But if you have any other library to create a linearized PDF, you could take the PDF generated by BIRT, linearize it using your library and then serve the linearized PDF to the client.

Show pdf with qtwebkit

I have a project in which we use custom built software, that is not developed by us.
The application is developed in qt 4.7.0 and is running on Ubuntu 10.04 LTS.
It uses html pages to provide the "online help" to the user. My task is to write the initial help content. The pages are rendered using qtwebkit.
Our customer would also like to display pdf-documents. When I asked the developers, I was told to convert the pdfs to html and add the converted files to the online help.
This would cause quite a bit of additional work and results in html-output that won't look exactly like the pdf-files... and it would prevent the simple addition of new pdf-files by the customer.
So I ask the community here: is there a way to display pdf-files with qtwebkit? Are there any plugins?
Cheers,
10.6um
No idea if there is an existing plugin. But I think you could implement a PDF viewer plugin by yourself with the help of poppler. Poppler is portable to Windows/Linux/Mac.
Reimplement QWebPluginFactory and intercept request with PDF mime type.
Download the PDF content, and use poppler to render PDF data to QPixmap.
Set the QPixmap as the content of QWebPage.

Any other way to read/write a PDF file using java application other than itext, PDFbox?

I Tried with iText and PDFBox .
It is not simple , we need to understand lot of code for this.
Can anybody provide a simple way of reading and writing PDF using Java Application.
Make sure the application is standalone, and no need of any web/application server.
There are loads of simple examples for manipulating PDFs with Itext in the Itext in Action Book.
PDF is a complex file format. What are you trying to do exactly?

PDF Generation Help needed

I am brandnew to PDF Generation or rendering but have a project to, create a PDF Template system that allows users to save Template to Database,
and later generate a PDF document using the template and values from my database.
Language to use C#
Questions
a) Is there a PDF tool out there that can help me with this and documentation I can study to learn of this?
b) Are there free tools out there for this?
c) How do I create a PDF Template? XML?
Thanks in Advance!
You should have a look at xsl:fo.
Apache has a tool which might be helpful.
You can use PHP to create and modify PDFs. (Everything below is completely free.)
Here are two extensive tutorials on generating PDFs in PHP:
http://blog.eirikhoem.net/index.php/2008/04/28/populate-pdf-templates-with-php-fpdf-fpdi/
http://www.astahost.com/info.php/create-pdf-php_t4972.html
You can use the FPDF library located here to handle generating PDFs based off of templates.
If You are using Java, you could try Docmosis or JODReports - they work from templates and can produce PDF output dynamically based on data and those templates. Depending on your template requirements, you might also be able to use Jasper Reports or Apache POI. All have free versions.
If you are looking for an instant solution, take a look on http://pdfnow.com . You can upload your XSL/FO-Templates and simply generate PDF-Templates with a simple webservice call.
I would give a shot to jsreport. You can install it on premise for free or use it online. It supports html -> pdf transformation using phantomjs or xml -> pdf transformation using apache fop.
The idea is that first you create report template using javascript templating engines like handlebars in jsreport studio and then you get back pdf by calling jsreport api.
If you are in c# there is jsreport c# sdk for it.
Note: I am the author of jsreport

Document -> Flash viewer, not hosted

I've got a content management solution where we present scanned images (TIFF), PDFs, word docs for viewing. While we can simply embed a PDF, sometimes depending on user preferences it's a bit fiddly and sometimes not user-intuitive.
I'd like a solution like scribd, embedit, etc, but not hosted. I want to run the application on our own servers and manage it that way (for legal reasons, and our clients won't buy the service if it's hosted somewhere else).
SWFtools looks a little basic for my needs, plus doesn't do doc, docx or ppt.
Any options? Doesn't have to be free, but would be ideal.
As far as I understand (Scribd) uses swftools. And it is not basic, it is amazingly flexible. Convert everything into PDF and use swftools to convert PDF's into swf or something like Scribd does (SCB, what they call it, modified swf).
webSupergoo has a .net component that will do this...
Their ABCpdf component can import and export a wide range of graphic and document formats, including those you've mentioned.
The installation also contains an SWF demo project that can be freely adapted, and used as the basis for a scribd-like service.
http://www.websupergoo.com/products.htm
you can try this alternative solution :
FreepapeR.
You can display pdf documents. The pdf is converted using swftools (pdf2swf), using php on the server side or locally by hand, the user interface is written in as3.
Hope this helps...