UltimatePDF not able to show block and alway have an additional page
Question
Application Type
Reactive

Hi I am trying to produce a letter using ultimate PDF. When downloaded i only see the word but not the image of the barcode generated


Can someone help me with the above why it is now showing.

I tried both layout PrintLayout\ScreenToPDF and also PrintLayout\PrintLayout but like no difference.

Also not sure why it always printed an additional blank page at the end

Thank you in advance

Hi,

Please find the updated OML.

I added OnReady event in Home Screen to render barcode on page load.



Added Print button to print the PDF.


Thanks

Vinod

BarcodeDisplay.oml

Hi Jerah,

Please apply below CSS in your page and try -

/* CSS for Reactive Printing */

@media all {
  .page-break {
    display: none;
  }
}
 
@media print {
  html, body {
    height: initial !important;
    overflow: initial !important;
    -webkit-print-color-adjust: exact;
  }
}
 
@media print {
  .page-break {
    margin-top: 1rem;
    display: block;
    page-break-before: auto;
  }
}
 
@page {
  size: auto;
  margin: 20mm;
}


Please find the attached sample OML as well.


Thanks

Vinod

PdfSample.oml

My sincere apology as i am still very new to outsystems,

where you say..... Please apply below CSS in your page , which part of the page are you referring to ?

You need add in Style Sheet property of your screen.



Thank you i had paste it in the page which hold the content of the letter. 

But when downloaded still not able to show the barcode image.

 Below is how my letter look like. The block is an image of the barcode generate from javascript

Hi Jerah,

Could you please share barcode generate from javascript logic, So that i can create sample scenario at my end.

Or Please share OML.

Thanks

Vinod

Hi i had attached the oml file here, appreciate your help

I created one local image and another from block

BarcodeDisplay.oml

Hi,

Please find the updated OML.

I added OnReady event in Home Screen to render barcode on page load.



Added Print button to print the PDF.


Thanks

Vinod

BarcodeDisplay.oml

Thank you for your help  it is working now

JSBarcode  is a Javascript function and it is available in JsBarcode_all_min(Within Script Folder) file.


You need to add JsBarcode_all_min file using Required Scripts properties.



Thanks

Vinod


I can ask you one more question if the content overflow to the next page but i notice the top and bottom margin still got a lot of space how do you style the css to fit everything into one page. Thank you so much for your help

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.