PDA

View Full Version : Print a document



Binary01
17th February 2016, 18:09
Hiii everyOne,

Is there a way in QML to print a document directly without passing by C++?

Cheers,

anda_skoa
18th February 2016, 09:28
Assuming you mean QtQuick, that will probably depend on what the component can do that you use to display/edit the document.

Most components can not print themselves as far as I know.

Cheers,
_

Binary01
18th February 2016, 17:18
Thanks,
I have a template that contains static data (first name, family name, age, ...) and I have a userInterface that contains some TextInput

I want when I enter the data (TextInput) and click on the print button ------> print the data on the template

Someone can help me ?

Cheers,

anda_skoa
18th February 2016, 17:23
And you have a component that handles the template and replacing placeholders with the data you provide at runtime?

Cheers,
_

Binary01
18th February 2016, 17:55
No I don't have, and I don't know how do it
I started doing some documentations

Do you have some documentations that can help me and focus on my problem

Cheers

anda_skoa
18th February 2016, 18:00
Well, you said you have a template.

So what does that template look like?

Cheers,
_

Binary01
18th February 2016, 18:10
It's just a pdf file that contains :
First name :
Family name :
age :
...

I want to print the data from TextInput in its place ( First name : name from TextInput - age : age from TextInput - etc ...)

Cheers,

anda_skoa
18th February 2016, 19:29
Then printing is really the least of your concerns, getting your values into the template will be the first and more important step.

You will either end up with some library that can parse and render PDF and is very likely capable of printing it, or you end up with a newly generated PDF that you then open in PDF viewer for printing.

Cheers,
_

Binary01
19th February 2016, 11:44
I have to learn many things ;)


Then printing is really the least of your concerns, getting your values into the template will be the first and more important step.
_
Yes, You're right,
STEP 1 : so how can I put values into the template ?
STEP 2 : Printing

Have u any documentation that can help me ?

What is your opinion about this link : https://github.com/tanelipe/QmlPrinter

Cheers,

anda_skoa
19th February 2016, 13:06
STEP 1 : so how can I put values into the template ?

No idea, you'll have to research PDF processing libraries.



What is your opinion about this link : https://github.com/tanelipe/QmlPrinter

Doesn't look relevant to your problem.

Cheers,
_

Binary01
19th February 2016, 17:26
I need some orientation...

I have not found enough documentation on internet
If someone has already worked in this topic, plz I need his help : Documentations, Examples, ...

Cheers,

Binary01
3rd March 2016, 18:24
Hiii,

How can I Open/View a PDF in an application QML ?

I found this 2 ways :
1- With Pdfjs ---> using WebView{ ... }
2- With Poppler

If someOne has an idea concerning this 2 ways

Procedure of installing Poppler/Pdfjs ?
config: Qt 5.1.0 VS 2012

Cheers,