richard.herbert
08/28/2022, 12:56 PMThe web page at *<http://localhost:8500/reports/deliveredby/hand>* might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_RESPONSE
That code being...
public void function deliveredByHand( event, rc, prc ) {
prc.members = MemberService
.getMembersByHandDelivery();
cfheader( name='content-disposition' value='attachment;filename="Delivered by Hand.pdf"' );
event.renderData(
data=renderView( 'reports/deliveredbyhand' )
,type='pdf'
,pdfArgs={ pagetype:'A4', unit:'cm', margintop:'1', marginbottom:'1',marginleft:'1', marginright:'1' }
);
return;
}
Either, what have I been wrong all this time, or what has changed in v6.3 and how should I change my code?
Thoughts and advice welcomed.sana
08/28/2022, 2:42 PMpublic void function
richard.herbert
08/28/2022, 2:49 PMsknowlton
08/28/2022, 3:05 PMsknowlton
08/28/2022, 3:05 PMrichard.herbert
08/28/2022, 3:51 PMsendFile()
to render it to the browser as that has "disposition" and "name" options?sknowlton
08/28/2022, 3:52 PMvar pdfSource = '/app/resources/pdf/#RosterService.getMedicalReleasePDFFile()#';
var pdfArgs = { 'reg' : reg };
// if we have a valid e-signature, include it
if ( !isNull( eSig ) ) pdfArgs.append( { 'medicalRelease' : eSig } );
var pdfData = RosterService.populateMedicalRelease( argumentCollection = pdfArgs );
var destination = expandPath( getTempDirectory() ) & createUUID() & ".pdf";
cfpdfform( action = "populate", source = pdfSource, destination = destination ) {
for ( var fieldName in structKeyArray( pdfData ) ) {
if ( !isNull( pdfData[ fieldName ] ) ) {
cfpdfformparam( name = fieldName, value = pdfData[ fieldName ] );
}
}
}
cfcontent( type = "application/pdf", file = destination, deleteFile = "Yes" );
cfheader( name = "Content-Disposition", value = "inline; filename=inLeague-MedicalRelease.pdf" );
populating a pdf form field, but the last two lines are what we did instead of renderData, mostly because I forgot you could use renderDatasana
08/28/2022, 5:13 PMrichard.herbert
08/28/2022, 5:55 PMsana
08/28/2022, 6:14 PMsana
08/28/2022, 6:15 PMrichard.herbert
08/28/2022, 9:17 PM