pdf/src/main/java/se/idsec/signservice/integration/document/pdf/signpage/DefaultPdfSignaturePagePreparator.java
private void calculateImagePlacement(
      final VisiblePdfSignatureRequirement visiblePdfSignatureRequirement, final PdfSignaturePage signaturePage, final int signatureCount) {

    // Note: we don't have to assert that values are set and such. The validators have already checked this.
    //
    final int pageColumns = Optional.ofNullable(signaturePage.getColumns()).map(Integer::intValue).orElse(1);

    visiblePdfSignatureRequirement.setXPosition(
      signaturePage.getImagePlacementConfiguration().getXPosition()
          + ((signatureCount % pageColumns) * signaturePage.getImagePlacementConfiguration().getXIncrement()));

    visiblePdfSignatureRequirement.setYPosition(
      signaturePage.getImagePlacementConfiguration().getYPosition()
          + ((signatureCount / pageColumns) * signaturePage.getImagePlacementConfiguration().getYIncrement()));
  }
/**
   * Calculates the placement (x and y positions) of the signature image based on the current signature count and the
   * placement configuration.
   * 
   * @param visiblePdfSignatureRequirement
   *          the requirement object to update
   * @param signaturePage
   *          the signature page containing the placement configuration
   * @param signatureCount
   *          the signature count
   */
Calculates the placement (x and y positions) of the signature image based on the current signature count and the
placement configuration.

@param visiblePdfSignatureRequirement
the requirement object to update
@param signaturePage
the signature page containing the placement configuration
@param signatureCount
the signature count
Calculates the placement ( x and y positions ) of the signature image based on the current signature count and the placement configuration . @param visiblePdfSignatureRequirement the requirement object to update @param signaturePage the signature page containing the placement configuration @param signatureCount the signature count
private void calculateImagePlacement(
      final VisiblePdfSignatureRequirement visiblePdfSignatureRequirement, final PdfSignaturePage signaturePage, final int signatureCount) {
    final int pageColumns = Optional.ofNullable(signaturePage.getColumns()).map(Integer::intValue).orElse(1);
    visiblePdfSignatureRequirement.setXPosition(
      signaturePage.getImagePlacementConfiguration().getXPosition()
          + ((signatureCount % pageColumns) * signaturePage.getImagePlacementConfiguration().getXIncrement()));
    visiblePdfSignatureRequirement.setYPosition(
      signaturePage.getImagePlacementConfiguration().getYPosition()
          + ((signatureCount / pageColumns) * signaturePage.getImagePlacementConfiguration().getYIncrement()));
  }
private void calculateImagePlacement ( final VisiblePdfSignatureRequirement visiblePdfSignatureRequirement , final PdfSignaturePage signaturePage , final int signatureCount ) { final int pageColumns = Optional . ofNullable ( signaturePage . getColumns ( ) ) . map ( Integer :: intValue ) . orElse ( 1 ) ; visiblePdfSignatureRequirement . setXPosition ( signaturePage . getImagePlacementConfiguration ( ) . getXPosition ( ) + ( ( signatureCount % pageColumns ) * signaturePage . getImagePlacementConfiguration ( ) . getXIncrement ( ) ) ) ; visiblePdfSignatureRequirement . setYPosition ( signaturePage . getImagePlacementConfiguration ( ) . getYPosition ( ) + ( ( signatureCount / pageColumns ) * signaturePage . getImagePlacementConfiguration ( ) . getYIncrement ( ) ) ) ; }
Calculates the placement (x and y positions) of the signature image based on the current signature count and the
 placement configuration.
Calculates the placement ( x and y positions ) of the signature image based on the current signature count and the placement configuration .
// Note: we don't have to assert that values are set and such. The validators have already checked this. //