我一直在使用 PDFBox 生成 pdf 文件,想知道是否可以在图像周围添加边框。如果没有,是否有一些算法可以让您有效地在图像周围精确地绘制线条?我有以下代码允许自己将图像添加到 pdf 页面:
//image for page 2
public File processPDF()
{
//creating pdf
PDDocument document = new PDDocument();
File file = new File("NWProofReference.pdf");
//adding first page to pdf, blank
PDPage page = new PDPage();
PDPageContentStream contentStream;
try {
BufferedImage awtImage = ImageIO.read(new File(PDFProcessing.image));
PDXObjectImage ximage = new PDPixelMap(document, awtImage);
float scale = 1.0f; // alter this value to set the image size
contentStream.drawXObject(ximage,100,400,
(ximage.getWidth()*scale,ximage.getHeight()*scale);
contentStream.close();
document.save(file);
document.close();
} catch (Exception e)
{
e.printStackTrace();
}
return file; …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过附加字符串'999'来更新多行中的单个列:
UPDATE integration.ol_orders
SET order_id = ((SELECT order_id
FROM integration.ol_orders
WHERE status = 2) || '999')
WHERE status = 2
Run Code Online (Sandbox Code Playgroud)
但无论出于何种原因,我不断收到错误"ORA-01427:单行子查询返回多行提示".
所以,当我迭代我的n行时,我正在尝试:
a1 = a1 || '999'
a2 = a2 || '999'
a3 = a3 || '999'
an = an || '999'
Run Code Online (Sandbox Code Playgroud)
有什么建议怎么办?
编辑:将'+'更改为'||',仍然没有运气