voyent
Problem with print functionality  XML
Forum Index -> General Help
Author Message
ishamalpani

Joined: 07/Jan/2016 08:11:53
Messages: 4
Offline


Hi,

When I save a copy of the currently opened PDF to a file using SwingController.saveFile() method, the text in the saved PDF is selectable and/or searchable i.e. it's OCR'ed.

But when I print the same above PDF using either SwingController.print( boolean) or PrintHelper.print() method, the pdf that is saved as a soft copy by the printer is not selectable and/or searchable i.e. it's an image.

Could you please let us know that is there any way by which we can use ICEpdf's print method and still preserve the OCR'ed PDF i.e. the text is selectable and/or searchable ? If not, then can you do the necessary changes? We are currently using ICEpdf-pro-6.1.1 version.

Many Thanks!

Regards
Isha






patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1966
Offline


Java Printing is very abstracted, there is generally very little control over how the printer handles the output.
[Email]
ishamalpani

Joined: 07/Jan/2016 08:11:53
Messages: 4
Offline


Hi Patrick

Regarding Java Printing, when I use javax.print API directly to print the PDF in either of the following ways, the PDF saved as a soft copy by the printer is OCR enabled .

1) printService.createPrintJob().print( new SimpleDoc( byte[], DocFlavor.BYTE_ARRAY.AUTOSENSE, null), printRequestAttributeSet );

2) printService.createPrintJob().print( new SimpleDoc( FileInputStream, DocFlavor.INPUT_STREAM.AUTOSENSE, null), printRequestAttributeSet );

Could it be related to the type of DocFlavor used by ICEpdf ? It currently uses DocFlavor.SERVICE_FORMATTED.PRINTABLE.

Thanks
Isha

patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1966
Offline


It's certainly possible. I would need to to a little research on the two different modes. The printer code hasn't been touch in a significant way in quite long time.

I suspect the PRO font engine is not sending "fonts" to the printer, just shape information. This might be the underlying problem. I'll create a bug to try and capture the problem mentioned.
[Email]
ishamalpani

Joined: 07/Jan/2016 08:11:53
Messages: 4
Offline


Thanks Patrick for your prompt response to our request.
Kindly let us know by when we can expect the issue to be fixed once you have identified the actual root cause.

Regards
Isha
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team