Can you explain more how it should work? When I click the print button I see html code in a new window. If I uncomment the SharedCode.PrintToJob, I get the code printed on an A4Page using a PDF printer.
Unfortunately I can't open the fxml layout files I don't have SceneBuilder installed any more.
It looks as though you are printing the raw HTML, not the rendered output. Is that correct?
Hello again.
I tried to explain my steps step by step:
01. STEP0-HTML View Editor.PNG
- I mark the entire content of the text;
- I remember selected text to the cache;
- I click print (btnPrints_Click);
- In the new window I can see the HTML code (
STEP1-Print preview.PNG);
- Result from the printer (
STEP2-from the Printer.PNG)
02. STEP0-HTML View Editor.PNG
- I mark the entire content of the text;
I DON'T REMEMBER THE SELECTED TEXT FOR THE CACHE;
- I click print (btnPrints_Click);
- In the new window I can see normal text (
STEP3-Print preview.PNG);
- Result from the printer (
STEP4-from the Printer.PNG)
Progress on 01 and 02 is correct and in line with my expectations.
The only thing that worries me is the results from the printer. Both prints are not arranged
on the entire surface of an A4 sheet. I attached the
01_A4Size.FXML.PNG file
in which the parameters of the "LblTotal" Label, in which I am placing it, are visible
the content of the selected text in an HTML editor.
I have doubts about the correct size of the A4 sheet in the FXML layout,
which I accepted for
A4 = 605x870, for
Letter = 620x775.
Perhaps they cause such an effect of printouts from the printer (?).
Thank you for your interest and help so far
Regards, have a good day.