PDPageContentStream.java (pdfbox-2.0.23-src) | : | PDPageContentStream.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 177 | skipping to change at line 177 | |||
} | } | |||
/** | /** | |||
* Create a new PDPage content stream. | * Create a new PDPage content stream. | |||
* | * | |||
* @param document The document the page is part of. | * @param document The document the page is part of. | |||
* @param sourcePage The page to write the contents to. | * @param sourcePage The page to write the contents to. | |||
* @param appendContent Indicates whether content will be overwritten. If fa lse all previous | * @param appendContent Indicates whether content will be overwritten. If fa lse all previous | |||
* content is deleted. | * content is deleted. | |||
* @param compress Tell if the content stream should compress the page conte nts. | * @param compress Tell if the content stream should compress the page conte nts. | |||
* @param resetContext Tell if the graphic context should be reseted. You sh ould use this when | * @param resetContext Tell if the graphic context should be reset. You shou ld use this when | |||
* appending to an existing stream, because the existing stream may have cha nged graphic | * appending to an existing stream, because the existing stream may have cha nged graphic | |||
* properties (e.g. scaling, rotation). | * properties (e.g. scaling, rotation). | |||
* @throws IOException If there is an error writing to the page contents. | * @throws IOException If there is an error writing to the page contents. | |||
* @deprecated use {@link #PDPageContentStream(PDDocument, PDPage, PDPageCon tentStream.AppendMode, boolean, boolean) } | * @deprecated use {@link #PDPageContentStream(PDDocument, PDPage, PDPageCon tentStream.AppendMode, boolean, boolean) } | |||
*/ | */ | |||
@Deprecated | @Deprecated | |||
public PDPageContentStream(PDDocument document, PDPage sourcePage, boolean a ppendContent, | public PDPageContentStream(PDDocument document, PDPage sourcePage, boolean a ppendContent, | |||
boolean compress, boolean resetContext) throws IO Exception | boolean compress, boolean resetContext) throws IO Exception | |||
{ | { | |||
this (document, sourcePage, appendContent ? AppendMode.APPEND : AppendMode .OVERWRITE, compress, resetContext); | this (document, sourcePage, appendContent ? AppendMode.APPEND : AppendMode .OVERWRITE, compress, resetContext); | |||
skipping to change at line 840 | skipping to change at line 840 | |||
sb.append("\n /W "); | sb.append("\n /W "); | |||
sb.append(inlineImage.getWidth()); | sb.append(inlineImage.getWidth()); | |||
sb.append("\n /H "); | sb.append("\n /H "); | |||
sb.append(inlineImage.getHeight()); | sb.append(inlineImage.getHeight()); | |||
sb.append("\n /CS "); | sb.append("\n /CS "); | |||
sb.append("/"); | sb.append("/"); | |||
sb.append(inlineImage.getColorSpace().getName()); | sb.append(inlineImage.getColorSpace().getName()); | |||
if (inlineImage.getDecode() != null && inlineImage.getDecode().size() > | COSArray decodeArray = inlineImage.getDecode(); | |||
0) | if (decodeArray != null && decodeArray.size() > 0) | |||
{ | { | |||
sb.append("\n /D "); | sb.append("\n /D "); | |||
sb.append("["); | sb.append("["); | |||
for (COSBase base : inlineImage.getDecode()) | for (COSBase base : decodeArray) | |||
{ | { | |||
sb.append(((COSNumber) base).intValue()); | sb.append(((COSNumber) base).intValue()); | |||
sb.append(" "); | sb.append(" "); | |||
} | } | |||
sb.append("]"); | sb.append("]"); | |||
} | } | |||
if (inlineImage.isStencil()) | if (inlineImage.isStencil()) | |||
{ | { | |||
sb.append("\n /IM true"); | sb.append("\n /IM true"); | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |