如何使用itext5在A4纸上添加两张A5纸

时间:2018-08-13 14:53:02

标签: java printing itext

我需要一个在A4上有两个A5的pdf文件。

像这样,在我打印A4之后,该怎么做?

enter image description here

private boolean isUpdateRunning;

private User(String documentID)
{
    this.documentID = documentID;
    isUpdateRunning = false;
}

private void attachUpdateEventListeners()
{
    FirebaseFirestore.getInstance()
        .collection(USERS_COLLECTION_NAME)
        .document(documentID)
        .addSnapshotListener((documentSnapshot, exception) -> {
            if (exception == null)
            {
                isUpdateRunning = true;
                // omitted code
                // re-assigning fields...
                isUpdateRunning = false;
            }
            // omitted code
        });
}

public String myGetter()
{
    if (isUpdateRunning)
    {
        Thread.sleep(1000); // how to handle the InterruptedException?
    }

    return myField;
}

0 个答案:

没有答案