You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Julian Ivancsuk (JIRA)" <ji...@apache.org> on 2014/06/12 14:35:01 UTC

[jira] [Updated] (PDFBOX-2139) German Umlaute (mutated vowel) are rendered incorrect

     [ https://issues.apache.org/jira/browse/PDFBOX-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Ivancsuk updated PDFBOX-2139:
------------------------------------

    Attachment: korrespondenz_temp8345172740623456142.ps

Here is the resulting postscript file.

> German Umlaute (mutated vowel) are rendered incorrect
> -----------------------------------------------------
>
>                 Key: PDFBOX-2139
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2139
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: Julian Ivancsuk
>              Labels: Rendering, Umlaute
>             Fix For: 2.0.0
>
>         Attachments: korrespondenz_temp8345172740623456142.ps
>
>
> German Umlate, specifically the 2 dots on top of the characters, are not rendered correctly after loading a PDDocument.
> {code:title=PDFService.java|borderStyle=solid}
> private ByteArrayOutputStream pdf2ps(byte[] pdf) throws PrinterException, IOException {
> 	DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
> 	String psMimeType = DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType();
> 	StreamPrintServiceFactory[] factories = StreamPrintServiceFactory
> 				.lookupStreamPrintServiceFactories(flavor, psMimeType);
> 	PDDocument doc = PDDocument.load(new ByteArrayInputStream(pdf), false);
> 	ByteArrayOutputStream bout = new ByteArrayOutputStream();
> 	// Use the first service available
> 	PrintService sps = factories[0].getPrintService(bout);
> 	// Define paper size
> 	PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
> 	aset.add(MediaSizeName.ISO_A4);
> 	PrinterJob pjob = PrinterJob.getPrinterJob();
> 	pjob.setPrintService(sps);
> 	PDFPrinter printer = new PDFPrinter(doc, Scaling.ACTUAL_SIZE, Orientation.AUTO);
> 	printer.silentPrint(pjob);
> 	doc.close();
> 	return bout;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)