Our state of the art Gantt chart


Post by cngo@ensiteusa.com »

Hi,
I am using same pdf export server but when exporting local, pdf file is good. when exporting on production, pdf file is messed up. So what are requirements to make it right?
Thank you.Image

Image


Post by cngo@ensiteusa.com »

And on server exporting, it is always portrait even config is landscape.


Post by marcio »

Hey,

Is there any chance that you have different versions of the pdf server on dev/production?

There isn't any "production flag" on our pdf export server to work differently on dev and production.

Could you confirm when you call the pdf export server, you are passing the exactly same configuration on dev/production?

Best regards,
Márcio


Post by cngo@ensiteusa.com »

Same config on both:

pdfExport = {
        exportServer: `https://exporter.azurewebsites.net`,
        keepPathName: false,      
fileFormat: 'pdf', paperFormat: 'Letter', orientation: 'landscape', fileName: `Gantt_Chart_${new Date().toLocaleDateString()}`, openInNewTab: true, sendAsBinary: true };

Post by marcio »

Talking to our team, one possibility could be that someway the paths of the styles are different between the dev/prod environment. You can enable debug mode and check if there is no 404 in the network tab.

You can get more info on that checking the troubleshooting guide available here https://github.com/bryntum/pdf-export-server/blob/fa3518029ed6418c2145a24957c8d8112fcd25b8/docs/troubleshooting.md

Best regards,
Márcio


Post by cngo@ensiteusa.com »

Turn on this flag validateResponse: true? There are no error return from network.
What are required styles for layout on bryntum pdf export? It looks fine with png format.


Post by Maxim Gorkovsky »

Hello.
I see content itself is displayed correctly, meaning CSS is in place. Orientation is controlled by the client by providing orientation config in the network request: https://github.com/bryntum/pdf-export-server/blob/fa3518029ed6418c2145a24957c8d8112fcd25b8/src/queue.js#L627C28-L627C28
If you haven't changed sources of the server, then it must be smth wrong with the request: it get incorrect either when leaving the client, or when request is probably getting proxied

Suggestions:

  1. Check how export request looks in the network tab, look for orientation field.
  2. Log the config (see link above) on the server side and see the value. If it is not landscape then smth went wrong between client and server.
  3. Try downloading latest version from our repository: https://github.com/bryntum/pdf-export-server/tree/main

Post by cngo@ensiteusa.com »

Hi, here is before pdf export event data config.
Everythings seem correct but it working locally only, not on production. Same pdf export server: https://exporter.azurewebsites.net
Do you see anything wrong with this return data?
Thank you,
Cuong Ngo

beforePdfExport 
Object
config
: 
alignRows
: 
false
client
: 
AF {_selectedCells: Array(0), _selectedRows: Array(0), configureAriaDescription: undefined, isInTimeAxis: ƒ, onDeleteKey: ƒ, …}
clientURL
: 
undefined
columns
: 
(17) ['wbsValue1', 'name2', 'status3', 'calendar4', 'startDate5', 'code6', 'endDate7', 'percentDone8', 'eventColor9', 'constraintType10', 'constraintDate11', 'fullDuration12', 'calendarDuration13', 'assignments14', 'schedulingMode15', 'deadlineDate16', 'col18']
enableDirectRendering
: 
true
exportServer
: 
"https://exporter.azurewebsites.net"
exporterConfig
: 
{type: 'singlepage', translateURLsToAbsolute: true, keepPathName: false, filterStyles: ƒ}
fileFormat
: 
"pdf"
fileName
: 
"Gantt_Chart_2/5/2024.pdf"
footerTpl
: 
undefined
headerTpl
: 
({currentPage:o,totalPages:b})=> {…}
infiniteScroll
: 
false
keepRegionSizes
: 
undefined
orientation
: 
"landscape"
paperFormat
: 
"Letter"
rangeEnd
: 
Sun Apr 27 2014 00:00:00 GMT-0500 (Central Daylight Time) {}
rangeStart
: 
Sun Mar 30 2014 00:00:00 GMT-0500 (Central Daylight Time) {}
repeatHeader
: 
false
rowsRange
: 
"all"
scheduleRange
: 
"completeview"
sendAsBinary
: 
true
useBrowserPrint
: 
false
useRenderedColumnWidth
: 
false
[[Prototype]]
: 
Object
eventName
: 
"beforePdfExport"
source
: 
AF {_selectedCells: Array(0), _selectedRows: Array(0), configureAriaDescription: undefined, isInTimeAxis: ƒ, onDeleteKey: ƒ, …}
type
: 
"beforepdfexport"

Post by Maxim Gorkovsky »

First you need to look at the outgoing request. Please refer to this troubleshooting guide for tips: https://github.com/bryntum/pdf-export-server/blob/main/docs/troubleshooting.md If request says landscape and Letter then problem must be on the server side which ignores page orientation. Check server code, server should set page orientation: https://github.com/bryntum/pdf-export-server/blob/fa3518029ed6418c2145a24957c8d8112fcd25b8/src/queue.js#L627

Please provide readable code snippets, this one is difficult to understand.


Post Reply