1. Jose Vizcaino
  2. PowerBuilder
  3. Thursday, 29 February 2024 16:46 PM UTC

Hi all

I'm tying to write a codebar in the left border of a multy-page PDF file using PowerBuilder 2022 R3.

 

I Want to create a new PDFText object with an codebar font ("Free 3 of 9") and add this new object to an PDF object (test.pdf) where previously  I imported the PDF file

 

This is working OK, but I need to ROTATE the PDFText object.

 

PDFdocument lpdf_document
PDFpage lpdf_pagina
PDFtext lpdf_texto
 

lpdf_document = create PDFdocument
lpdf_pagina = create PDFpage
lpdf_texto = create PDFtext

lpdf_document.importpdf('test.pdf')

lpdf_texto.setposition(ld_x, ld_y)
lpdf_texto.setsize( ld_width, ld_height)
lpdf_texto.font.fontname = "Free 3 of 9"
lpdf_texto.font.fontsize = 10


lpdf_pagina = lpdf_document.getpage(1)
lpdf_texto.content = ls_cod_barra1

lpdf_pagina.addcontent(lpdf_texto)

 

John Fauss Accepted Answer Pending Moderation
  1. Friday, 1 March 2024 01:37 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Jose -

Is the PDF document created by the PowerBuilder application, such as by saving a DataWindow report? If so, it's possible to create a rotated barcode in DataWindow. Is the same barcode on every page, only the first page, or ...? Is the barcode different on every document?

Best regards, John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 1 March 2024 02:02 AM UTC
  2. PowerBuilder
  3. # 2

Hi Jose;

The Escapement property on the Font property page for the DWO's control lets you specify the amount of rotation, also known as escapement. Several other properties of a rotated control affect its final placement when the DataWindow object runs. You can set this value in the DW Painter or dynamically change this at runtime via the Modify() command. If your Text control uses a Bar Code font, then just rotate it as required.  HTH

Regards ... Chris 

Comment
There are no comments made yet.
Jose Vizcaino Accepted Answer Pending Moderation
  1. Friday, 1 March 2024 08:23 AM UTC
  2. PowerBuilder
  3. # 3

Hi all

 

The PDF hadn't been created by PowerBuilder, it's an standard PDF file provided by other app.

 

The Barcode it's different by document and by page, it's to control a enveloper machine

 

Thanks in advanced

Jose

Comment
  1. Chris Pollach @Appeon
  2. Friday, 1 March 2024 13:27 PM UTC
Hi Jose;

In that case you'll need to have the app that generates the PDF make those changes or ... Have your PB app take over the PDF generation where you have full control over the presentation later.

Regards ... Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.