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:33:01 UTC

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

    [ https://issues.apache.org/jira/browse/PDFBOX-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14029104#comment-14029104 ] 

Julian Ivancsuk commented on PDFBOX-2139:
-----------------------------------------

Possible duplicate? However, the dots are rendered differently.

> 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
>
>
> 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)